home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
MODSUNKN.ZIP
/
ECLBCK10.MOD
< prev
next >
Wrap
Text File
|
1990-08-05
|
14KB
|
378 lines
MODNET 9/10 -- Enhanced Callback
A large mod by T. Badd
═════════════════════════════════════════════════════════════════════════════
T Badd #1 @8750
Sun Mar 25 15:58:32 1990
╓────────────────────────────╖
║ Enhanced Auto-Callback ║
║ Validation Mod v1.0 ║
╙────────────────────────────╜
┌─────[ Modification Info ]─────┐
│ │
│ Filename: ECLBCK10.MOD (.ZIP) │
│ │
│ Difficulty Level: Beginner │
│ ->Novice <- │
│ Advanced │
│ Expert │
│ │
│ Approx. Time: 20 minutes │
└────────────────────────────────┘
A while back, there was a mod posted on the Modsnet by a person named
Carpenter #38 @3452. It was an Auto-Callback Validation mod. I was happy
to see that someone had finally written such a beast so my board could work
more like PCBored (groan!). When I started to add the mod into my source,
I found several things that I really didn't like about it...particularly
the fact that it used a batch file to store the user's validation info.
So, I set out to make this mod a little cleaner, and removed the batch
file portion of the code. While removing this, quite a bit of the code
was changed as well.
I give full credit for the "meat" of the code to Carpenter. Without his
initial mod, I still wouldn't have a working auto-callback function on
my system.
The system will first check for area code. If it is a local caller, it will
ask them if they would like to be auto-validated. If the user decides they
would like to be validated with the Auto-Callback function, the system will:
[1] - Get user's modem number.
Aborts on 0 (Operator) after 3 attempts for correct number.
Aborts on 911 after 3 attempts for correct number.
Aborts on 411 after 3 attempts for correct number.
[2] - BBS will disconnect.
Writes to Sysop log that BBS is attempting to autovalidate
user at modem number.
[3] - BBS calls user back at specified modem number.
[4] - Upon connection, BBS will ask user to re-enter password.
[5] - If password is incorrect, it will immediately drop carrier, and
recycle BBS.
[6] - If password is correct, it will write information to sysop log,
update user's SL and DSL to specified level, and put validated
modem number in user's Note.
[7] - BBS Resumes normal login process. User is still asked for validation
feedback so you can find out more about the person.
Pretty simple, huh? I thought so! Well, here's the mod. Be sure and pay
attention to the Legend below.
┌──────────────────────┐
│ L E G E N D │
│ ** existing code │
│ ++ add code │
│ -- delete code │
│ += change existing │
└──────────────────────┘
┌─────────┐
│ STEP 1: │
└─────────┘
Make a backup copy of your file, NEWUSER.C. This is the only file that
this mod affects...so you have no excuses not to make another copy in
case something screws up and doesn't work!
┌─────────┐
│ STEP 2: │
│ └───────┐
│ FILE: NEWUSER.C │
└─────────────────┘
At the top, in the external declarations, modify the code indicated:
** extern configrec syscfg;
+= extern int hangup,helpl; /* added helpl */
** extern char ctypes[NUM_CTYPES][18];
┌─────────┐
│ STEP 3: │
│ └───────┐
│ FILE: NEWUSER.C │
│ └────────┐
│ FUNCTION: void newuser() │
└──────────────────────────┘
At top of the function, make the following modifications:
**void newuser()
**{
** int i,ok;
+= char s[81],s1[81],s2[81],ch; /* added s2[81] */
** userrec u;
** userrec ur;
** long l1,l2;
-- sprintf(s,"*** NEW USER %s %s %s",date(),times(),curspeed);
-- sl1(0,"");
-- sl1(0,s); /* moving these lines to make for a cleaner sysop log */
** if (status.users>=syscfg.maxusers) {
┌─────────┐
│ STEP 4: │
└─────────┘
Further on down:
** case '8': input_screensize(); break;
** case '9': input_pw(); break;
** case 'A': input_street(); break; /* will only exist if */
** case 'B': input_citystate(); break; /* you have added the */
** case 'C': input_zip(); break; /* FROM mod. */
** }
** } while ((!ok) && (!hangup));
++ sprintf(s,"==# NEW USER - %s / %s / %s / %s",thisuser.name,
++ date(),times(),curspeed);
++ sl1(0,""); /* Gives you a little more info, and positions */
++ sl1(0,s); /* in a better place for the sysop log. */
++ /* Auto phone Validation mod */
++ strcpy(s1,"Normal-val");
++ if ((thisuser.phone[0]!='8') || (thisuser.phone[1]!='1')
++ ||(thisuser.phone[2]!='7')) /* Replace the 8,1,& 7 with your */
++ ok=0; /* area code's three digits. */
++ else {
++ nl();
++ helpl=49; /* See Step 5 */
++ printfile("CALLBACK.TXT");nl(); /* See Step 7 */
++ outstr("Register via Auto-Phone? ");
++ if (yn()) {
++ sysoplog("-+ Chose to be registered via Auto-Phone Callback. ");
++ printfile("REG.TXT"); /* See Step 8 */
++ pausescr();
++ i=0;
++ do {
++ ok=1;
++ pl("Enter your Modem phone number. [ Ex. 691-0603]: ");
++ outstr(": ");
++ input(s1,8);
++ if (strlen(s1)!=8)
++ ok=0;
++ if ((s1[3]!='-') || (s1[0]=='0'))
++ ok=0;
++ if ((s1[1]<'2'))
++ ok=0;
++ } while ((!ok) && (!hangup) && (i++<3));
++ if (!ok)
++ hangup=1;
++ else {
++ thisuser.sl=20; /* change these to your normal user */
++ thisuser.dsl=20; /* SL's and DSL's. */
++ nl();
++ prt(2,"Now hanging up to call back for validation. ");nl();
++ prt(3,"Remember to enter ATA when your phone rings.");nl();
++ dtr(0);
++ wait1(9);
++ dtr(1);
++ sprintf(s,"+++{~~~~atq1{~~~ath{~~~~~atdt %s{~~~~~",s1);
++ pr1(s);
++ wait1(350);
++ sprintf(thisuser.note,"Modem number %s",s1); /* user note */
++ hangup=0;
++ sprintf(s,"-+ %s attempting auto-validation at %s. ",
++ thisuser.name,s1);
++ sysoplog(s);
++ i=0;
++ do {
++ if (!cdet())
++ wait1(100);
++ } while ((!cdet()) && (i++<4));
++ }
++ }
++ }
++ if (!hangup) {
++ i=0;
++ do {
++ ok=0;
++ nl();
++ prt(3,"Please enter your password for verification: ");
++ outstr(": ");
++ echo=0;
++ input(s,8);
++ if (strcmp(s,thisuser.pw)==0)
++ ok=1;
++ } while ((!ok) && (!hangup) && (i++<3));
++ if (!ok)
++ hangup=1;
++ }
++ /* end main section of Auto Phone validation Mod */
** if (!hangup) {
** nl();
** pl("Please wait...");
** nl();
** read_user(0,&u);
** l1=(filelength(userfile)) / ((long) sizeof(userrec))-1;
** if (l1==(long) status.users) {
** usernum=status.users+1;
** } else {
** usernum=1;
** do {
** read_user(usernum,&u);
** if ((u.inact & inact_deleted)==0)
** ++usernum;
** } while (((u.inact & inact_deleted)==0) && ((long)usernum<=l1));
** }
** write_user(usernum,&thisuser);
** close_user();
** isr(usernum,thisuser.name);
-- ok=0;
++ itoa(usernum,s2,10);
++ if(strcmp(s1,"Normal-val")!=0) {
++ sprintf(s,"-+ %s #%s auto-validated at %s.",thisuser.name,s2,s1);
++ sysoplog(s);
++ }
** topscreen();
-- do {
** nl();
** nl();
** print("Your user number is ",itoa(usernum,s,10),".","");
** print("Your password is '",thisuser.pw,"'.","");
** nl();
** nl();
+= pl("Please write down this information.");
-- pl("re-enter your password for verification.");
** pl("You will need to know your password in");
** pl("order to change it to something else.");
** nl();
-- outstr(":"); /* They've already entered their */
-- echo=0; /* password, so no need to ask */
-- input(s,8); /* them to do it again. */
-- if (strcmp(s,thisuser.pw)==0)
-- ok=1;
-- } while ((!ok) && (!hangup));
++ pausescr(); /* Keep the message from zipping of the screen! */
** changedsl();
** if (incom) {
** if (printfile("FEEDBACK.MSG"))
** sl1(0,"#Aborted FEEDBACK.MSG");
** sprintf(irt,"Validation Feedback (%d slots left)",syscfg.maxusers-status.users);
┌─────────┐
│ STEP 5: │
└─────────┘
Now, press F2 and save NEWUSER.C, then press F9 to compile. Since all you
changed was NEWUSER.C, it shouldn't take very long.
┌─────────┐
│ STEP 6: │
└─────────┘
You will need to add the following lines into your HELP.MSG file in your
G-Files directory. This will allow your users to hit CTRL-O if they are
really stupid and need some more info on what the Auto-Phone function does.
WWIV in it's unmodified state supports 50 help screens. They are numbered
0-49, so we'll put this one as the last screen to avoid conflict with any
new ones that Wayne might come out with (he is currently up to 42).
At the bottom of HELP.MSG
`49=======================================================================
The Auto-Phone validation program is set up for local callers. It allows
a user to be validated for this BBS in less than 1 minute. To do this, the
program will ask you for your modem phone number (the one you are calling
with). It will then disconnect, and call your modem line. By setting your
modem to auto answer (AT S0=1) or by typing ATA when the phone rings, your
system will answer the call. You will then re-enter your password, and
upon verification, validated as a normal user.
┌─────────┐
│ STEP 7: │
└─────────┘
Create a file called CALLBACK.TXT in your Gfiles Directory with the
following information in it:
This system allows local callers to be
validated with the Auto-Phone 1 min.
callback program.
[ Ctrl-O for more info on this feature ]
┌─────────┐
│ STEP 8: │
└─────────┘
Create a file called REG.TXT in your Gfiles directory. It should contain
the following text (or something similar).
FILE: REG.TXT
[Ed.'s Note: The following has embedded WWIV color coding. I left it in
for those wishing to simply block-copy it into a separate file. For those
printing it out, just imagine each number is preceded with a ^C (or heart
symbol). --mtb]
1In a second, the system will ask you
1for your modem number. It will then
4DISCONNECT,1 and call you back.
1At that point it will be looking for
1another computer. Do NOT answer it
1VOICE!
1Once connected to your computer, it
1will then ask you for your password.
2If your password is correct, it will
2auto-validate you.
3 Make sure your Communication Program
3is in auto answer mode,4 Or type
4ATA 3 and hit enter when your phone
3rings.
┌────────────────────┐
│ STEP 9 (optional): │
└────────────────────┘
You may want to create a batch file that will store all your old logs
in a single ZIP file. I run the following batch file as part of my
daily event:
FILE: BKUPLOGS.BAT
CD \WWIV\GFILES
PKZIP BKUPLOGS 90*.LOG
This will need to be changed each year. The 90 represents the year, so when
next January rolls around, you'll need to change it to a 91. These logs
compress quite well, so you can have MONTHS of daily logs in this file
without fear of the file getting too large. Believe me, it's worth being
able to check back over them if you need to.
┌───────────┐
│ FINISHED: │
└───────────┘
That's it! Your local users should now be able to be auto-validated if
they are logging on as new. You also will have a copy of the number that
they called from. While this isn't as good as voice validating each and
every user...it might help you sleep a LITTLE better at night!
┌─────────────┐
│ DISCLAIMER: │
└─────────────┘
As usual, I accept no responsibility if this mod doesn't work on your
system. I've been running it on an IBM XT with a Hayes 9600 V-Series for
over 6 months without a hitch. If yours doesn't work, and it screws
everything up, go back to your backup of NEWUSER.C (you DID make a
backup, didn't you?!).
┌───────────┐
│ COMMENTS: │
└───────────┘
I'm starting to feel like the "Modder of Mods" these days. I apologize for
this. It's just that when you run out of ideas for new mods, you tend to
start working over old ones. Although my 'C' programming isn't exactly at
expert level (yet), it's not too bad. If any of you have any ideas for new
mods, let me know...I'm sure that we can work something out.
┌───────────┐
│ CONTACTS: │
└───────────┘
If you run into problems or spot a blatant error in the mod, please feel
free to E-Mail me, T BADD 1 @ 8750. I'll do all I can to help out.
TFB - 03/25/90