Category : BBS Programs+Doors
Archive   : WWIVMODS.ZIP
Filename : WWIVMOD2.MOD
Output of file : WWIVMOD2.MOD contained in archive : WWIVMODS.ZIP
/* VARIOUS MODS 2, by Many Hands */
/* */
/* This is a collection of various mods thought up by various people so that */
/* you can personalize your WWIV bbs just alittle bit more. All credits have */
/* been given where credit was due. */
/* */
/* Typed in by MrBill (WWIVnet address = 1@7300) */
/* of MrBill's Abode 703-369-6140 24hrs/2400bps lots of WWIV support! */
/*****************************************************************************/
/*===========================================================================*/
Totally Forced Voting
by MrBill
This mod will force users, who haven't voted, at logon to go directly
to the voting section and will not allow them out of the voting section
until they finished voting on ALL topics. If you perchance just want to
"encourage" them to vote and not actually leave them stuck in the voting
section, then just do step 1. Else use all of it and fully force them to vote.
1>load up BBSUTL.C and in void logon() right at the end, update this
if (restrict_vote & thisuser.restrict)
i1=0;
if (thisuser.sl<=10)
i1=0;
if (i1) {
nl();
prt(6,"Time to vote!"); /* add */
nl();
nl();
pausescr(); /* add */
vote(); /* add */
}
}
2>load up BBSUTL1.C and add this at the end of all the other extern
declarations:
extern int questused[20]; /* add */
3>at the end of void vote() add this stuff
if ((i>0) && (i<=mapp))
vote_question(f,i,map[i]);
else
if (strcmp(ss,"Q")==0){ /* search */
nl(); /* add */
i1=0; /* add */
for (i=0; i<20; i++) { /* add */
if (questused[i]) /* add */
if (thisuser.votes[i]==0) /* add */
i1=1; /* add */
} /* add */
if (i1) /* add */
prt(3,"You must vote."); /* add */
if (!i1) /* add */
done=1;
} /* add */
else
if (strcmp(ss,"?")==0)
print_quest(f,mapp,&map[0]);
} while ((!done) && (!hangup));
close(f);
}
/*===========================================================================*/
Auto-Deletion of Assholes
by MrBill
This mod will automatically delete users who don't leave a validation
feedback and hang up on them after printing out a message.
I wrote this because I really don't look at my daily log enough and
sometimes a new user can slip past me if he doesn't leave the validation
feedback. Then a week later, i'd get mail asking why the user isn't validated
yet and i have to explain that i didn't even know he was there! Anyway...here
you go.
Load up newuser.c and go all the way to the end of the file and the end of
void newuser() and just change the following. It's quite simple. Now, this
doesn't send the users name to the daily log or anthing, i don't want to be
bothered, but if you want it to...you can make a string variable to copy the
user's name into and then put in it "automatically deleted" or some such thing
and send it to the sysoplog instead of the line that says "#+#+#+# Auto
deletion of....blah blah)
strcpy(irt,"Validation Feedback."); /* search */
email(1,0,1,0);
if (thisuser.feedbacksent==0){ /* add */
sysoplog("#+#+#+# Auto deletion of non-validated user"); /* add */
prt(3,"You were supposed to leave a validation feedback."); /* add */
nl(); /* add */
prt(3,"Since you consider yourself to be above the system,");/* add */
nl(); /* add */
prt(3,"you may consider your account deleted."); nl(); /* add */
hangup=1; /* add */
dtr(0); /* add */
deluser(usernum); /* add */
checkhangup(); /* add */
} /* add */
}
}
}
NOTE:Since typing this up I have decided it would be easier to replace the two
lines that print out to the user 'since you consider yourself...' with a
printfile("ASSHOLE.MSG"); and then you can make the message be as long or
short as you'd like. And you can, of course, call it something else if
you'd prefer.
/*===========================================================================*/
BYline
by MrBill
for Fletcher Christian 1@8410
This mod will add a BY: statement right after RE: in all posts using
the W command in the message bases. This helps when trying to locate the
original post on big message bases such as net subs. It's really a very small
mod, but it requires you to add a line at quite a few places.
1>First load up VARS.H
postrec *msgs; /* search */
int bchanged,dchanged;
char irt[81],cdir[81],byline[81]; /* change */
screentype screensave;
2>load up BBS.C and in void send_email()
pl("Enter user's name or number.");
helpl=14;
outstr(":");
input(s1,30);
irt[0]=0;
byline[0]=0; /* add */
un=0;
sy=0;
ss=strchr(s1,'@');
3>in BBS.C void mainmenu()
case 'F':
strcpy(irt,"Feedback.");
byline[0]=0; /* add */
email(1,0,0,0);
break;
case 'G':
4>in BBS.C void mainmenu()
case 'P':
irt[0]=0;
byline[0]=0; /* add */
if (usub[0].subnum!=-1)
post();
break;
case 'Q':
5>in the extern declarations of BBSUTL.C change this
extern int fsenttoday,userfile,chatcall,mailcheck,smwcheck; /* search */
extern char chatreason[81],irt[81],byline[81]; /* change */
extern subboardrec subboards[32];
6>in BBSUTL.C and at the end of void reqchat()
strcpy(irt,"Tried Chatting."); /* search */
byline[0]=0; /* add */
imail(1,0);
7>now load up NEWUSER.C and in the extern declarations change the following
extern int usernum,userfile,incom,echo,screenlinest;
extern char irt[81],curspeed[80],byline[81]; /* change */
8>also in NEWUSER.C void newuser()
sl1(0,"#Aborted FEEDBACK.MSG"); /* search */
strcpy(irt,"Validation Feedback.");
byline[0]=0; /* add */
email(1,0,1,0);
9>now load up UTILITY.C and once again in the extern declarations
extern int curlsub,curldir,fwaiting,mailcheck,smwcheck;
extern char irt[81],byline[81]; /* change */
extern postrec *msgs;
10>also in UTILITY.C in void frequent_init()
echo=1;
irt[0]=0; /* search */
byline[0]=0; /* add */
okskey=0;
11>load up MSGBASE.C (now the fun begins....ugh, i hate thinking about
upgrading to the next version of WWIV..) once again touch up the
extern declarations
extern statusrec status; /* search */
extern char irt[81],cdir[81],net_email_name[81],byline[81]; /* change */
extern messagerec menus[30],menus1[30],menus2[30];
12>also in MSGBASE.C in void inmsg(blah blah blah)
strcpy(s,"RE: "); /* search */
strcat(s,irt);
addline(b,s,&l1);
if (byline[0]) /* add */
addline(b,byline,&l1); /* add */
addline(b,"",&l1);
irt[0]=0;
byline[0]=0; /* add */
}
if (fsed) {
13>also in MSGBASE.C in void read_message1(blah blah blah)
strcpy(s,"Name: "); /* search */
osan(s,&abort,next);
ansic(MSG_COLOR);
strcpy(s,n);
strcpy(byline,"BY: "); /* add */
strcat(byline,n); /* add */
plan(s,&abort,next);
and below that
strcpy(s,"Name:"); /* search */
osan(s,&abort,next);
ansic(MSG_COLOR);
strcpy(s," <<< ");
strcat(s,n);
strcat(s," >>>");
strcpy(byline,"BY: >UNKNOWN<"); /* add */
plan(s,&abort,next);
and below that
osan("Name: ",&abort,next); /* search */
ansic(MSG_COLOR);
plan(">UNKNOWN<",&abort,next);
strcpy(byline,"BY: >UNKNOWN<"); /* add */
osan("Date: ",&abort,next);
and below that
osan("Name: ",&abort,next); /* search */
ansic(MSG_COLOR);
plan("Abby",&abort,next);
strcpy(byline,"BY: Abby"); /* add */
} else {
and below that
osan("Name: ",&abort,next); /* search */
ansic(MSG_COLOR);
plan("Problemed Person",&abort,next);
strcpy(byline,"BY: Problemed Person"); /* add */
}
if (readit) {
and below that
strcpy(s,"Name: "); /* search */
osan(s,&abort,next);
ansic(MSG_COLOR);
strcpy(s,n);
plan(s,&abort,next);
strcpy(byline,"BY: "); /* add */
strcat(byline,n); /* add */
strcpy(s,"Date: ");
14>Finally we can go to a new file! Now load up MSGBASE1.C and do the normal
fix to the externs
extern statusrec status; /* change */
extern char irt[81],cdir[81],byline[81]; /* add */
extern messagerec menus[30],menus1[30],menus2[30];
15>also in MSGBASE1.C in void scan(blah blah blah)
irt[0]=0; /* search */
byline[0]=0; /* add */
done=0;
quit=0;
and below that
case 'A': /* search */
ss=syscfg.sl[thisuser.sl];
byline[0]=0; /* add */
if ((lcs()) || (ss.ability & ability_read_pos....
and below that
case 'P': /* search */
irt[0]=0;
byline[0]=0; /* add */
case 'W':
and below that at the end
strcpy(s,"Post on ");
strcat(s,subboards[curlsub].name);
strcat(s,"? ");
prt(5,s);
irt[0]=0;
byline[0]=0; /* add */
if (yn())
16>also in MSGBASE1.C in void readmail()
case 'O': /* search */
byline[0]=0; /* add */
if ((cs()) && (okmail) && (m.fromuser!=65535)) {
and below that
case 'A': /* search */
byline[0]=0; /* add */
if (!okmail)
and below that
case 'S': /* search */
byline[0]=0; /* add */
if (!okmail)
17>also in MSGBASE1.C in void multimail(blah blah)
strcpy(irt,"Multi-Mail"); /* search */
byline[0]=0; /* add */
inmsg(&m.msg,t,&i,1,"EMAIL",ALLOW_FULLSCREEN);
/*===========================================================================*/
Mail Forwarding?
by MrBill
This mod will allow you the OPTION of forwarding mail if someone set
their mailbox to do so. There are many times that I just don't want the mail
forwarded across the net and would prefer for it to stay local, so I wrote
this one.
load up MSGBASE.C and do the following:
int forwardm(unsigned short *u, unsigned short *s) /* search */
{
userrec ur;
char *ss;
int i,i1,cu;
if (*s)
return(0);
read_user(*u,&ur);
if (ur.inact & inact_deleted)
return(0);
if ((ur.forwardusr==0) && (ur.forwardsys==0))
return(0);
if (ur.forwardsys) {
if ((ur.forwardusr>0) && (ur.forwardusr<32767)) {
if (cs()){ /* add + see note */
prt(5,"Supposed to forward mail. Keep Local? "); /* add */
if (yn()) /* add */
return(0); /* add */
} /* add + see note */
*u=ur.forwardusr;
*s=ur.forwardsys;
return(1);
} else {
NOTE: If you want just the sysop to be able to keep mail local then replace
the "cs" with "so" and if you want ANYONE to be able to do it then remove the
two lines that i have commented as /* add + see note */
/*===========================================================================*/
Header Message Color
by MrBill
One day while playing with the WWIV code and looking through VARDEC.H
I found a define statement that said "#define MSG_COLOR 0" Then I went
searching through the MSGBASEx.C files to find out what it was for. Well, what
it does is define the color of names/dates/number of number in all posts and
email on the bbs. If you simply change the 0 to a 1 then when you read a
message let's say it's from me:
1/10: Oh Noooooooooooooooooooooooooooooooooooooooooooooooooo!
Name: Mrbill #1 @7300
Date: 4/1/89
the "Oh Nooooo...", "MrBill", and "4/1/89" would be whatever your color
number one is defined in your defaults. Well, I thought this was a great idea
that I hadn't discovered before (boom! right over my head!), BUT there was
nothing to define the color of "1/10:", "Name:", and "Date:." I think
this was an oversight on Wayne's part and hope he adds this in as simple as it
is in the next version of WWIV to come out so everyone can have alittle color
there too.
You can do this one of two ways. The easiest way is just to first load up
VARDEC.H and towards the end you'll find the statment "#define MSG_COLOR 0"
change the 0 to a 1 or the color of your choice, and then add the line
"#define HMSG_COLOR 2" or the color of your choice in place of the 2.
The other way to do it is to delete the line "#define MSG_COLOR 0" in VARDEC.H
and add it to the defines in MSGBASE.C and MSGBASE1.C. Don't forget to change
the 0 to the color of your choice and to add the line "#define HMSG_COLOR 2" to
both the files too. I prefer this method because you can change the color
definitions without messing with VARDEC.H and having to recompile the whole
bbs every time you want to give your message bases a new colorful look, though
you will have to recompile the whole bbs the first time.
ok, now load up MSGBASE.C
first load up MSGBASE.C and in void read_message1(blah blah):
if (m.storage_type!=255) switch(an) {
case 0:
ansic(HMSG_COLOR); /* add */
strcpy(s,"Name: ");
osan(s,&abort,next);
ansic(MSG_COLOR); /* search */
strcpy(s,n);
plan(s,&abort,next);
ansic(HMSG_COLOR); /* add */
strcpy(s,"Date: ");
osan(s,&abort,next);
ansic(MSG_COLOR);
strcpy(s,d);
plan(s,&abort,next);
/* NOTE: if you've got Shai-Hulud's Origin: mod in: */
/* his mod lines here */
ansic(HMSG_COLOR); /* add */
strcpy(s,"Origin: "); /* search */
/* his mod lines here */
break;
case anony_sender:
if (readit) {
ansic(HMSG_COLOR); /* add */
strcpy(s,"Name:");
osan(s,&abort,next);
ansic(MSG_COLOR);
strcpy(s," <<< ");
strcat(s,n);
strcat(s," >>>");
plan(s,&abort,next);
ansic(HMSG_COLOR); /* add */
strcpy(s,"Date: ");
osan(s,&abort,next);
ansic(MSG_COLOR);
strcpy(s,d);
plan(s,&abort,next);
} else {
ansic(HMSG_COLOR); /* add */
osan("Name: ",&abort,next);
ansic(MSG_COLOR);
plan(">UNKNOWN<",&abort,next);
ansic(HMSG_COLOR); /* add */
osan("Date: ",&abort,next);
ansic(MSG_COLOR);
plan(">UNKNOWN<",&abort,next);
}
break;
case anony_sender_da:
case anony_sender_pp:
if (an==anony_sender_da) {
ansic(HMSG_COLOR); /* add */
osan("Name: ",&abort,next);
ansic(MSG_COLOR);
plan("Abby",&abort,next);
} else {
ansic(HMSG_COLOR); /* add */
osan("Name: ",&abort,next);
ansic(MSG_COLOR);
plan("Problemed Person",&abort,next);
}
if (readit) {
ansic(HMSG_COLOR); /* add */
strcpy(s,"Name: ");
osan(s,&abort,next);
ansic(MSG_COLOR);
strcpy(s,n);
plan(s,&abort,next);
ansic(HMSG_COLOR); /* add */
strcpy(s,"Date: ");
osan(s,&abort,next);
strcpy(s,d);
plan(s,&abort,next);
} else {
ansic(HMSG_COLOR); /* add */
osan("Date: ",&abort,next);
ansic(MSG_COLOR);
plan(">UNKNOWN<",&abort,next);
}
then in void read_message(blah blah):
itoa(nummsgs,s1,10);
strcat(s,s1);
strcat(s,": ");
ansic(HMSG_COLOR); /* add */
osan(s,&abort,next);
ansic(MSG_COLOR); /* search */
p=msgs[n];
if (p.status & (status_unvalidated | status_delete)) {
strcpy(s1,"<<< NOT VALIDATED YET >>>");
plan(s1,&abort,next);
if (!lcs())
return;
*val=1;
ansic(HMSG_COLOR); /* add */
osan(s,&abort,next);
ansic(MSG_COLOR);
}
strcpy(s,p.title);
strcpy(irt,p.title);
plan(s,&abort,next);
if ((p.status & status_no_delete) && (lcs())) {
ansic(HMSG_COLOR); /* add */
plan("||||> Permanent Message",&abort,next);
}
then load up MSGBASE1.C and in void readmail():
strcat(s,"): ");
abort=0;
nl();
nl();
ansic(HMSG_COLOR); /* add */
osan(s,&abort,&next);
next=0;
ansic(MSG_COLOR); /* search */
s[0]=0;
if (mloc[curmail]<0) {
strcat(s,">>> MAIL DELETED <<<");
then load up BBSUTL.C and in void mailr()
} else {
read_user(m.touser,&u);
ansic(HMSG_COLOR); /* add */
print("To : ",nam(&u,m.touser),"");
}
ansic(HMSG_COLOR); /* add */
print("Title: ",m.title,""); /* search */
read_message1(&(m.msg),m.anony & 0x0f,1,&next,"EMAIL");
prt(2,"R,D,Q,
finally load up BBSUTL1.C and in void kill_old_email()
case 'R': /* search */
nl();
nl();
strcpy(s,"Title: ");
strcat(s,m.title);
ansic(HMSG_COLOR); /* add */
pl(s);
read_message1(&m.msg,(m.anony & 0x0f), 0, &i1,"EMAIL");
One final note: The last two additions to BBSUTLx.C are for the killing old
email option from the board and the read all mail option from the board or WFC
and because Wayne prints the "To:" and "Title:" in these two places with one
string instead of two, they will end up being only one color, i.e
Title:Oh Nooooooooooooooooooooooooooooo! will just be one color instead of two.
This could be changed fairly easily I believe, but I didn't think it was
worth the effort.
/*===========================================================================*/
Multiple ANSI Welcome Screens
by Doug Fields 1@2300
This mod will allow you to have multiple WELCOMEx.ANS files so that
your users don't get sick of the same old ansi opening screen to the bbs all
the time. I had thought this one up along time ago and never implemented it. I
got the idea from forum-pc that has this option in it's init program (hint-hint
Wayne). Anyway Doug and I (MrBill) we're talking one night and i mentioned this
to him along with some other stuff from various mods 2 and doug told me not to
write it because he already did. So here it is with alittle bit of changing
(not much) by MrBill.
load up BBSUTL.C and at the end of the define statements add
#define NUM_WELCOMES 5 /* add - change the 5 to how many screens you want */
then search for void getuser() and do the change the following
void getuser() /* search */
{
char s[81],s2[81];
int ok,count,net_only,i; /* add i */
long l;
thisuser.sysstatus &= (~sysstatus_ansi);
net_only=1;
if (syscfg.netlowtime!= syscfg.nethightime) {
if (syscfg.nethightime>syscfg.netlowtime) {
if ((timer()<=(syscfg.netlowtime*60.0)) || (timer()>=(syscfg.nethightime*60.0)))
net_only=0;
} else {
if ((timer()<=(syscfg.netlowtime*60.0)) && (timer()>=(syscfg.nethightime*60.0)))
net_only=0;
}
} else
net_only=0;
count=0;
ok=0;
checkit=1;
okmacro=0;
if ((!net_only) && (incom)) {
strcpy(s,syscfg.gfilesdir);
strcat(s,"welcome.ans");
if (exist(s)) {
nl();
outstr("View ANSI logon screen? ");
thisuser.sysstatus=0;
if (yn())
/* printfile("welcome.ans"); */ /* delete line */
{ /* add */
i = random(NUM_WELCOMES + 1); /* add */
if (!i) /* add */
printfile("welcome.ans"); /* add */
else{ /* add */
sprintf(s,"welcome%d.ans",i); /* add */
printfile(s); /* add */
} /* add */
} /* add */
else
printfile("welcome.msg");
/*===========================================================================*/
Page Mod version 1.0
by Robert W. Miller 1@7302
What the mod does is disable the built in chatcall and replace it with a
series of tones. The user can page the sysop 5 times after which he is
prompted to send feedback instead. I use the standard sound() and delay()
routines that are in the dos.h include file. Changing the tones and the
delays should be obvious and you can make it play a little tune if you want
to mess around with it.
Step 1:
Add the following to your VARS.H include file:
int page_reqs;
Step 2a:
Add this to the end of the external variables at the beginning of the
BBSUTL.C file:
extern int page_reqs;
Step 2b:
Search for the following:
void getuser()
Step 2c:
Right before this line:
thisuser.sysstatus &= (~sysstatus_ansi);
add this:
page_reqs=0;
Step 2d:
Search for the following:
void reqchat();
Step 2e:
Step down until you find:
topscreen();
Directly under this line add the following line:
chatcall=0;
Note: You can either delete or comment out the chatcall=1 that can be found
8 lines earlier but then you will not get your chat request message in the
topscreen.
Step 2f:
Directly under that line either delete or comment out this line:
pl("Chat call turned ON.");
Step 2g:
On the very next line add the following code fragment:
nl();
page_reqs++;
if (page_reqs <= 5) {
prt(2,"Now paging Sysop.");
sound(100); prt(1,"."); delay(500);
sound(200); prt(2,"."); delay(500);
sound(300); prt(3,"."); delay(500);
sound(400); prt(4,"."); delay(500);
sound(500); prt(3,"."); delay(500);
sound(600); prt(2,"."); delay(500);
sound(700); prt(1,"."); delay(500);
sound(800); prt(2,"."); delay(500);
sound(900); prt(3,"."); delay(500);
sound(800); prt(4,"."); delay(500);
sound(700); prt(3,"."); delay(500);
sound(600); prt(2,"."); delay(500);
sound(500); prt(1,"."); delay(500);
sound(400); prt(2,"."); delay(500);
sound(300); prt(3,"."); delay(500);
sound(200); prt(4,"."); delay(500);
sound(100); prt(3,"."); delay(500);
nosound();
} else {
nl();
prt(2,"The sysop appears to be busy please use feedback instead.");
nl();
strcpy(irt,"Tried Paging.");
imail(1,0);
}
if (page_reqs >= 10) {
nl();
nl();
prt(3,"And now.......it's Miller time.......see you tomorrow.....");
hangup=1;
}
Step 3:
Recompile your BBS by using the F9 key. This will replace that annoying little
chirping sysop page with an annoying pattern of tones.....oh well....
There are no major problems with this mod. If you test it out using the sysop
fast logon page_reqs will NOT be reset to ZERO but other than that there are
no real problems with it as it stands. You can choose to leave off the last
IF statement if you wish since that was just a nit-wit mod I added to zing
those really persistent users.
If you have any questions or problems or suggestions please keep them to
yourselves......
or improvements to the mod.
/*===========================================================================*/
Auto-default Protocol Mod
by Robert W. Miller 1@7302
I have always been dismayed by either the lazyness or outright stupidity of
most BBS users. They seem incapable of reading menus or help files of any
sort. It's gotten so bad over the years that I can't even watch most users
on the system anymore without going bonkers. One thing that's bugged me of
late is that only the experienced WWIV users know to set the default protocol
to the protocol of their choice. Also, I sometimes add or delete a protocol
and the user will get as their default something other than what they had
expected to see. What this very short and simple mod does is constantly
update the default protocol. Whatever the user chooses for his protocol
will now be his new default protocol.
1. Fire up the editor of your choice and load in SR.C
2. Search for the procedure int get_protocol(int dl)
3. Search for the line return(prot);
4. You should be very near the end of get_protocol(int dl). Now add the
following 4 lines of code as and where indicated:
nl();
} else
done=1;
} while ((!done) && (!hangup));
if (ch==13)
return(prot);
if ((ch>='1') && (ch<='9') && (ch-'0' != thisuser.defprot)) /* add */
thisuser.defprot = (ch-'0'); /* add */
if ((ch>='A') && (ch<='D') && (ch-'A'+10 != thisuser.defprot)) /* add */
thisuser.defprot = (ch-'A'+10); /* add */
if ((ch>='0') && (ch<='9'))
return(ch-'0');
else
if (ch=='Q')
return(-1);
else
return(ch-'A'+10);
}
I add the normal cautions about this mod having been tested and appearing
to be problem free but not promising you anything other than a "Gee that's
too bad". If you have any comments, suggestions or improvements please
feel free email me at the NoName BBS (703) 754-0884
/*===========================================================================*/
Multi-color File Directories
By The Captain of The White Star Line @2370
This modification will modify the way your file directories look. Instead
of the normal grey listing, or even an entire listing of another color, this
modification will output each column a different color of your choice. For
example, the filename would be cyan, the filesize green, and the file
description yellow. By changing the ansic statements you can change the colors
that will be displayed.
INSTALLATION
Add this procedure anywhere at the beginning of XFER.C, after the variable
declarations and before void printinfo()...
void pla2(char *s, int *abort)
{
int i,next;
i=0;
checkhangup();
if (hangup)
*abort=1;
checka(abort,&next);
while ((s[i]) && (!(*abort))) {
outchr(s[i++]);
checka(abort,&next);
}
}
Now search for void printinfo and add the following where indicated:
for (i=0' i<5-strlen(s1); i++)
strcat(s," ");
ansic(1); /* add */
pla2(s,abort); /* add */
ansic(5); /* add */
pla2(s1,abort); /* add */
ansic(3); /* add */
pla2(" :",abort); /* add */
ansic(2); /* add */
pla2(u->description,abort); /* add */
nl(); /* add */
if (!(*abort))
++num_listed;
That's it. Just hit F9 and compile. The pla2() function is there because the
normal pla() function includes a line feed which would ruin the display.
/*===========================================================================*/
Extended Transfer Stats
Another Mod
by
TwO PunKs
1@8410 1@8406
The Bounty WildBunch BBS
This mod was written for one reason and one reason only. GUILT. I
personally don't like to put restrictions on the users to Download but like
every other sysop I wish people would UL more often. Well when someone UL's
now at the end they get a message saying "Your Ratio is - .678" which is nice
but of course most people forget that they've only UL'ed one file which was
400K and (most likely) completely useless to all and since then have DL'ed
30 of your best files. Well I thought it would be nice to remind people of
the fact that even though their ratio is fine, they could stand a little
work on the file/file basis. So what this mod does is print out the following:
||============================================||
|| Your Statistics ||
|| Files(#) Sizes(K) ||
|| -------- -------- ||
|| Uploaded: 2 156 ||
|| Downloaded: 14 437 ||
|| -------- -------- ||
|| Ratio: 0.143 0.357* ||
|| * required ratio is 0.400 ||
||============================================||
or, if the user supports ANSI
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º º Your Statistics º º
º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ º
º Files(#) Sizes(K) º
º ÈÍÍÍÍÍÍÍͼ ÈÍÍÍÍÍÍÍͼ º
º Uploaded: 2 156 º
º Downloaded: 14 437 º
º ÉÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍ» º
º Ratio: 0.143 0.357* º
º * required ratio is 0.400 º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
after a user either UL's or DL's a file. The ratio for Sizes(K) is
obviosly the normal ratio that is normally given. I just thought this would
show people how much they've DL'ed and hopefully make them feel GUILTY enough
to UL some more files.
INSTALLATION
STEP 1
(in XFER.C)
Block read this somewhere into XFER.C (simple huh?).
void dlstats()
{
char s1[81];
if (okansi()) {
prt(2," ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");nl();
prt(2," º ºYour Statisticsº º");nl();
prt(2," º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ º");nl();
prt(2," º Files(#) Sizes(K) º");nl();
prt(2," º ÈÍÍÍÍÍÍÍͼ ÈÍÍÍÍÍÍÍͼ º");nl();
sprintf(s1," º Uploaded: %5d %7d º",thisuser.uploaded, thisuser.uk);
prt(2, s1);nl();
sprintf(s1," º Downloaded: %5d %7d º",thisuser.downloaded, thisuser.dk);
prt(2, s1);nl();
prt(2," º ÉÍÍÍÍÍÍÍÍ» ÉÍÍÍÍÍÍÍÍÍ» º");nl();
sprintf(s1," º Ratio: %-6.3f %-6.3f* º",fratio(),ratio());
prt(2, s1);nl();
sprintf(s1," º *required ratio is %-5.3f º",syscfg.req_ratio);
prt(2, s1);nl();
prt(2," ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");nl();
}
if (!okansi()) {
prt(2," ||===============================================||");nl();
prt(2," | Your Statistics |");nl();
prt(2," | Files(#) Sizes(K) |");nl();
prt(2," | -------- ---------- |");nl();
sprintf(s1," | Uploaded: %5d %7d |",thisuser.uploaded, thisuser.uk);
prt(2, s1);nl();
sprintf(s1," | Downloaded: %5d %7d |",thisuser.downloaded, thisuser.dk);
prt(2, s1);nl();
prt(2," | -------- ---------- |");nl();
sprintf(s1," | Ratio: %-6.3f %-6.3f* |",fratio(),ratio());
prt(2, s1);nl();
sprintf(s1," | *required ratio is %-5.3f |",syscfg.req_ratio);
prt(2, s1);nl();
prt(2," ||===============================================||");nl();
nl();
}
}
STEP 2
(in XFER.C)
(in void download_temp_arc())
thisuser.dk += ((numbytes+1023)/1024);
sprintf(s1,"Downloaded %ldk of temprorary file",(numbytes+1023)/1024);
sysoplod(s1);
nl();
nl();
dlstats(); /* Add */
sprintf(s1,"%-6.3f",ratio()); /* Delete */
print("Your ratio is now: ",s1,""); /* Delete */
if (useron)
topscreen();
STEP 3
(in XFER.C)
(in void upload(int dn))
nl();
nl();
pl("File uploaded.");
nl();
dlstats(); /* Add */
sprintf(s,"%-6.3f",ratio()); /* Delete */
print("Your ratio is now: ",s,""); /* Delete */
nl();
nl();
if (useron)
topscreen();
STEP 4
(in XFER.C)
(in void downloaded())
strcpy(s1,"Downloaded '");
strcat(s1,u.filename);
strcat(s1,"'");
sysoplod(s1);
nl();
dlstats(); /* Add */
sprintf(s,"%-6.3f",ratio()); /* Delete */
print("Your ratio is now: ",s,""); /* Delete */
nl();
nl();
if (useron)
topscreen();
STEP 5
(in UTILITY.C)
(add the following block of code at the end)
float fratio()
{
double s;
if (thisuser.downloaded==0)
return(99.999);
s=((float) thisuser.uploaded) / ((float) thisuser.downloaded);
if (s>99.998)
s=99.998;
return(s);
}
STEP 6
(in FCNS.H)
(add 'float fratio()' anywhere you want, but here's where I added it)
void write_user(unsigned int un, userrec *u);
void save_status();
double ratio();
float fratio(); /* Add */
char *nam(userrec *u1, unsigned int un);
char *nam1(userrec *u1, unsigned int un, unsigned int sy);
double nsl();
STEP 7
(in the kitchen)
Go make a sandwich while XFER.C compiles....make a couple.
NOTES
Well I think I included everything (I hate writing these things up)
and it should work perfecly now. I've replaced the 'Y' function with
this also and that's pretty much the same procedure. Also if you don't
want to crowd up your code with all this junk you can get rid of one
menu (all you'd do is delete the 'if (okansi)', the '} else {', one of
the menus, and the final '}'. That's it.
This is just a cosmetic mod to make things a little different on your
board. It won't affect anything except the time it takes to compile
XFER.C (about 2 years, I think). Hope you like it and if you have any
questions or any SUGGESTIONS call our boards (Starlinkable) or email
us. We're bored here and can't think of anything else to do.
/*===========================================================================*/
New User No Abort Mod! v1.0
by Benny Hill 1@
Ok, Are you one of the MANY SysOps that get sick of users ABORTING the
New User Message? I know >I< am! So, I did something about it! Now,
users TRY to abort the New User Message, and Bam! They are TOLD they
have to read the New User Message, and then it prints that file all
over again! Instead of just making it NOT be abortable, make them get
to read it ALL over again!! No more will they have an excuse that
they never saw that in the New User Message! Of COURSE they didn't see
it! They never even READ the message! Well now, They have NO EXCUSE
ANYMORE! And BEST of all, It's EASY to install!!! It is SO easy!!!
Load up NewUser.C Search for void getuser(). change the line:
int i,ok,done; /* Change */
Ok, search down until you find thisuser.pw[6]=0; and put the following
lines:
if (!hangup) { /* Existing Line */
if (incom) { /* Existing Line */
do { /* Add */
done=1; /* the following */
if (printfile("SYSTEM.MSG"); {
sl1(0,"# Tried aborting System.Msg");
nl(); nl();
pl("You MUST read the System Message!");
nl(); nl();
done=0;
}
} while ((!done) && (!hangup));
do {
done=1;
if (printfile("NEWUSER.MSG"); {
sl1(0,"# Tried aborting NewUser.Msg");
nl(); nl();
pl("You MUST read the New User Message!");
nl(); nl();
done=0;
}
} while ((!done) && (!hangup));
}
input_name(); /* Existing Line */
input_realname(); /* Existing Line */
Ok, Search down to the end of Newuser.C and replace with the
following code....
if (incom) { /* Existing line */
do { /* Add to End */
done=1;
if (printfile("FEEDBACK.MSG")) {
sl1 (0,"# Tried aborting Feedback.Msg");
nl(); nl();
pl("You MUST read the Feedback Message!");
nl(); nl();
done=0;
}
} while ((!done) && (!hangup));
strcpy(irt,"Validation Feedback");
email(1,0,1,0);
}
}
}
Ok, hit F9 to compile and that should do it!
Wasn't THAT simple? Thought so! Hey, and Useful too!
/*===========================================================================*/
Additional Logon Info
by Justin Kiddingsly (The Kidder) 75@8101
This is a small mod for WWIV 4.xx that prints the baud, date,
time and a small message right when a user logs on. The Format
is-
CONNECT 1200 / 04-11-89 (19:18:50)
My Favorite BBS BBS
Running WWIV 4.xx
This message is printed out and
can contain whatever you would like
that you think would be nice.
Would you like ANSI Graphics?
This is a very simple mod and works very well. The MOD
BEGINS : in BBSUTL.C, search for void getuser() then search for
strcat(s,"welcome.ans");
If you have any problems please contact me.
void getuser() /* search for this */
strcat(s,"welcome.ans"); /* search for this */
if (exist(s)) {
nl(); /* start of mod */
nl();
print("CONNECT ",curspeed," / ",times()," (",date(),")");
nl();
pl("My BBS"); /* change this to suit */
print("Running ",VERSION_NUMBER,"");
nl();
printfile("QUOTE.MSG");
nl();
outstr("Would you like wild and crazy ANSI graphics? "); /* end mod */
thisuser.sysstatus=0;
if (yn())
printfile("welcome.ans");
else
printfile("welcome.msg");
} else
printfile("welcome.msg");
}
/*===========================================================================*/
Well, that brings us to the end of another VARIOUS MODS file and just
like America's Most Wanted (errr, America's Most Boring Show?) I would like to
hear from YOU and know that you liked these mods or not. I heard from very
few people about the first VARIOUS MODS file with the exceptions of those
people that I communicate with frequently. And of course once again I say that
no mod is too small! If you've done it and you think it would be beneficial to
others, then send it to me and it will be in the next VARIOUS MODS file! You
can contact me easily on just about all the 7300 WWIVnet bbs's if you can't
get through to my system and you can always net-mail me 1 @ 7300.
tblee-tblee-tblee-tblee, that's all folks!
MrBill
04/24/89
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/