RATMAN04.MOD - CBV designed for 4.22 Rat Man #1 @6255 Tue Mar 30 21:04:45 1993 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Mod Name: RATMAN04.MOD Mod Author: RAT MAN 1@6255 ICEnet ³ ³ Difficulty: Bah, humbug Date: 03/28/93 ³ ³ WWIV Version: 4.22 ³ ³ Description: BBS will call new user back for auto validation provided they ³ ³ are within a SysOp defined calling range. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ DISCLAIMER: I didn't do it, nobody saw me do it, you can't prove anything! This MOD was originally made by Goose. In turn, Ed O'Brien fixed it to work with WWIV 4.20. Then, I modified it to take advantage of the new features in WWIV 4.22, such as the data phone number, and added a few extras (Such as the optional step 5). If you do not want the BBS to call the data phone number or you don't have the extended user info enabled, you have two options. You can enable the extended user info (In the second case only) or you can fix it yourself. Just change all occurrences of thisuser.dataphone to thisuser.phone. Then change the text to fit the change appropriately. 60% of the credit goes to Goose, 10% to Ed O'Brien, and 30% to me for this MOD. This will also partially cover the new ESM standard. Of course, use the generic legend: + Add line % Existing line -- QUOTE FROM GOOSE -- This mod is based on one seen on WWIVnet by Carpenter that did something very similar, but I think this one is a little more flexible as the sysop can define the area codes and phone prefixes that are allowed to have callback validation. In metro areas like DC a call to another area code can be local, while in most places there are calls inside your area code that are charged as long distance. NOTE: One thing this mod assumes is that even if the area code is different, that there is no need to dial it as a prefix since the number is local. This is the way the DC area works, but I'm not sure about some others. ------ END QUOTE ----- STEP 1: LOAD UP NEWUSER.C. Read this code in just before void newuser(): void check_auto_validate() /* mod - add entire void */ { int ok,f,i; char s[161],s1[81]; long p,l; ok=0; strncpy(s1,thisuser.dataphone,7); s1[7]=0; strcpy(s,syscfg.gfilesdir); strcat(s,"CALLBACK.TXT"); f=open(s,O_RDWR | O_BINARY); if (f<0) return; lseek(f,0L,SEEK_SET); l=filelength(f); p=0; while ((p10)) % upload_post(); + if (strcmp(s,"VALIDATE")==0) check_auto_validate(); % if (strcmp(s,"QSCAN")==0) { % nl(); % prt(5,get_string(24)); STEP 4: LOAD UP MODEM.C Insert the following function after void pr1(unsigned char *s): void pr2(unsigned char *s) { int i; for (i = 0; s[i] > 0; i++) { if (s[i] == 123) /* Checks for { */ outcomch(13); /* Outputs RETURN if { is found */ else if ((s[i] == 255) || (s[i] == 126)) /* Checks for ASCII 255 or ~ */ wait1(9); /* Waits if either is found */ else /* But if neither are found */ outcomch(s[i]); /* Just output the character */ } } STEP 5: (OPTIONAL) LOAD UP LILO.C Install this step if you want all unvalidated users to be offered the CBV every time you log on. This is perfect for having all your current users go through the CBV. Just simply lower their SL to unvalidated status and they will be offered to use the CBV. NOTE: Change the number 50 in (thisuser.sl<50) to any number greater than your unvalidated user SL. For instance, if any user with an SL less than 50 was considered unvalidated, then 50 would go there. Any user with an SL less than that number will be offered the use of the CBV. % void logon(void) % { % char s[255],s1[181],s2[81],*ss; % int i,i1,f; % long len,pos; % % if (usernum<1) { % hangup=1; % return; % } % % if (live_user) { % reset_colors(); % ansic(0); % outchr(12); + if (thisuser.sl<50) check_auto_validate(); /* RATMAN04.MOD */ % } % if (incom && live_user) { % i=printfile("LOGON"); % if ((!i) && (!(thisuser.sysstatus & sysstatus_pause_on_page))) % pausescr(); % } STEP 6: TYPE MAKE FCNS OR LOAD UP FCNS.H If you use the MAKE FCNS way you can skip the rest of this step. % /* File: newuser.c */ % % int check_name(char *nn); % void input_name(void); % void input_realname(void); % void input_callsign(void); % int valid_phone(char *phone); % void input_phone(void); % void input_street(void); % void input_city(void); % void input_state(void); % void input_country(void); % void input_zipcode(void); % void input_dataphone(void); % void input_sex(void); % void input_age(userrec *u); % void input_comptype(void); % void input_screensize(void); % void input_pw(void); % void input_ansistat(void); + void check_auto_validate(); /* RATMAN04.MOD */ % void newuser(void); Still in FCNS.H, change this too: /* File: modem.c */ % void pr1(unsigned char *s); + void pr2(unsigned char *s); /* RATMAN04.MOD */ % void get_modem_line(char *s, double d, int allowa); % void do_result(result_info *ri); % void process_full_result(char *s); % int mode_switch(double d, int allowa); % void holdphone(int d); % void imodem(int x); % void answer_phone(void); That's it for the source mods. You'll need to recompile the entire BBS because of the changes to FCNS.H. When that's complete, you'll need to create two files to put into your GFILES directory. The first is CALLBACK.TXT, and should include a one line entry for each valid area code/dialing prefix combination in your local area. These should be listed in the front of the phone book. For example, for St. Paul, Minnesota and the rest of the twin cities metro area, the following entries are valid (This is a partial list, the whole list is WAY too big, so don't use this!): 612-220 612-221 612-222 612-223 612-224 612-225 612-227 612-228 612-229 612-232 612-244 612-266 612-282 612-290 612-291 612-292 Finally, you'll need to create a file called CALLBACK.MSG. This describes to the user what is required from them if they want to be validated using callback. Mine is as follows: (NOTE: Typos have been fixed and some color added, as well as some rewording) ****************************************************************************** 1 It has been determined that your data phone number is within the local 1calling area. As of now you are unvalidated. You may use a call back system 1installed on this BBS to increase your access. 1 To do this, tell your modem to answer the phone by issuing the command 1"ATA" (without the quotes) once the phone starts ringing. Note that if you 1have a non-Hayes compatible modem, this command will be different. Do not 1answer the phone voice, or the modem will hang up. 1 You will then be asked for your password. If you fail to enter the 1password correctly, or if no connection is made on callback, your account 1will be deleted and you will have to re-register. 1 If you do not wish to do this, or you are at a different number than that 1shown in your account, please call back later when you are at the number you 1gave. If you are unable to use this system, please leave feedback to the 1SysOp explaining your problem and you will be validated manually. ****************************************************************************** That's it. Now your new callers won't have to wait so long before being validated, and you'll have the satisfaction of knowing that the number that they gave in their logon is valid (and have a reason to be cautious if they decided to skip the validation). Note: If the users want to get validated later they can type //VALIDATE at the main menu. If they use //VALIDATE and nothing happens, then their phone prefix is not in your CALLBACK.TXT.