home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
SYSOP
/
MODS1.ZIP
/
CTITLES.MOD
< prev
next >
Wrap
Text File
|
1993-12-22
|
10KB
|
267 lines
Color Titles For Msgs & Email
By: Lt. Hytiek #1@3504
The Morgue BBS
305-435-8810
This mod took me about 30 seconds to figure out, and will take you
about 30 seconds to implant within your source code. First, load
up your MSGBASE.C file, and search for 'void inmsg' go down till
you reach the code below... and follow the steps...
Also... If you are using the CUSS MOD, the users will NOT be able
to cuss within the titles! To use the color within the titles...
Just act like you are typing a msg, (^P#).
*****************************************************************************/
== Original Code
-- Code to delete
++ Code to add
== for (i=0; i<maxli; i++)
== lin[i*LEN]=0;
== ro[0]=0;
==}
==nl();
==helpl=6;
==if (okansi()) {
== outstr("\x1b[2J");
== prt(2,"Title: "); /*4.23 has a number instead of Title*/
-- mpl(60); /* Delete this line */
-- inputl(title,60); /* Delete this line */
++ inli(title,ro,70,1); /* Add this line */
==} else {
== outstr("\x1b[2J");
== pl(" (---=----=----=----=----=----=----=----=----=----=----=----)");
== outstr("Title: "); /* NOTE 1 */
-- inputl(title,60); /* Delete this line */
++ inli(title,ro,70,1); /* Add this line */
==}
==============================================================================
NOTE 1: in this line, and the one above, 4.23 calls external strings
/***************************************************************************
Now search down to this section of code:
***************************************************************************/
== if (stricmp(s,"/TI")==0) {
== savel=0;
== helpl=26;
== if (okansi()) {
== prt(2,"Title: "); /* 4.23 calls ext string again */
-- mpl(60); /* Delete this line */
-- inputl(title,60); /* Delete this line */
++ inli(title,ro,70,1); /* Add this line */
== } else {
== pl(" (---=----=----=----=----=----=----=----=----=----=----=-
---)"); /* Another string call here */
== outstr("Title: "); /* And here */
-- inputl(title,60); /* Delete this line */
++ inli(title,ro,70,1); /* Add this line */
== }
== pl("Continue...");
== nl();
/***************************************************************************
Thats it! Your done... Told ya it was simple... If you enjoy
this mod, then contact 1@3504 that you're using it. Hopefully
you won't find ANY bugs... Well. Take care and have fun!
***************************************************************************
╒════════════════════════════════════════════════════════════════════════════╕
│ Mod Name : Enhanced Auto-Message Mod Author: Reanimator #220 │
│ @4057 WWIVnet │
│ Difficulty : Easy Date : 07DEC93 │
│ │
│ WWIV Ver. : 4.23 ONLY! Filename : REAN01.423 │
│ │
│ Description: This modification replaces two voids in misccmd.c │
│ that control automessage writing. It allows the sysop │
│ or co/sysop to lock the auto-message, delete the │
│ automessage, and unlock the automessage. It also allows │
│ 5 lines of 70 columns WITH color during writes. │
│ This mod does in no way affect the streamlining of the BBS. │
│ Locking the automessage means nobody without a 100+ sl can │
│ write the automessage. Deletion of the Automessage will │
│ just give the users a "No auto-message" at logon. │
│ If the message is locked, does not affect users restrictions │
╘════════════════════════════════════════════════════════════════════════════╛
Instructions:
Either replace/add the lines commented with /* MOD */
or delete the existing two voids and block copy
these two in place of those existing.
* Start of Code *
_____________________________________________________________________________
void write_automessage1(void)
{
int i,i1,f;
char s[81],l[6][81],ro[81]; /* MOD */
slrec ss;
ro[0]=0; /* MOD */
nl();
pl(get_string(484));
nl();
for (i=0; i<5; i++) { /* MOD */
npr("%d:",i+1);
inli(&(l[i][0]),ro,70,1); /* MOD */
strcat(&(l[i][0]),"\r\n");
}
nl();
ss=syscfg.sl[actsl];
if (ss.ability & ability_post_anony) {
prt(5,get_string(485));
if (yn())
i1=anony_sender;
else
i1=0;
} else
i1=0;
prt(5,get_string(438));
if (yn()) {
lock_status();
status.amsganon=i1;
status.amsguser=usernum;
save_status();
sprintf(s,"%sAUTO.MSG",syscfg.gfilesdir);
f=sh_open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
strcpy(s,nam(&thisuser,usernum));
strcat(s,"\r\n");
sh_write(f,(void *)s,strlen(s));
for (i=0; i<5; i++) /* MOD */
sh_write(f,(void *)&(l[i][0]),strlen(&(l[i][0])));
sysoplog(get_stringx(1,24));
for (i=0; i<5; i++) { /* MOD */
strcpy(s," ");
l[i][strlen(&(l[i][0]))-2]=0;
strcat(s,&(l[i][0]));
sysoplog(s);
}
nl();
pl(get_string(486));
nl();
sh_close(f);
}
}
void write_automessage(void)
{
char ch,s[81],s2[81]; /* MOD */
int done,okwrite;
slrec ss;
FILE *lock_auto; /* MOD */
ss=syscfg.sl[actsl];
if (ss.posts)
okwrite=1;
else
okwrite=0;
if (thisuser.restrict & restrict_automessage)
okwrite=0;
done=0;
sprintf(s,"%sLOCKAUTO.MSG",syscfg.gfilesdir); /* MOD */
if (exist(s)) /* MOD */
okwrite=0; /* MOD */
sprintf(s2,"%sAUTO.MSG",syscfg.gfilesdir); /* MOD */
do {
nl();
if (cs()) { /* MOD */
prt(2,"Q:uit, R:ead, A:uto-reply, W:rite, L:ock, D:el, U:nlock > ");
ch=onek("QRWALDU"); /* MOD */
} else if (okwrite) { /* MOD */
prt(2,"Q:uit, R:ead, A:uto-reply, W:rite > "); /* MOD */
ch=onek("QRWA"); /* MOD */
} else { /* MOD */
prt(2,"Q:uit, R:ead, A:uto-reply > "); /* MOD */
ch=onek("QRA"); /* MOD */
} /* MOD */
switch(ch) {
case 'Q':
done=1;
break;
case 'R':
read_automessage();
break;
case 'W':
write_automessage1();
break;
case 'A':
grab_quotes(NULL, NULL);
read_status();
if (status.amsguser)
email(status.amsguser,0,0,status.amsganon);
break;
case 'D': /* MOD */
nl(); /* MOD */
prt(5,"Delete Auto-Message? "); /* MOD */
if (yn()) /* MOD */
unlink(s2); /* MOD */
nl(); /* MOD */
break; /* MOD */
case 'L': /* MOD */
if (exist(s)) { /* MOD */
nl(); /* MOD */
prt(2,"Message is already locked.\r\n"); /* MOD */
nl(); /* MOD */
} else { /* MOD */
outstr("Lock Auto-message? "); /* MOD */
if (yn()) { /* MOD */
lock_auto=fopen(s,"w+t"); /* This makes a file */
fputc(' ',lock_auto); /* in your GFILES dir */
fclose(lock_auto); /* 1 bytes long, to tell */
} /* the board if it is */
} /* locked or not. */
break; /* It consists of a space */
case 'U': /* MOD */
if (!exist(s)) /* MOD */
pl("Message not locked."); /* MOD */
else { /* MOD */
prt(5,"Unlock message? "); /* MOD */
if (yn()) /* MOD */
unlink(s); /* MOD */
} /* MOD */
break; /* MOD */
}
} while ((!done) && (!hangup));
}
_____________________________________________________________________________
* End of Code *
If you use this mod I would really appreciate it if you drop me a line
telling me you did! Any questions or comments feel free to Email me.
My WWIVnet address is at the top of the message.
Reanimator, Baltimore MD
9OK, this one works fine... you can lock out anyone with less than a 100 SL from0
9writing the automessage... just delete the two old automessage voids, and block0
9in the two new ones... I have an automessage mod that gives you 9 lines, full0
9screen width, and all 9 colors, but you can't lock it... if ya want that one,0
9I'll send it to ya...0