home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
SYSOP
/
MODS1.ZIP
/
LISTPLUS.MOD
< prev
next >
Wrap
Text File
|
1995-06-04
|
13KB
|
430 lines
And now, the modification you've all been waiting for!!!!
6Θ════════════════════════════════════════════════════════════════════════════Θ
0Asylum Listplus Modification for WWIV 4.24
6Θ════════════════════════════════════════════════════════════════════════════Θ
┌─────────────────────────────────────────────────────────────────────────────┐
│ ModTitle: Asylum Listfiles 4.0 for 4.24 May, 26 1995 │
│ What Is?: Vision/2 style file listing. Common 4.0+ Mod │
│ │
│ Difficulty: Yeah, maybe... so? │
│ │
│ Files affected: FCNS.H, NEWUSER.C, BBS.C, MMENU.C, XFEROVL.C, MAKEFILE.MAK │
│ XFER.C...maybe others :) │
│ Includes info for using this mod with Sam's Kilobyte per day mod, also │
│ Support for Spotnick's FILEPOINTS │
│ BY: Asylum Group (Zu Digital, 1@8421, and Sam, 1@4051). No. Don't ask. │
└─────────────────────────────────────────────────────────────────────────────┘
The Modification:
READ LISTPLUS.DOC! It contains important information not found anywhere
else.
Please take steps to ensure your BBS can be recovered in case of a problem.
I take no responsibility in you doing this, if you can't put in this mod
without losing your userrec or whatever else may happen, then don't install
it.
Now... this modification seems to work real well, special care is taken to
avoid memory allocation/overrun/leaks problems (probably 99% of real
problems) but I am not prefect.
+ Add
- Subtract
* Change
= Existing
@# See number
Step A)
This is a Common mod, which means you need to have COMMON installed.
Common version 4.0 or greater is needed for this version (the later, the
more debugged).
Step B)
Put the .MOD, .C and I guess the .DOC in your source dir, I believe all the
others go in your gfiles dir.
Files going in your gfiles are (don't hate me if I miss one)
LPSYSOP.*
LISTPLUS.HLP
REQPLUS.*
LPSEARCH.*
Step 1) MMENU.C
In dlmainmenu, option 'K' to config your file listing
= case 'J':
= if (okconf(&thisuser))
= jump_conf(CONF_DIRS);
= break;
+ case 'K':
+ if(ok_listplus())
+ config_file_list();
+ break;
= case 'L':
= tagging=1;
= listfiles();
= tagging=0;
= break;
Set 2) XFEROVL.C
In the section where you dis/enable the filetagging, print a little
text so that you know which file tagging is enabled.
Function xfer_defaults, towards the begining of the function
= else
= outstr(get_string(1362));
= pl(")");
+
+ if(!(thisuser.sysstatus & sysstatus_listplus)
+ && !(thisuser.sysstatus & sysstatus_no_tag))
+ pl(" (ListPlus!)");
+ else if (!(thisuser.sysstatus & sysstatus_no_tag))
+ pl(" (Internal Tagging)");
+
= pl(get_string(809));
= nl();
= prt(2,get_string(297));
= }
Step 3) XFEROVL.C
In the section where you dis/enable the filetagging, if you enable it, check
to see if the user wants internal or listplus file tagging.
Function xfer_defaults, A ways down, almost the very end of the function...
Replace the entire Case '5' with this one:
case '5':
if (thisuser.sysstatus & sysstatus_no_tag)
{
thisuser.sysstatus -= sysstatus_no_tag;
check_listplus();
}
else
thisuser.sysstatus += sysstatus_no_tag;
break;
Step 4) XFER.C
Change the next five functions so that they call my functions if the user
has ansi available, if not, use old functions.
A. Function ListFiles
= void listfiles(void)
= {
= char s[81];
= int i,abort,next=0,f;
= uploadsrec u;
+ if(ok_listplus())
+ {
+ listfiles_plus(LIST_DIR);
+ return;
+ }
= dliscan();
B. Function NScanDir
= void nscandir(int d, int *abort)
= {
= int i,od,next=0,f;
= uploadsrec u;
=
= if ((dir_dates[udir[d].subnum]) && (dir_dates[udir[d].subnum]<nscandate))
= return;
=
= od=curdir;
= curdir=d;
= dliscan();
= if (this_date>=nscandate) {
+ if(ok_listplus())
+ {
+ *abort=listfiles_plus(NSCAN_DIR);
+ curdir=od;
+ return;
+ }
= f=sh_open1(dlfn,O_RDONLY | O_BINARY);
= for (i=1; (i<=numf) && (!(*abort)) && (!hangup) && (tagging!=0); i++) {
C. Function NScanAll
= void nscanall(void)
= {
= int abort,i,i1,count,color,ac=0;
=
= /* ------------- DO NOT PUT BLOCK HERE!!!!!!! --------------*/
= /* ------------- DO NOT PUT BLOCK HERE!!!!!!! --------------*/
= if ((uconfdir[1].confnum!=-1) && (okconf(&thisuser))) {
= if (!x_only) { /* ARE YOU PAYING ATTENTION? */
= nl(); /* ARE YOU PAYING ATTENTION? */
= prt(5,get_string(1379)); /* ARE YOU PAYING ATTENTION? */
= ac=yn(); /* ARE YOU PAYING ATTENTION? */
= nl(); /* ARE YOU PAYING ATTENTION? */
= } else /* ARE YOU PAYING ATTENTION? */
= ac=1; /* ARE YOU PAYING ATTENTION? */
= if (ac) /* ARE YOU PAYING ATTENTION? */
= tmp_disable_conf(1); /* ARE YOU PAYING ATTENTION? */
= } /* ARE YOU PAYING ATTENTION? */
=
+ if(ok_listplus()) /* THERE, PUT THE BLOCK OF */
+ { /* CODE HERE, AFTER THE */
+ int save_dir=curdir; /* ABOVE CHUNK OF STOCK CODE */
+
+ listfiles_plus(NSCAN_NSCAN);
+ if(ac)
+ tmp_disable_conf(0);
+ curdir=save_dir;
+ return;
+ }
= abort=0;
= num_listed=0;
= count=0;
= color=3;
= if (!x_only) {
D. Function SearchAll
= void searchall(void)
= {
= int i,i1,pts,abort,pty,ocd,next=0,f,count,color,ac=0;
= char s[81];
= uploadsrec u;
+ if(ok_listplus())
+ {
+ listfiles_plus(SEARCH_ALL);
+ return;
+ }
5A) XFEROVL.C function FindDescription
E. Function FindDescription
= void finddescription(void)
= {
= uploadsrec u;
= int i,i1,i2,abort,ocd,pts,next=0,f,count,color,ac=0;
= char s[81],s1[81];
+ if(ok_listplus())
+ {
+ listfiles_plus(SEARCH_ALL);
+ return;
+ }
Step 5) XFER.C function ratio_ok
Down in function ratio_ok, you need to clear the screen before
displaying your error message.
= if ((syscfg.req_ratio>0.0001) && (ratio()<syscfg.req_ratio)) {
= ok=0;
* CLS(); // Change from nln(2) to CLS() and add nl()
+ nl();
and a little below that
= if (!(thisuser.exempt & exempt_post))
= if ((syscfg.post_call_ratio>0.0001) && (post_ratio()<syscfg.post_call_ratio)) {
= ok=0;
* CLS(); // remove nln(2) and add CLS() and nl()
+ nl();
Step 6) MAKEFILE (Borland C, Turbo C'rs are on your own)
Add listplus.obj to the BBS_OVL (overlaid) part:
= srsend.obj subedit.obj subreq.obj subxtr.obj \
= sysopf.obj tedit.obj uedit.obj voteedit.obj \
= xferovl.obj xfertmp.obj xinit.obj common.obj \
+ listplus.obj ^^^^ that \ is added
^^^^^^^^^^^^ add this
And this one: be sure to notice the '\' at the end of EVERY line
= $(OBJ)\subedit.obj $(OBJ)\subreq.obj $(OBJ)\subxtr.obj \
= $(OBJ)\sysopf.obj $(OBJ)\tedit.obj $(OBJ)\uedit.obj \
= $(OBJ)\voteedit.obj $(OBJ)\xferovl.obj $(OBJ)\xfertmp.obj \
* $(OBJ)\xinit.obj $(OBJ)\common.obj $(OBJ)\listplus.obj
^^^^^^^^^^^^^^^^^^^ add this
And down a ways...
= xferovl.obj : xferovl.c
= $(TCC_OVL)
= xfertmp.obj : xfertmp.c
= $(TCC_OVL)
= xinit.obj : xinit.c
= $(TCC_OVL)
= common.obj : common.c
= $(TCC_OVL)
+ listplus.obj : listplus.c
+ $(TCC_OVL)
Step 7) FCNS.H
Update fcns.h by typing MAKE FCNS, or by manually installing the following
definitions:
/* File: listplus.c */
void colorize_foundtext(char *text, struct search_record *search_rec, int color);
void printtitle_plus(void);
void build_header(void);
int first_file_pos(void);
int lp_configured_lines(void);
void print_searching(void);
void catch_divide_by_zero(int x);
int listfiles_plus(int type);
int listfiles_plus_function(int type);
void drawfile(int filepos, int filenum);
void undrawfile(int filepos, int filenum);
int add_batch(char *filename, int dn, long fs);
int printinfo_plus(uploadsrec *u, int filenum, int marked, int LinesLeft, struct search_record *search_rec);
int load_config_listing(int config);
void write_config_listing(int config);
void unload_config_listing(void);
int print_extended_plus(char *fn, int numlist, int indent, int color, struct search_record *search_rec);
void show_fileinfo(uploadsrec *u);
int check_lines_needed(uploadsrec *u);
char *lp_read_extended_description(char *fn);
void lp_zap_ed_info(void);
void lp_get_ed_info(void);
void prep_menu_items(char **menu_items);
int prep_search_rec(struct search_record *search_rec, int type);
int calc_max_lines(void);
void sysop_configure(void);
int SelectColor(int which);
void check_listplus(void);
void config_file_list(void);
void update_user_config_screen(uploadsrec *u, int which);
int rename_filename(char *fn, int dn);
int remove_filename(char *fn, int dn);
int move_filename(char *fn, int dn);
void do_batch_sysop_command(int mode, char *filename);
void smmsm(void);
void load_lp_config(void);
void save_lp_config(void);
int search_criteria(struct search_record *sr);
void load_listing(void);
void view_file(char *filename);
void download_plus(char *file);
void request_file(char *filename);
int ok_listplus(void);
int compare_criteria(struct search_record *sr, uploadsrec *ur);
int lp_compare_strings(char *raw, char *formula);
int lp_compare_strings_wh(char *raw, char *formula, unsigned *pos, int size);
int lp_get_token(char *formula, unsigned *pos);
int lp_get_value(char *raw, char *formula, unsigned *pos);
Step 8) Do what you do to get a BBS.EXE... (in other words, you are done)
──═────────═─────────══───────────═──────────═══───────────═══────────═───────═
KiloByte Per Day Mod
If you use this, or some other mod that keeps track of who/what/when, or
adds additional resritions, as this one does, you will need to add something
like this:
If you do use KBPERDAY, #define KBPERDAY (or uncomment it) in Listplus.c
1) And down in function ratio_ok, you need to clear the screen before
displaying your error message.
= if (thisuser.kbdowntoday+kbbatch > ss.messages_read) /* +kbbatch is KBper Wayne Fix */
= {
= ok=0;
* CLS(); /* Change the nl() to CLS() */
= nl();
─═════════════════──════════════─────════════─═══════════════───══════════─═══
Adding option 'K'onfig to the pulldown menus
1) In file PDCOMP.H
= #ifdef PDCOMPILER
= {"DEBUG"},
= #else
= {pd_debug},
= #endif
=
= #ifdef PDCOMPILER
= {"LIST_COMMON"},
= #else
= {pd_show_common_mods},
= #endif
=
+ #ifdef PDCOMPILER
+ {"KONFIG"},
+ #else
+ {config_file_list},
+ #endif
=
= {0}
= }; /* End of commands */
2) TRAN_PD.SRC
= StartItem "Other"
+ "Konfig you file list K" K konfig
= "Chat with sysop C" C reqchat
= "Enter Chat room " 0 chat_room
= "Time Bank $" $ time_bank
= "Transfer options T" T xfer_defaults
= "Sysop menu W" W sysop_pd
= MinSL 255
= EndItem
3) PDCOMP.EXE
Rebuild it, type BCC pdcomp.c \lib\wildargs.obj
^^^ your correct path
4) TRAN_PD.PDM
Rebuild it, type PDCOMP tran_pd.src
Move the *.PDM file into your DATA directory
5) BBS.EXE
Finally, bbs.exe has to be rebuilt so it can read in the new PDCOMP.H info,
otherwise, your menus will act very crazy.
Done!
' Void this
' Real idiots think that real programmers only use one tool
Look for more great mods from the Asylum group...
Go Chiefs (I know....it's a little early, but hey- Joe's gone.)