home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
MODSUNKN.ZIP
/
CHATMOD1.MOD
< prev
next >
Wrap
Text File
|
1990-04-09
|
6KB
|
164 lines
Koren #1 @7314
Sat Apr 07 14:25:42 1990
RE: Page Request Mod
This mod is based on the CHATCALL mod by Gord the Rogue. I've made some
changes to give it a little bit of extra function:
The following is the basic idea of the original mod:
- The "screeching" sounds that were made by the chat call are replaced
by a series of tones (these can be customized by changing the sound(x)
statements in the code).
- The user must wait while the sysop is being paged, which lasts for 30
seconds max. This is to keep a user from turning on the Chat Call then
forgetting that it is turned on.
- If a user attempts to chat more than five times, he is automatically
logged off after receiving a message explaining why.
The following changes were made to the original:
- The user can abort the chat request by pressing SPACE
- The sysop can silence the chat bell (without the user knowing it) by
pressing F4.
- The bell will automatically be turned off if the sysop enters chat mode
by pressing F10 or Ctrl F10.
- The chat request reason will be properly displayed in the topscreen
information until the sysop turns off the chat call, the sysop accepts
the chat or the user logs off. It will not be turned off if the user
aborts the chat request or if the chat request ends normally; this is to
give the sysop a chance to see the chat reason even if the chat call has
ended (I can't always make it to my PC in 30 seconds).
- The chat count for logging off the user is reset whenever the sysop
accepts the chat (since the user probably has a valid reason for chatting
if the sysop accepts it).
Now for the mod itself. First load up BBSUTL.C and look at the variable
declarations. Add the following line:
(Note that = designates existing code, + designates new or modded code).
= extern unsigned int modem_speed,com_speed;
+ extern int page_reqs; /* mod - add */
Next, find void reqchat. Replace it in it's entirety with the one shown here.
+ void reqchat() /* mod - change entire void */
+ {
+ int ok,count,k,abtchat;
+ char s[81],ch;
+
+ nl();
+ nl();
+ ok=sysop2();
+ if (restrict_chat & thisuser.restrict)
+ ok=0;
+ if (ok) {
+ prt(2,"Reason: ");
+ inputl(s,70);
+ if (s[0]) {
+ strcpy(chatreason,"Chat: ");
+ strcat(chatreason,s);
+ chatcall=1;
+ nl();
+ sysoplog(chatreason);
+ for (ok=strlen(chatreason); ok<80; ok++)
+ chatreason[ok]=32;
+ chatreason[80]=0;
+ topscreen();
+ nl();
+ page_reqs++;
+ prt(2,"Sysop page will end in 30 seconds. Press [SPACE] to abort.");
+ nl(); nl();
+ prt(1,"Paging Sysop.");
+ count=0;
+ abtchat=0;
+ while ((count<60) && (!(abtchat)) && (page_reqs))
+ {
+ count ++;
+ prt(1,".");
+ if (chatcall) sound(2500); delay(125);
+ if (chatcall) sound(2600); delay(125);
+ if (chatcall) sound(2500); delay(125);
+ if (chatcall) sound(2600); delay(125);
+ ch=inkey();
+ switch (ch) {
+ case 3:
+ case 24:
+ case 32:
+ abtchat=1;
+ break;
+ }
+ }
+ nosound();
+ nl();
+ if (abtchat)
+ prt(1,"Sysop Page cancelled.");
+ else
+ prt(1,"Sysop Page deactivated.");
+ }
+ } else {
+ nl();
+ page_reqs++;
+ prt(2,"The sysop is not available - please use feedback instead.");
+ nl();
+ strcpy(irt,"Tried Paging.");
+ byline[0]=0;
+ imail(1,0);
+ }
+ if (page_reqs > 5) {
+ nl();
+ prt(3,"Page attempts limit exceeded...logging you off.");
+ hangup=1;
+ thisuser.ass_pts++;
+ strcpy(s,"### PAGING VIOLATION for ");
+ strcat(s,nam(&thisuser,usernum));
+ sl1(0,s);
+ }
+ }
Now, save BBSUTL.C and load CONIO.C. Make the following addition to the
variable declarations at the top of the file:
= extern int screenbottom,defscreenbottom;
+ extern int page_reqs; /* mod - add */
Next, again in CONIO.C, locate void skey(char ch). Make the following
changes:
= case 62: /* F4 */
= chatcall=0;
+ nosound(); /* mod - add */
= topscreen(0);
= case 68: /* F10 */
= if (chatting==0) {
+ page_reqs=0; /* mod - add */
+ nosound(); /* mod - add */
= if (syscfg.sysconfig & sysconfig_2_way)
= case 103: /* Ctrl-F10 */
+ if (chatting==0) { /* mod - change */
+ page_reqs=0; /* mod - add */
+ nosound(); /* mod - add */
= chat1("",0);
+ } else /* mod - change */
= chatting=0;
Save CONIO.C and load VARS.H. Add the declaration for the new variable as the
last line of the file:
+ int page_reqs; /* mod - add */
Finally, in the INIT program, turn the BEEP FOR CHAT option to NO (or you'll
still get those horrible beeps). It's a lot easier to turn it off here than
turn search through the code and make the mods. Recompile the BBS (since you
changed VARS.H, everything will be recompiled, or at least it should be).
That's about it. If you have any questions, you can reach me at The Twilight
Zone, 703-369-5225 (USR HST 9600), or E-Mail 1 @ 7312.
Goose
7/30/89