home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
SYSOP
/
MODS1.ZIP
/
GIVEFPS.MOD
< prev
next >
Wrap
Text File
|
1993-03-31
|
3KB
|
91 lines
Bast #1 @7319
Wed Mar 24 16:46:21 1993
/**
┌────────────────────────────────────────────────────────────────────────────┐
│ Mod Name: File Point Giver Mod Author: Bast │
│ Difficulty: ▒▒░░░░░░░░ Date: 03/24/93 │
│ WWIV Version: 4.22 and above │
│ Files Affected: BBS.C │
│ Description: Gives Users File Points. For Use With TFC019.MOD, The File │
│ Point System By The Flying Chicken. │
└────────────────────────────────────────────────────────────────────────────┘
**/
/** STEP 1: Backup Your Source!!!!!
I cannot and will not be responsible for anything bad
happening to your source code because you didn't back
it up.
**/
/** STEP 2: Open BBS.C
Search For/Modify Following
**/
void mainmenu(void)
{
char *s, s1[81],s2[81],fps[5],ch,ch2; /** Add fps[5] **/
int i,done;
long l;
.
.
.
if (strcmp(s,"GFILEEDIT")==0) {
sysoplog(get_stringx(1,5));
gfileedit();
}
if (strcmp(s,"GIVEFPS")==0) { /** Add From Here **/
prt(1,"How many? ");
input(fps,4);
if(fps[0]==0) i=-1;
else i=atoi(fps);
give_fps(i);
} /** To Here **/
/** At The Bottom Of BBS.C, Add The Following Function **/
void give_fps(int x) /** Give All Users FilePoints **/
{
int i;
userrec u;
long l;
for(i=1;i<=number_userrecs();i++)
{
read_user(i,&u);
if(x==-1) {
l = (u.uk * 2) - u.dk;
if (l>0)
u.filepoints = l;
else
u.filepoints = 0;
} else
u.filepoints=(long) x;
write_user(i,&u);
close_user();
}
}
Save/Close BBS.C
Compile And You're Done!
Typing 1//GIVEFPS 0from Main Menu Will Allow You To Give All Users
A Specified Amount Of FilePoints. Entering A Value Of -1 (negative one)
Will Use The Flying Chicken's Formula For Giving The Users File Points.
I Wrote This Because TFC's CNVTUSER.C Program Didn't Work, And My
External Program To Do The Same Didn't Work. I Hope This Helps You Out.
Thanks Go To The Flying Chicken For Writing The File Point System,
And To Wayne Bell For Writing WWIV.
- Bast
1@7319 WWIVNet
2@17306 WWIVLink
2@7309 IceNet
<EOF>