home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
PRE412.ZIP
/
AUTOVAL3.MOD
< prev
next >
Wrap
Text File
|
1992-12-01
|
14KB
|
344 lines
Midnight Tree Bandit #11 @8403
Wed May 23 00:52:17 1990
|
| Enhanced Sysop Autovalidation Information
| by MTB of the Vaporboard
|
| 5/10/90
---+-------------------------------------------
|
Long long time ago, I installed Mr Bill's Sysop Autovalidation mod. It was
neat, it was useful, it was worth every penny I didn't pay for it.
But now that I seem to be known as "Mr Modnet" (thanks Elric), the Vaporboard
gets calls from all over from sysops picking up ModNet and generally checking
in. I became curious as to how many of these systems were non-net, how many
Link, how many Net, and how many from other systems (they DO exist out there,
folks). So I decided to come up with a way to keep track of such things,
without re-doing the entire user list, to boot.
Basically, I took the last 11 bytes of the reserved space in the user record
and used it for holding the BBS type (leaving (in my 4.10 code) 22 bytes for
whatever Wayne Bell decides to use it for. If he uses all 33 left in a future
version.... well, that's your problem).
The core of this mod is simple: add the variable to VARDEC.H and add a new
procedure to NEWUSER.C. After working that out, I added the bits that let
UEDIT change it. Best of all: NO USER FILE CONVERSION!! (I mean, really, what
could Random POSSIBLY add to the user list that we actally need?)
Here are the easy-to-swallow steps (in gelatin caps for easier digestion):
------------------------------------------------------------------------------
[Legend for code blocks:
- is delete
+ is add
* is change
[blank] is leave alone]
I. VARDEC.H -- Add the 'bbstype' variable to userrec
unsigned short fsenttoday1; /* feedbacks today */
unsigned char num_extended; /* num lines of ext desc */
unsigned char optional_val; /* optional lines in msgs */
char res[22], /* reserved bytes */
+ bbstype[11]; /* visiting sysop's BBS type */
II. NEWUSER.C -- Let the sysops tell you about themselves
A. In 'void newuser', at the end of the 'thisuser.whatever' assignments:
thisuser.bwcolors[6]=143;
thisuser.bwcolors[7]=112;
thisuser.bbstype[0]=0;
+ realsl=thisuser.sl;
B. Add a call to 'void sysop_check()' to 'void newuser':
input_age(&thisuser);
input_comptype();
input_screensize();
input_ansistat();
/* If you've installed the pick-a-default-editor and pick-a-default-protocol
mods from MrBill, they will appear here. Just don't want to confuse you
forgetful modders out there. */
nl();
print("Here's your password: ",thisuser.pw,"");
nl();
prt(5,"Would you rather have another one (Y/N)? ");
if (yn())
input_pw();
+ nl();
+ prt(5,"Are you a masochist .. er sysop of another BBS?");
+ if (yn())
+ check_sysop();
}
if (!hangup)
do {
C. Add 'void check_sysop()' just before 'void newuser()':
void check_sysop()
{
char s[81];
nl();
pl("Please enter your BBS name and number");
outstr(":");
inputl(thisuser.note,40);
thisuser.exempt=31; /* Set these to whatever you want. The exemptions
are bit-mapped and defined in VARDEC */
thisuser.restrict=0; /* Also bit-mapped. See your VARDEC for details */
nl();
pl("5Which type of BBS is this: "); /* Beware! WWIV colors be */
pl("5 1. Plain WWIV (no net)"); /* here. To hard code the */
pl("5 2. WWIVLink"); /* colors in, hold ALT while */
pl("5 3. WWIVNet"); /* tapping in 3 (for ^C). */
pl("5 4. Other (specify)"); /* If using Turbo C's editor */
pl("5 N. Never mind"); /* use ^P^C. */
prt(2,"Pick 1-4,N: ");
switch(onek("N1234")) {
case '1':
strcpy(thisuser.bbstype,"WWIV NoNet");
sprintf(s,"**> %s registered as WWIV sysop",nam(&thisuser,usernum));
case '2':
if (!thisuser.bbstype[0]) {
strcpy(thisuser.bbstype,"WWIVLink");
sprintf(s,"**> %s registered as WWIVLink sysop"
,nam(&thisuser,usernum));
}
case '3':
nl();
if (!thisuser.bbstype[0]) {
strcpy(thisuser.bbstype,"WWIVNet");
sprintf(s,"**> %s registered as WWIVNet sysop"
,nam(&thisuser,usernum));
}
sysoplog("#*#*#* Auto-validation of WWIV SysOp");
thisuser.sl=60;
thisuser.dsl=60;
thisuser.sysstatus ^= sysstatus_expert;
printfile("wsysopax.msg");
pausescr();
break;
case '4':
nl();
prt(2,"What is your BBS software (10 char max)? ");
mpl(10);
inputl(thisuser.bbstype,10);
sprintf(s,"**> %s registered as %s sysop",
nam(&thisuser,usernum),thisuser.bbstype);
sysoplog("#*#*#* Auto-validation of SysOp");
thisuser.sl=50;
thisuser.dsl=50;
printfile("sysopax.msg");
pausescr();
break;
case 'N':
nl();
thisuser.note[0]=0;
thisuser.bbstype[0]=0;
s[0]=0;
thisuser.exempt=0;
thisuser.restrict=syscfg.newuser_restrict;
break;
}
if (s[0])
ssm(1,0,s);
}
/*
Note on this procedure:
This is the framework. It does what the Vaporboard's does: gets the BBS
name, and sends a message to the sysops in their SMW that the user logged
on as a particular type of sysop. If the user is a non-WWIV sysop, it
gets the name of the software and sends a note. Note that control falls
through the first two cases. That's because all WWIV sysops get the same
treatment. You could probably figure out from here what else to do to
further make it suit your needs. You can change other things separately,
use registered/nonregistered, etc.
Note also that you need two .MSG files in your GFILES directory. You can
have more, if you wish. Here's what we have:
WSYSOPAX.MSG is what WWIV sysops see when they register. Says
something to the effect that the earth will swallow them up if they
turn out to be non-sysops. Mentions the priveleges they get, too.
SYSOPAX.MSG is similar, but it is written for the non-WWIV sysops.
It makes the same threats.
*/
III SYSOPF.C -- Now to edit the 'bbstype' in UEDIT
A. In 'void print_data()':
if (u->note[0])
print("Note: ",(u->note),"");
+ if (u->bbstype[0])
+ print("BBS : ",(u->bbstype),"");
if (u->ass_pts){
itoa(u->ass_pts,s,10);
print("Ass : ",s,"");
B. And in 'void print_short()':
print("Comp: ",&(ctypes[u->comp_type][0]),"");
if (u->note[0])
print("Note: ",(u->note),"");
+ if (u->bbstype[0])
+ print("BBS : ",(u->bbstype),"");
if (u->ass_pts){
itoa(u->ass_pts,s,10);
print("Ass : ",s,"");
C. Now we'll let you EDIT it in UEDIT. First add the "B" option:
if ((realsl==255) || (wfc))
* ch=onek("Q[]{}/,.?UDRNLCPOGMSTEXYZAIB~:*");
else
* ch=onek("Q[]{}/,.?UDRNLCPOGMSTEXYZAIB");
D. Now add the case for it (right after case 'I' is good):
case 'B':
nl();
pl("1) WWIV (no nets); 2) WWIVLink; 3) WWIVNet;");
pl("4) Other (specify); or N)one");
nl();outstr("Which (1-4,N)? ");
switch(onek("N1234") {
case '1':
strcpy(u.bbstype,"WWIV NoNet"); break;
case '2':
strcpy(u.bbstype,"WWIVLink"); break;
case '3':
strcpy(u.bbstype,"WWIVNet"); break;
case '4':
nl();
prt(2,"What is the BBS software (10 char max)?");
mpl(10);
inputl(u.bbstype,10);
break;
case 'N':
u.bbstype[0]=0; break;
}
prt(2,"Don't forget to update the SL, DSL, Note, ");nl();
prt(2,"and other info accordingly."); nl();
pausescr();
write_user(un,&u);
break;
IV. CONIO.C -- Showing it in the top-screen data
There are two 'void topscreen()' procedures in CONIO.C. The first is within
the "#ifdef OLD_STUFF" condition, and the other is in the "#ELSE" condition.
Just to be safe (who knows what "OLD_STUFF" is for, anyway?), we'll change
both:
A. The first place to change is about line 969. Simply change
'thisuser.callsign' to 'thisuser.bbstype':
movecsr(0,1);
sprintf(ol, /* this line split so it'll fit in an 80 col. line*/
"SL =%-3d AR =%-16s LO=%-5d F=%-5d W=%-3d %-6s %c%c%-3d Ex=%-3d FW=%-2d",
thisuser.sl,ar,thisuser.logons,thisuser.feedbacksent,thisuser.waiting,
* thisuser.bbstype,thisuser.sex,ch,thisuser.age,thisuser.exempt,fwaiting);
outs(ol);
B. The second place is at about line 1182. Make the same change here:
movecsr(0,1);
sprintf(ol,"%-20s %12s %-7s DL=%4d/%6ld DL=%3d TO=%5.0ld ES=%4d",
* thisuser.realname,thisuser.phone,thisuser.bbstype,
thisuser.downloaded,thisuser.dk,thisuser.dsl,
((long) ((thisuser.timeon+timer()-timeon)/60.0)),
thisuser.emailsent+thisuser.emailnet);
outs(ol);
Note that in both cases you will only have 6 or 7 letters of the bbstype
showing. That's because there is simply no space for expanding to the
required 10 letters. But you will see enough of it to know what it is, right?
------------------------------------------------------------------------------
And that's it! That's all you need to have a means of keeping track of your
visiting sysops. I thought of getting it to acccept the Net/Link node
numbers, too, but changed my mind.
Disclaimer: No problems so far. Would be happy to hear any problems. This
is my biggest mod to date. I'm really impressed with myself. It's not my
fault if:
Your motherboard loses the smoke that makes it run;
Your users scream at you for keeping the board down while you install
this mod;
The BBS starts throwing random garbage on the screen;
Your computer comes in contact with Elvis (who needs boats);
Or any other sort of random system crash that could happen with or
without this mod.
Filo #1 @5252
Thu Mar 15 11:29:55 1990
Tuck #1 @3652
Sun Mar 04 22:07:01 1990
Auto-validation of WWIV SysOps
by MrBill
If you put in the mod right before this one, just put this after the last line
of it. if not, then you will be searching for input_ansistat() and put this
right after it. This is all in NEWUSER.C in void newuser.
nl(); /* add */
prt(5,"Are you currently a WWIV SysOp?"); /* add */
if (yn()){ /* add */
pl("Please enter your BBS name and number"); /* add */
outstr(":"); /* add */
inputl(thisuser.note,40); /* add */
sysoplog("#*#*#* Auto-validation of WWIV SysOp"); /* add */
thisuser.sl=60; /* put the security level that you want here */
thisuser.dsl=60; /* put the d/l security level that you want here */
thisuser.exempt=1; /* put if you want exempt from d/l ration */
thisuser.restrict=0; /* put if no restrictions */
thisuser.ar=12; /* see note */ /* add */
thisuser.dar=12; /* see note */ /* add */
nl(); /* add */
prt(1,"You have just been validated as a visiting ");/* add */
prt(1,"WWIV sysop. If I find any of ");nl(); /* add */
prt(1,"this info to be false, I will delete you "); /* add */
prt(1,"and inform others about you."); /* add */
nl(); /* add */
nl(); /* add */
pausescr(); /* add */
} /* add */
}
if (!hangup)
NOTE: the AR's and DAR's are bitmaped. I have my bbs set up for if you are
a WWIV sysop, you get the AR and DAR of C and D, and normal (non-WWIV) sysops
just get D for their AR and DAR to access my sysop sub. To figure out what
number to assign for the AR's and DAR's in autovalidation look at the
following chart and then figure out (with a hex to dec calculator or if
your smart enough in your head) what the decimal value would be for the
hexidecimal number that you need. And thanks to Gord the Rogue who explained
all this to me awhile ago.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| | | | | | | | | | | | | | | |
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
| | | | | | | | | | | | | | | |
A B C D E F G H I J K L M N O P
so if you need your AR to be just A for sysop the number would be:
1000000000000000
or for the AR to be set to C and M it would be:
1010000000001000
the DAR's are done the same way
(if anyone has a hex to deci conversion program please send it to me!)