TDL06C.MOD - Unabortable Forced Q-Scan - WWIV 4.23 ``The Dragon Lord`` WWIVnet #1 AT 2575 Tue Dec 28 09:41:01 1993 0R: net33: @9 (via @22) [21:52 01/04/94] 0R: net33: @22 (via @7) [21:33 01/04/94] 0R: net33: @7 (via @8) [19:30 01/02/94] 0R: net33: @8 (via @1) [18:32 01/02/94] 0R: net33: @15 [17:10 01/02/94] 0R: net33: @4062 (via @4064) [09:26 01/02/94] 0R: net33: @4064 (via @1040) [06:34 01/02/94] 0R: net33: @1040 (via @2050) [01:43 12/29/93] 0R: net34: @2050 [00:05 12/29/93] 0R: net34: @2050 (via @1040) [00:05 12/29/93] 0R: net33: @1040 (via @2558) [01:04 12/29/93] 0R: net33: @2558 (via @2575) [13:15 12/28/93] 0R: net33: @2575 [10:27 12/28/93] Ŀ Mod Name: TDL06C.MOD Mod Author: The Dragon Lord Difficulty:۲ Date: 12/26/93 Version: 2.01 Re-written for WWIV Version: 4.23 Originally Written for WWIV Version: 4.22 Original Release Date: 02/12/93 Version: 1.01 Revised: 02/24/93 Version: 1.02 Files affected: VARS.H LILO.C COM.C MSGBASE.C MSGBASE1.C Description : This MOD forces users to scan the first message base as listed in //BOARDEDIT. It also will not let them abort or Quit, Bypass, or Express scan until they have read ALL messages. Ŀ Extended Description : This mod will allow users to backtrack thru the messages but will not allow them to jump thru them: for example, there are 15 messages and the user is on message 5, they cannot hit 15 and go to the end, however, they will go to the next unread message. This mod will also turn on the pause, so that the messages wont fly right by the screen. It also disables the Ctrl-Y pause toggle during a Forced Q-Scan. ͻ ͻ SPECIAL NOTES TO READ FIRST ͼ NOTE #1 : Some of this code involves re-writting case statements in order to make use of the #define OPT_FORCED_QSCAN variable. So when replacing a case statement delete everything from case 'Whatever': ... break; I've included both (case 'Whatever':) and (break;) in all of my code. NOTE #2 : With the exception of VARS.H all of the STEP sub-letters (ie: STEP 1a, STEP 1b) mean you are still working in the same procedure (or void, or int,...). If the STEP number changes (ie: STEP 1, STEP 2) your going to be working on a different procedure, NOT necessarily a different file. NOTE #3 : I recommend that you keep the "MUST READ MESSAGES" to between 5 and 10, because if one instance is in the first message base and someone logs onto the second instance they will be in a wait loop until the first instance has cleared this message base. NOTE #4 : I have included line numbers, so if you are installing this into a virgin source all you have to do is goto the line numbers and add, change, or delete the proper lines. The line numbers follow this installation, so if you start in the middle they wont be correct. I have also included all comments in the line number calculations, so if you don't include them the numbers wont be correct either. ͼ DISCLAMER : This Modification has NO Warranty implied or otherwise. This MOD works fine on my board so if your having any problems with it contact me and I'll see what I can do to help. Contact information at the end of this file. /************************************** * STEP #1 * * BACKUP YOUR SOURCE!!!!! * **************************************/ ie. Pkzip -u wwivsrc *.c *.h *.mak /************************************** * STEP #2 * * File: VARS.H * **************************************/ OPEN VARS.H GOTO LINE: 108 /* See NOTE #4 */ FIND: __EXTRN__ unsigned short com_speed, *csn_index, crc, *gat, modem_flag, modem_mode, modem_speed, net_sysnum, curloc; ADD THIS RIGHT ABOVE IT: This will go from line 108 to line 112 /* See NOTE #4 */ /* This is the Global Boolean variable to determine if the * Q-Scan is a Forced Q-Scan or not. */ __EXTRN__ int noabort; /************************************** * STEP #2a * * File: VARS.H * **************************************/ GOTO LINE: 283 /* See NOTE #4 */ FIND: /* If #defined, allows use of FSED for transfer area extended descriptions */ /* #define OPT_FSED_EXT_DESC */ ADD THIS RIGHT AFTER IT: This will go from line 283 to line 289 /* See NOTE #4 */ /* If #defined, it will check for new messages in the first message base, * if there are any new messages it will show them to the user. It will * NOT allow them to abort reading them, and they will NOT be able to * remove the first message base from their Q-Scan. */ #define OPT_FORCED_QSCAN /************************************** * STEP #2b * * File: VARS.H * **************************************/ GOTO LINE: 363 /* See NOTE #4 */ FIND: #ifdef OPT_EXTRA_COLOR " XCOLOR" #endif ADD THIS RIGHT AFTER IT: This will go from line 363 to line 368 /* See NOTE #4 */ /* This will be added to the Options string seen when * doing a //VER from the mainmenu. */ #ifdef OPT_FORCED_QSCAN " FORCED_QSCAN" #endif CLOSE VARS.H /************************************** * STEP #3 * * File: LILO.C * **************************************/ OPEN LILO.C GOTO LINE: 270 /* See NOTE #4 */ FIND: void logon(void) FIND: #ifdef OPT_REGISTRATION long l; #endif ADD THIS RIGHT AFTER IT: This will go from line 270 to line 278 /* See NOTE #4 */ /* This Local Boolean variable is used to keep track of the * pause_on_page variable. If the user normally keeps the * pause turned off this will ensure that it is returned to * that state after a Forced Q-Scan has been completed. */ #ifdef OPT_FORCED_QSCAN int tempory_pause; #endif /************************************** * STEP #3a * * File: LILO.C * **************************************/ GOTO LINE: 645 /* See NOTE #4 */ FIND: if ((incom) || (sysop1())) broadcast(get_string(1172)); setiia(90); ADD THIS RIGHT AFTER IT: This will go from line 645 to line 670 /* See NOTE #4 */ /* This section of code will * 1. Make sure that the user is not the Sysop and that * it's an incomming call (NOT the Local Keyboard). * 2. Write the instance information. * 3. Check the users pause_on_page variable, if it's off * it will turn it on, and reset it to off after the * Forced Q-Scan. * 4. Do the Forced Q-Scan. */ #ifdef OPT_FORCED_QSCAN if (!(so()) && (incom)) { /* Sysop's And Local Logon Users */ /* Excluded From Forced Q-Scan */ write_inst(INST_LOC_SUBS,usub[cursub].subnum,INST_FLAGS_ONLINE); tempory_pause = 0; if (!(thisuser.sysstatus & sysstatus_pause_on_page)) { tempory_pause = 1; thisuser.sysstatus ^= sysstatus_pause_on_page; } noabort = 1; qscan(0,0); noabort = 0; if (tempory_pause == 1) thisuser.sysstatus ^= sysstatus_pause_on_page; } #endif CLOSE LILO.C /************************************** * STEP #4 * * File: COM.C See NOTE #1 * **************************************/ OPEN COM.C GOTO LINE: 851 /* See NOTE #4 */ FIND: void skey1(unsigned char *ch) DELETE lines 851 thru 853 /* See NOTE #4 */ case 25: ... break; WITH THIS: This will go from line 851 to line 860 /* See NOTE #4 */ case 25: /* This will disable the Ctrl-Y pause toggle during a Forced Q-Scan. */ #ifdef OPT_FORCED_QSCAN if (noabort == 0) thisuser.sysstatus ^= sysstatus_pause_on_page; #else thisuser.sysstatus ^= sysstatus_pause_on_page; #endif break; CLOSE COM.C /************************************** * STEP #5 * * File: MSGBASE.C See NOTE #1 * **************************************/ OPEN MSGBASE.C GOTO LINE: 1675 /* See NOTE #4 */ FIND: void read_message1(messagerec *m1, char an, int readit, int *next, char *fn) FIND: default: case 0: DELETE lines 1675 thru 1695 /* See NOTE #4 */ case 0: ... break; WITH THIS: This will go from line 1675 to line 1739 /* See NOTE #4 */ case 0: #ifdef OPT_FORCED_QSCAN if (noabort == 0) { osan(get_string(STR_1002),&abort,next); #ifndef OPT_EXTRA_COLOR ansic(MSG_COLOR); #endif plan(n,&abort,next); strcpy(irt_name,n); osan(get_string(STR_661),&abort,next); #ifndef OPT_EXTRA_COLOR ansic(MSG_COLOR); #endif plan(d,&abort,next); if (origin_str[0]) { osan(get_string(STR_662),&abort,next); plan(origin_str,&abort,next); } if (origin_str2[0]) { osan(get_string(STR_1008),&abort,next); plan(origin_str2,&abort,next); } } else { npr(get_string(STR_1002)); #ifndef OPT_EXTRA_COLOR ansic(MSG_COLOR); #endif pl(n); strcpy(irt_name,n); npr(get_string(STR_661)); #ifndef OPT_EXTRA_COLOR ansic(MSG_COLOR); #endif pl(d); if (origin_str[0]) { npr(get_string(STR_662)); pl(origin_str); } if (origin_str2[0]) { npr(get_string(STR_1008)); pl(origin_str2); } } #else osan(get_string(STR_1002),&abort,next); #ifndef OPT_EXTRA_COLOR ansic(MSG_COLOR); #endif plan(n,&abort,next); strcpy(irt_name,n); osan(get_string(STR_661),&abort,next); #ifndef OPT_EXTRA_COLOR ansic(MSG_COLOR); #endif plan(d,&abort,next); if (origin_str[0]) { osan(get_string(STR_662),&abort,next); plan(origin_str,&abort,next); } if (origin_str2[0]) { osan(get_string(STR_1008),&abort,next); plan(origin_str2,&abort,next); } #endif break; /************************************** * STEP #5a * * File: MSGBASE.C See NOTE #2 * **************************************/ GOTO LINE: 1868 /* See NOTE #4 */ FIND & DELETE line 1868 /* See NOTE #4 */ osan(" ",&abort,next); WITH THIS: This will go from line 1868 to line 1875 /* See NOTE #4 */ #ifdef OPT_FORCED_QSCAN if (noabort == 0) osan(" ",&abort,next); else npr(" "); #else osan(" ",&abort,next); #endif /************************************** * STEP #5b * * File: MSGBASE.C See NOTE #2 * **************************************/ GOTO LINE: 1882 /* See NOTE #4 */ FIND & DELETE line 1882 /* See NOTE #4 */ osan(s,&abort,next); WITH THIS: This will go from line 1882 to line 1889 /* See NOTE #4 */ #ifdef OPT_FORCED_QSCAN if (noabort == 0) osan(s,&abort,next); else npr("%s",s); #else osan(s,&abort,next); #endif /************************************** * STEP #5c * * File: MSGBASE.C See NOTE #2 * **************************************/ GOTO LINE: 1902 /* See NOTE #4 */ FIND & DELETE line 1902 /* See NOTE #4 */ checka(&abort,next); WITH THIS: This will go from line 1902 to line 1907 /* See NOTE #4 */ #ifdef OPT_FORCED_QSCAN if (noabort == 0) checka(&abort,next); #else checka(&abort,next); #endif /************************************** * STEP #6 * * File: MSGBASE.C * **************************************/ GOTO LINE: 2020 /* See NOTE #4 */ FIND: void read_message(int n, int *next, int *val) FIND & DELETE line 2020 /* See NOTE #4 */ osan(s,&abort,next); WITH THIS: This will go from line 2020 to line 2027 /* See NOTE #4 */ #ifdef OPT_FORCED_QSCAN if (noabort == 0) osan(s,&abort,next); else npr("%s",s); #else osan(s,&abort,next); #endif /************************************** * STEP #6a * * File: MSGBASE.C See NOTE #2 * **************************************/ GOTO LINE: 2037 /* See NOTE #4 */ FIND & DELETE line 2037 /* See NOTE #4 */ osan(s,&abort,next); WITH THIS: This will go from line 2037 to line 2044 /* See NOTE #4 */ #ifdef OPT_FORCED_QSCAN if (noabort == 0) osan(s,&abort,next); else npr("%s",s); #else osan(s,&abort,next); #endif /************************************** * STEP #6b * * File: MSGBASE.C See NOTE #2 * **************************************/ GOTO LINE: 2051 /* See NOTE #4 */ FIND & DELETE line 2051 /* See NOTE #4 */ plan(p.title,&abort,next); WITH THIS: This will go from line 2051 to line 2058 /* See NOTE #4 */ #ifdef OPT_FORCED_QSCAN if (noabort == 0) plan(p.title,&abort,next); else pl(p.title); #else plan(p.title,&abort,next); #endif CLOSE MSGBASE.C /************************************** * STEP #7 * * File: MSGBASE1.C * **************************************/ OPEN MSGBASE1.C GOTO LINE: 375 /* See NOTE #4 */ FIND: void scan(int msgnum, int optype, int *nextsub) { char s[161],s1[81],*b,*ss1, *toval; int i,i1,i2,done,quit,abort,next,val,realexpress,f; int title_lines; ADD THIS RIGHT AFTER IT: This will go from line 375 to line 384 /* See NOTE #4 */ /* This is a Local Boolean Variable to keep track of the * messages that have been showed to the user. If there * are 10 messages and the user has only seen 1 thru 5, the * next one they will see is 6. If the user tries to enter * 10 to goto the last message they will only advance to * number 6. */ #ifdef OPT_FORCED_QSCAN int pointer = msgnum; #endif /************************************** * STEP #7a * * File: MSGBASE1.C See NOTE #2 * **************************************/ GOTO LINE: 452 /* See NOTE #4 */ FIND & DELETE lines 452 thru 455 /* See NOTE #4 */ if ((i!=0) && (i<=nummsgs) && (i>=1)) { optype=2; msgnum=i; } else WITH THIS: This will go from line 452 to line 474 /* See NOTE #4 */ #ifdef OPT_FORCED_QSCAN if (msgnum>=pointer) pointer = msgnum; if ((i!=0) && (i<=nummsgs) && (i>=1)) { if (noabort == 0) { optype=2; msgnum=i; } else { if (i<=msgnum+1) { optype=2; msgnum=i; } else { optype=2; msgnum=pointer+1; } } } else #else if ((i!=0) && (i<=nummsgs) && (i>=1)) { optype=2; msgnum=i; } else #endif /************************************** * STEP #7a See NOTE #1 * * File: MSGBASE1.C See NOTE #2 * **************************************/ GOTO LINE: 477 /* See NOTE #4 */ FIND & DELETE lines 477 thru 491 /* See NOTE #4 */ case 'Q': case 'B': case 'T': WITH THESE: This will go from line 477 to line 514 /* See NOTE #4 */ case 'Q': #ifdef OPT_FORCED_QSCAN if (noabort == 0) { quit=1; done=1; *nextsub=0; } #else quit=1; done=1; *nextsub=0; #endif break; case 'B': #ifdef OPT_FORCED_QSCAN if (noabort == 0) { if (*nextsub!=0) { *nextsub=1; done=1; quit=1; } } #else if (*nextsub!=0) { *nextsub=1; done=1; quit=1; } #endif break; case 'T': #ifdef OPT_FORCED_QSCAN if (noabort == 0) optype=1; #else optype=1; #endif break; /************************************** * STEP #7b See NOTE #1 * * File: MSGBASE1.C See NOTE #2 * **************************************/ GOTO LINE: 558 /* See NOTE #4 */ FIND & DELETE lines 558 thru 560 /* See NOTE #4 */ case 'C': WITH THESE: This will go from line 558 to line 565 /* See NOTE #4 */ case 'C': #ifdef OPT_FORCED_QSCAN if (noabort == 0) express=1; #else express=1; #endif break; /************************************** * STEP #8 * * File: MSGBASE1.C See NOTE #3 * **************************************/ GOTO LINE: 948 /* See NOTE #4 */ FIND: void qscan(int bn, int *ns) FIND & DELETE lines 948 thru 952 /* See NOTE #4 */ if (!iscan(cursub)) { nl(); pl(get_string(1195)); return; } WITH THIS: This will go from line 948 to line 973 /* See NOTE #4 */ /* This checks to see if someone else is reading * the message base your trying to do a Forced Q-Scan * on. If someone on another instance is in this * message base this will wait till they are finished */ #ifdef OPT_FORCED_QSCAN if (!iscan(cursub)) { if (noabort == 0) { nl(); pl(get_string(1195)); return; } else { pl("Please Wait...."); pl("Waiting for the another instance to clear"); do { checkhangup(); } while((!iscan(cursub)) && (!hangup)); } } #else if (!iscan(cursub)) { nl(); pl(get_string(1195)); return; } #endif /************************************** * STEP #8a * * File: MSGBASE1.C See NOTE #2 * **************************************/ GOTO LINE: 976 /* See NOTE #4 */ FIND & DELETE lines 976 thru 979 /* See NOTE #4 */ sprintf(s,"< %s %s %s - %u %s >",get_string(692), subboards[curlsub].name, usub[cursub].keys,nummsgs, "msgs"); prt(1,s); nl(); WITH THIS: This will go from line 976 to line 989 /* See NOTE #4 */ #ifdef OPT_FORCED_QSCAN if (noabort == 0) { sprintf(s,"< %s %s %s - %u %s >",get_string(692), subboards[curlsub].name, usub[cursub].keys,nummsgs, "msgs"); prt(1,s); nl(); } #else sprintf(s,"< %s %s %s - %u %s >",get_string(692), subboards[curlsub].name, usub[cursub].keys,nummsgs, "msgs"); prt(1,s); nl(); #endif /************************************** * STEP #8b * * File: MSGBASE1.C See NOTE #2 * **************************************/ GOTO LINE: 1002 /* See NOTE #4 */ FIND & DELETE lines 1002 thru 1003 /* See NOTE #4 */ sprintf(s,"< %s %s >",subboards[curlsub].name, get_string(693)); prt(1,s); WITH THIS: This will go from line 1002 to line 1010 /* See NOTE #4 */ #ifdef OPT_FORCED_QSCAN if (noabort == 0) { sprintf(s,"< %s %s >",subboards[curlsub].name, get_string(693)); prt(1,s); } #else sprintf(s,"< %s %s >",subboards[curlsub].name, get_string(693)); prt(1,s); #endif /************************************** * STEP #8c * * File: MSGBASE1.C See NOTE #2 * **************************************/ GOTO LINE: 1012 /* See NOTE #4 */ FIND & DELETE lines 1012 thru 1013 /* See NOTE #4 */ sprintf(s,"< %s %s %s >",get_string(694), subboards[sn].name, usub[bn].keys); prt(1,s); WITH THIS: This will go from line 1012 to line 1022 /* See NOTE #4 */ #ifdef OPT_FORCED_QSCAN if (noabort == 0) { sprintf(s,"< %s %s %s >",get_string(694), subboards[sn].name, usub[bn].keys); prt(1,s); } #else sprintf(s,"< %s %s %s >",get_string(694), subboards[sn].name, usub[bn].keys); prt(1,s); #endif CLOSE MSGBASE1.C /************************************** * STEP #9 * * COMPILE!!! * **************************************/ If there any questions or suggestions we can be reached at: TH DRG's D 1-2=3* 6<< 7TH DRG RD 6>> 3*2=1-0 (215)882-1415 1Fantasy 6Warez 3Ink.0 WWIVNet 1@2575 On January 8, 1994 my area code will be changed to (610) 1 2 1͸ ͸ ͸ 3 12(72152)78822-714151;7TH DRG'S D1;5Bethlehem, PA1 4 1͸ 0 2WWIVNet0 3@225750 1 ͸ 5 17WWIV v4.211͸3144005/396005/324005/31200bps 2MNP 722-751͵7v.2323/7v.342bis1 6 1; ; ; 70