home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
MODSUNKN.ZIP
/
FREQUEST.MOD
< prev
next >
Wrap
Text File
|
1990-10-07
|
4KB
|
115 lines
East Bay Ray #1 @9964
Wed Oct 03 22:32:19 1990
WANTLIST MOD by MrBill (WL412.MOD)
v4.12 Conversion by East Bay Ray 1@9964
Ok boys and girls, here's my new one. This mod came to me just a little
while ago when i was wishing i had the source to the request door written
by Omega Man of Byte Me BBS. I wanted to run two different request doors
but couldn't since they access the same data file. So I decided to write my
own mod into the bbs to get around this problem. I thank Omega Man for his
indirect inspiration though [smile]. (hey, OM, in the next ver please allow
a parameter for the filename, then the non-registered WWIV sysops can run
multiple request doors.) Anyway, what this will do is have seperate files
for EACH of your download directories that users can put up requests for
files that they are looking for. It also allows easy editing of these files
for the sysop (or co's). All files will be made in the gfiles dir with the
same name as your directory database file (in the data dir) but with the
extension of "WNT". The whole beauty of this mod is that it is not just one
want list, it is one for EVERY download directory on your board and is
totally secure with any DAR's or DSL's that you have set up for the
different areas. Have fun!
/*****************************************************************************/
/=============================================================================/
First thing for you to do is load up BBS.C and find all the case
statements in void dlmainmenu(), then throw this in between any of them. If
you want you can put it in alphabetical order like i did.
/=============================================================================/
case 'V':
arc_l();
break;
case 'W': /* add */
wantlist(); /* add */
break; /* add */
case 'X':
/=============================================================================/
Next load up XFEROVL.C and put this whole procedure at the end
of it.
/=============================================================================/
void wantlist() /* add \/ */
{
int i,f;
char s[81],s1[81],ch;
nl();
strcpy(s,"MrBill's Want List for ");
strcat(s,directories[udir[curdir].subnum].name);
strcat(s," : ");
prt(3,s);
nl();
strcpy(s,directories[udir[curdir].subnum].filename);
strcat(s,".WNT");
printfile(s);
prt(5,"Add to the list? ");
if (yn()){
pl("[-----Program Name-----][Version][---Author/Pub---][----Small
Description-----]");
outstr(":");
mpl(78);
inputl(s1,78);
for (i=strlen(s1); i<80; i++)
s1[i]=32;
s1[i]=0;
nl();
nl();
pl(s1);
prt(5,"Is this what you want? ");
if (yn()){
strcpy(s,"WANTS:");
strncat(s,s1,69);
sysoplog(s);
strcpy(s,syscfg.gfilesdir);
strcat(s,directories[udir[curdir].subnum].filename);
strcat(s,".WNT");
f=open(s,O_RDWR | O_CREAT | O_BINARY, S_IREAD | S_IWRITE);
if (filelength(f)) {
lseek(f,-1L,SEEK_END);
read(f,((void *)&ch),1);
if (ch==26)
lseek(f,-1L,SEEK_END);
}
s1[79]='\r';
s1[80]='\n';
s1[81]=0;
write(f,(void *)s1,81);
close(f);
nl();
pl("Your request has been added. ");
}
}
if (cs()) { /* change to so if you want sysop only to edit */
prt(5,"Edit Want List? ");
if (yn()){
strcpy(s,directories[udir[curdir].subnum].filename);
strcat(s,".WNT");
if (okfsed())
external_edit(s,syscfg.gfilesdir,thisuser.defed-1,500);
else
tedit(s);
}
}
}
/=============================================================================/
Now YOU MUST add the following line to FCNS.H:
void wantlist()
The only thing left now is to update your menus so that your users
will see the new command, and of course post a message or two so that those
who are in expert mode will know about it. I hope it is as usefull to you as
it is to me.