home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
SYSOP
/
MODS1.ZIP
/
CBDFLT.MOD
< prev
next >
Wrap
Text File
|
1995-06-12
|
13KB
|
411 lines
CBDFLT.MOD v1.3
Display your Defaults Section in Full Screen ANSI
For WWIV v4.23+
------------------------------------------------------------------------------
As always, you should backup your source code before using this mod. It
could save your butt if something goes wrong.
------------------------------------------------------------------------------
The idea for this mod came from looking at the generic default section
and wishing that it wasn't so generic. I've seen other mods for ANSI Default
Sections, but they either weren't good enough or added stuff I didn't want.
This mod is just what I wanted to find, but couldn't. I hope this mod is just
what you've been looking for also. I adopted the ansi, with a few changes,
from the French Mod Division. The mod itself is an original creation, using
other mods strictly for reference.
FIXED: Version 1.0 did not work correctly in Non-ANSI mode, this problem was
corrected in v1.1.
FIXED: Options in Non-ANSI mode did not correspond with those in ANSI, this
has been corrected in v1.2.
FIXED: In previous versions, the clear screen option only worked with public
messages. Starting with v1.3 it works with E-mail also.
>> If upgrading from v1.2 do Step 4, and in Step 6 add heart codes shown <<
>> in lines 391 and 398-1149. This will correct spacing problems and add <<
>> the clear screen option to E-Mail. You have now upgraded to v1.3 <<
/*Add*/ =Add this line
/*Change*/ =Change this line
/*Remove*/ =Remove this line
------------------------------------------------------------------------------
Step 1: Replace print_cur_stat() in DEFAULTS.C with the following...
NOTE: Make sure the string number in line 114 of this mod is the same
as the string number you add in Step 5.
void print_cur_stat(void)
{
userrec ur;
outchr(12);
if (okansi()) {
existprint("DEFAULT.ANS");
goxy(23,6);
npr("
%s",cur_lang_name);
goxy(63,6);
npr("%d X %d\r\n", thisuser.screenchars,thisuser.screenlines);
goxy(23,7);
npr("%s\r\n", (thisuser.sysstatus & sysstatus_ansi)?
((thisuser.sysstatus & sysstatus_color)? get_string(385):get_string(386)):
get_string(387));
goxy(63,7);
npr("%s\r\n",(thisuser.sysstatus & sysstatus_pause_on_page)?
get_string(389):get_string(390));
goxy(23,8);
npr("%s\r\n",(thisuser.sysstatus & sysstatus_clr_scrn)?
str_yes:str_no);
goxy(63,8);
npr("%s\r\n",((thisuser.defed) && (thisuser.defed<=numed))?
editors[thisuser.defed-1].description:get_string(5));
goxy(23,9);
npr("%s\r\n",(thisuser.sysstatus & sysstatus_extra_color)?
str_yes:str_no);
goxy(63,9);
npr("%d\r\n",thisuser.optional_val);
goxy(23,10);
npr("%s\r\n",(thisuser.sysstatus & sysstatus_conference)?
str_yes:str_no);
goxy(63,10);
if (thisuser.wwiv_regnum)
npr("%ld\r\n",thisuser.wwiv_regnum);
else
npr(get_string(402));
goxy(23,11);
if ((thisuser.forwardsys==0) && (thisuser.forwardusr==0))
npr("%s\r\n
",(get_string(392)));
else {
if (thisuser.forwardsys) {
outstr(get_string(393));
npr("%s #%u @%u.\r\n
",
net_networks[thisuser.net_num].name,
thisuser.forwardusr,thisuser.forwardsys);
} else {
if (thisuser.forwardusr==65535) {
npr("%s\r\n
",(get_string(300)));
} else {
read_user(thisuser.forwardusr,&ur);
if (ur.inact & inact_deleted) {
thisuser.forwardusr=0;
npr("%s\r\n
",(get_string(392)));
} else {
outstr(get_string(393));
npr("%s\r\n
",nam(&ur,thisuser.forwardusr));
}
}
}
}
} else {
if (num_languages>1) {
outstr(get_string(936));
pl(cur_lang_name);
}
outstr(get_string(383));
npr("%d X %d\r\n",
thisuser.screenchars,
thisuser.screenlines);
outstr(get_string(384)); npr("%s\r\n",
(thisuser.sysstatus & sysstatus_ansi)?
((thisuser.sysstatus & sysstatus_color)? get_string(385):get_string(386)):
get_string(387));
outstr(get_string(388)); npr("%s\r\n",
(thisuser.sysstatus & sysstatus_pause_on_page)?get_string(389):get_string(390));
outstr(get_string(1429)); npr("%s\r\n",
(thisuser.sysstatus & sysstatus_clr_scrn)? str_yes:str_no);
if (okansi()) {
outstr(get_string(398)); npr("%s\r\n",
((thisuser.defed) && (thisuser.defed<=numed))?
editors[thisuser.defed-1].description:get_string(5));
outstr(get_string(399)); npr("%s\r\n",
(thisuser.sysstatus & sysstatus_extra_color)?str_yes:str_no);
}
outstr(get_string(400)); npr("%d\r\n",thisuser.optional_val);
outstr(get_string(1149)); npr("%s\r\n",
(thisuser.sysstatus & sysstatus_conference)?str_yes:str_no);
outstr(get_string(401));
if (thisuser.wwiv_regnum)
npr("%ld\r\n",thisuser.wwiv_regnum);
else
pl(get_string(402));
outstr(get_string(391));
if ((thisuser.forwardsys==0) && (thisuser.forwardusr==0))
pl(get_string(392));
else {
if (thisuser.forwardsys) {
outstr(get_string(393));
npr("%s #%u @%u.\r\n",
net_networks[thisuser.net_num].name,
thisuser.forwardusr,thisuser.forwardsys);
} else {
if (thisuser.forwardusr==65535) {
pl(get_string(300));
} else {
read_user(thisuser.forwardusr,&ur);
if (ur.inact & inact_deleted) {
thisuser.forwardusr=0;
pl(get_string(392));
} else {
outstr(get_string(393));
npr("%s\r\n",nam(&ur,thisuser.forwardusr));
}
}
}
}
pl(get_string(394));
pl(get_string(395));
pl(get_string(396));
if (okansi()) {
pl(get_string(397));
}
pl(get_string(403));
}
}
------------------------------------------------------------------------------
Step 2: Replace defaults() in DEFAULTS.C with the following...
void defaults(void)
{
int done;
char ch;
done=0;
print_cur_stat();
do {
tleft(1);
if (hangup)
return;
nl();
helpl=4;
if (okansi()) {
goxy(21,18);
ch=onek("Q?1234567890ABCDM");
nl();
} else {
prt(2,get_string(478));
ch=onek("Q?12347890ABCM");
}
switch(ch) {
case 'Q':
done=1;
break;
case '?':
print_cur_stat();
break;
case '1':
input_screensize();
print_cur_stat();
break;
case '2':
if (okansi())
prt(0,"");
input_ansistat();
print_cur_stat();
break;
case '3':
if (thisuser.sysstatus & sysstatus_pause_on_page)
thisuser.sysstatus ^= sysstatus_pause_on_page;
nl();
prt(5,get_string(479));
if (yn())
thisuser.sysstatus |= sysstatus_pause_on_page;
print_cur_stat();
break;
case '4':
prt(0,"\r\n");
if (thisuser.sysstatus & sysstatus_clr_scrn)
thisuser.sysstatus ^= sysstatus_clr_scrn;
outstr("5Clear screen before reading messages? ");
if (yn())
thisuser.sysstatus |= sysstatus_clr_scrn;
print_cur_stat();
break;
case 'A':
if (okansi())
prt(0,"");
config_qscan();
print_cur_stat();
break;
case 'B':
input_pw1();
print_cur_stat();
break;
case 'C':
make_macros();
print_cur_stat();
break;
case 'D':
change_colors();
print_cur_stat();
break;
case 'M':
modify_mailbox();
print_cur_stat();
break;
case '5':
if (okansi())
prt(0,"\r\n");
select_editor();
print_cur_stat();
break;
case '6':
if (thisuser.sysstatus & sysstatus_extra_color)
thisuser.sysstatus ^= sysstatus_extra_color;
nl();
prt(5,get_string(480));
if (yn())
thisuser.sysstatus |= sysstatus_extra_color;
print_cur_stat();
break;
case '7':
prt(0,"\r\n");
optional_lines();
print_cur_stat();
break;
case '8':
if (thisuser.sysstatus & sysstatus_conference)
thisuser.sysstatus ^= sysstatus_conference;
nl();
prt(5,get_string(1152));
if (yn())
thisuser.sysstatus |= sysstatus_conference;
changedsl();
print_cur_stat();
break;
case '9':
prt(0,"\r\n");
enter_regnum();
print_cur_stat();
break;
case '0':
if (num_languages>1)
input_language();
else
prt(2," ");
print_cur_stat();
break;
}
} while ((!done) && (!hangup));
}
------------------------------------------------------------------------------
Step 3: Find read_message() in MSGBASE.C and add these lines...
nl();
abort=0;
*next=0;
#ifdef OPT_EXTRA_COLOR
if (thisuser.sysstatus & sysstatus_clr_scrn) /* Add */
outchr(12); /* Add */
sprintf(s,"1%u/%u0",n,nummsgs);
strcat(s,charstr(12-strlen(stripcolors(s)),'.'));
strcat(s," 2");
#else
if (thisuser.sysstatus & sysstatus_clr_scrn) /* Add */
outchr(12); /* Add */
sprintf(s,"%u/%u: ",n,nummsgs);
#endif
osan(s,&abort,next);
#ifndef OPT_EXTRA_COLOR
ansic(MSG_COLOR);
#endif
------------------------------------------------------------------------------
Step 4: Find readmail() in READMAIL.C and add these lines...
curmail=i-1;
else
curmail=0;
else
curmail=0;
}
done=0;
do {
#ifdef OPT_EXTRA_COLOR
if (thisuser.sysstatus & sysstatus_clr_scrn) /* Add */
outchr(12); /* Add */
sprintf(s,"1%u/%u0",curmail+1,mw);
strcat(s,charstr(12-strlen(stripcolors(s)),'.'));
strcat(s," 2");
#else
if (thisuser.sysstatus & sysstatus_clr_scrn) /* Add */
outchr(12); /* Add */
sprintf(s,"(%u/%u): ",curmail+1,mw);
#endif
abort=0;
nl();
nl();
osan(s,&abort,&next);
next=0;
#ifndef OPT_EXTRA_COLOR
ansic(MSG_COLOR);
#endif
------------------------------------------------------------------------------
Step 5: Recompile your source code. Move DEFAULT.ANS (included) to your
gfiles directory.
------------------------------------------------------------------------------
Step 6: Use a program such as WWIVESE (my favorite) or MINIESM to change the
following lines in your BBS.STR file, which is located in your gfiles
directory...
Line # Current String Change to
------ ----------------------- -----------------------
391 4. Mailbox : M. Mailbox : 0
394 5. Configure Q-Scan A. Configure Q-Scan
395 6. Change Password B. Change Password
396 7. Update Macros C. Update Macros
397 8. Change Colors D. Change colors
398 9. Full Screen Editor: 5. Full Screen Editor: 0
399 A. Extended Colors : 6. Extended Colors : 0
400 B. Optional Lines : 7. Optional Lines : 0
401 W. WWIV reg num : 9. WWIV reg num : 0
936 L. Language : 0. Language : 0
1149 C. Conferencing : 8. Conferencing : 0
Now add this string to line 1429 (or the end of your BBS.STR if 1429 is
being used). Check this line number with Step 1...
Line # Add String
------- --------------------------
1429 4. Clear Screen : 0
(to get the heart symbol, hit Ctrl-P, then Ctrl-C)
------------------------------------------------------------------------------
Step 7: Now run your board and test the mod.
------------------------------------------------------------------------------
Step 8: You can make your own ANSI (or have an ANSI group make one for you),
using the included ANSI as a reference if needed, or you may continue
to use the included ANSI. If you choose to make a new ANSI, rename
it to DEFAULT.ANS and move it to your gfiles directory.
------------------------------------------------------------------------------
This mod works great on my board, but if you have any problems please
let me know. As of 2/26/95 my board is not up yet and probably won't
be for a few months, but I can be reached on WWIVnet at:
Amber BBS The Dragon's Den ][
#1021 @1 #1239 @4020