home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
MODS412.ZIP
/
PRELOG.MOD
< prev
next >
Wrap
Text File
|
1991-08-06
|
15KB
|
375 lines
249/254: WMNWLGN2.MOD neat new ansi logon.. AWESOME!
Name: Wmaster #36 @5852
Date: Sun Jul 28 12:16:04 1991
From: The Logic Board [518-356-5711] (Upstate New York)
────────────────────────────────────────────────────────────────────────────────
------- --------- -------------- -------------- ---
-------- -------- --- Mod #18 from the Winds Master ----- ----
----- ----- ---------- The Whirlwind of Information ----- ---
----- ------- ------- 8 pm Friday to 6 am Monday, ----- ----
------- ------------ (Weekends ONLY!) 765-3093. ------ -----
---- ------- ------ ---------
-------- ------------- I can be reached at 93 @5851 --------- ---
----- -------- ---- ------- --------- --------- ------
WMNWLGN2.MOD
NOTE: This mod REQUIRES *MY* prelog.ans file. You could easily just
extract the small WWIV Ansi screen in the middle of this file. It would
work just fine. Just follow the rules for editing the PRELOG.ANS file
at the end of this mod.
First, let me start by saying that this is NOT an original mod. I got
the idea and basic ansi file from a mod called (KP02.ZIP). Well, that
didn't really work right, and it was VERY sloppy. I converted the ansi
a little to accomodate my needs. And I copied a VERY small portion of his
mod for mine. But I did copy some of it so.. give credit to him (sorry,
I forget what his name/alias is).
Ok, that was a very long opening, and I haven't even mentioned what the
mod does. (One note first, the mod is made for WWIV v4.12 but can be
converted for use with lower versions..) This mod actually does many
things. The main thing that is the big deal, is the new logon thing. If
the user has ansi, it will pause at the end of the logon ansi, then
display the prelog.ans file. It then uses ansi codes to move the cursor
around and change it's color. So instead of
NN: Winds Master
PW: XXXXXXXX
PH: ###-###-XXXX
You get this:
┌─────────────────────────────────────────────────────────────────────────────┐
│The Whirlwind of Information BBS - 518-765-3093 - 9pm to 7am Wkdays, 24 Wkend│
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────┐┌──────────────────────────────┐
│ Name: ││ Type 'New' if you are a new │
└─────────────────────────────────────────┘│ user. If you are already a │
┌─────────────────────────────────────────┐│ member of this bbs, then you │
│ Pass: [XXXXXXXX] Phone: [518-765-3093] ││ malready know what to do. │
└─────────────────────────────────────────┘└──────────────────────────────┘
Note, all grey (or some might call it white) is intensified. And before
the user enters his name, XXX-XXX-XXXX is displayed where the password is.
And when he enters his name, the first 8 characters are shown..
Another Note: You will notice that I moved the line saying "The Whirlwind
of Information BBS etc." to the top. This is because instead of using
actual cursor positioning codes, I used cursor movement codes. This is
because some (actually, most) had trouble getting it all to line up
correctly. This will be much easier.. and this also enables you to put
whatever you want at the top, and at any length..
This mod also has someone's illegal logon, PW and PH notification
(you can easily take that out)
NOTE: I had to change the illegal logon notification so that it ONLY
writes the pw and ph to the Sysop Log, and not send it to the sysop
and user via ssm, cause the original illegal logon mod changed both ssm()
and rsm(). But, if you have the illegal logon notification then it would
be easy to re-install (just a few lines).
Change from v1: I only auto-senses ansi if there is a user logging in
remotely. This removes the delay when logging in locally. It also prints
out Auto Sensing ANSI... before the check_ansi() function.. just looks
different.
It prints out a small warning message that they might be logged
and/or watched (easy to take out.. but it looks neat :)
This mod also changes the maximum number of tries a user get's to log on,
instead of 3 tries he get's 4..
I think that is all this mod does.. but there might be more (don't even
know what my own mod does :\
Ok, here is the mod (finally :)
Load up BBSUTL.C and erase getuser(),
replace it with this getuser()
void getuser()
{
char s[81],s2[81], stl[13];
char pwused[9], phoneused[5];
int ok,count,net_only,ans;
long l;
thisuser.sysstatus &= (~sysstatus_ansi);
net_only=1;
if (syscfg.netlowtime!= syscfg.nethightime) {
if (syscfg.nethightime>syscfg.netlowtime) {
if ((timer()<=(syscfg.netlowtime*60.0)) ||
(timer()>=(syscfg.nethightime*60.0)))
net_only=0;
} else {
if ((timer()<=(syscfg.netlowtime*60.0)) &&
(timer()>=(syscfg.nethightime*60.0)))
net_only=0;
}
} else
net_only=0;
count=0;
ok=0;
checkit=1;
okmacro=0;
if (!net_only) {
sprintf(s,"%swelcome.ans",syscfg.gfilesdir);
if (exist(s)) {
nl();
#ifdef OLD
outstr("Can you support ANSI graphics? ");
thisuser.sysstatus=0;
ans=yn();
#else
if (incom)
{
outstr("Auto-Sensing ANSI...");
ans=check_ansi();
}
#endif
if (!incom)
{
nl();
outstr("Use ANSI in logon? ");
ans=yn();
} else
if (ans)
pl("\x1B[0;1;37;40mAnsi sensed.");
else
pl("Ansi NOT sensed. :(");
nl();
if (ans)
{
thisuser.sysstatus |= sysstatus_ansi;
sprintf(s, "\x1B[5;1;31;40mWARNING!!\x1B[0;1;37m This call may be
logged and/or monitored.");
pl(s);
if (incom) delay(1000);
printfile("welcome.ans");
}
else
{
pl("WARNING!! This call may be logged and/or monitored.");
if (incom) delay(1000);
printfile("welcome.msg");
}
} else {
pl("WARNING!! This call may be logged and/or monitored.");
if (incom) delay(1000);
printfile("welcome.msg");
}
}
ansic(0);
do {
nl();
if (net_only) {
pl("This time is reserved for net-mail ONLY.");
pl("Please try calling back again later.");
}
if (!ans)
{
pl("Enter your alias, number or NEW.");
outstr("NN: "); /* DON'T change the NN: prompt. */
input(s,30);
usernum=finduser(s);
if ((net_only) && (usernum!=-2))
usernum=0;
if (usernum>0)
{
read_user(usernum,&thisuser);
realsl=thisuser.sl;
topscreen();
ok=1;
outstr("PW: ");
echo=0;
input(s,8);
if ((strcmp(s,thisuser.pw)!=0) && incom)
{
ok=0;
strcpy(pwused, s);
}
if ((syscfg.sysconfig & sysconfig_free_phone)==0)
{
strcpy(stl, "PH: ");
strncat(stl, thisuser.phone, 8);
outstr(stl);
input(s,4);
if ((strcmp(s,&thisuser.phone[8])!=0) && incom)
{
ok=0;
strcpy(phoneused, s);
if ((strlen(s)==4) && (s[3]=='-'))
{
nl();
pl("!! Enter the LAST 4 DIGITS of your phone number ONLY !!");
nl();
}
}
}
if ((thisuser.sl==255) && (incom) && (ok))
{
outstr("SY: ");
echo=0;
input(s,20);
if (strcmp(s,syscfg.systempw)!=0)
ok=0;
}
}
} else { /* if user has ansi */
pausescr();
nl();
outstr("NN:"); /* make sure net works */
outstr("\x1B[2J");
printfile("prelog.ans");
outstr("\x1B[6A\x1B[9C\x1B[0;1;37;44m");
input(s, 30);
outstr("\x1B[0;37;40m");
usernum=finduser(s);
if ((net_only) && (usernum!=-2))
usernum=0;
if (usernum>0)
{
read_user(usernum,&thisuser);
realsl=thisuser.sl;
ok=1;
outstr("\x1B[2B\x1B[9C\x1B[0;1;37;40m");
echo=0;
input(s, 8);
if ((strcmp(s,thisuser.pw)!=0) && incom)
{
ok=0;
strcpy(pwused,s);
}
outstr("\x1B[1A\x1B[29C");
strncpy(stl,thisuser.phone,8);
stl[8]=0;
outstr(stl);
input(s,4);
if ((strcmp(s,&thisuser.phone[8])!=0) && incom)
{
ok=0;
strcpy(phoneused,s);
}
if ((thisuser.sl==255) && (incom) && (ok))
{
outstr("\x1B[10B\nSY: ");
echo=0;
input(s,20);
if (strcmp(s,syscfg.systempw)!=0)
ok=0;
}
outstr("\x1B[4B\n");
} else
outstr("\x1B[4B\n");
}
echo=1;
if (usernum>0)
{
if (ok) {
changedsl();
} else {
++thisuser.illegal;
write_user(usernum,&thisuser);
close_user();
nl();
pl("\7ILLEGAL LOGON\7");
printf("usernum=%d",usernum);
delay(1000);
nl();
strcpy(s,"### ILLEGAL LOGON for ");
strcat(s,nam(&thisuser,usernum));
strcat(s, " PW: ");
strcat(s, pwused);
strcat(s, " PH: ");
strcat(s, phoneused);
strcat(s, "\r\n");
sl1(0,s);
ssm(usernum, 1, s);
if (usernum!=1) ssm(1, 1, s);
usernum=0;
}
} else
if (usernum==-1)
{
newuser();
ok=1;
} else
if (usernum==0)
{
if (net_only)
nl();
else
pl("Unknown User.");
} else
if ((usernum==-2) || (usernum==-3))
{
if (incom)
{
time(&l);
if (usernum==-2)
sprintf(s,"NETWORK /B%u /T%ld",modem_speed,l);
else
sprintf(s,"REMOTE /B%u",modem_speed);
save_status();
run_external1(s);
get_status();
hangup=1;
dtr(0);
global_xx=0;
wait(1.0);
dtr(1);
wait(0.1);
cleanup_net();
imodem();
}
hangup=1;
}
} while ((!hangup) && (!ok) && (++count<4));
if (count==4)
hangup=1;
checkit=0;
okmacro=1;
if ((!hangup) && (usernum>0) && (thisuser.restrict & restrict_logon) &&
(strcmp(date(),thisuser.laston)==0) && (thisuser.ontoday>0)) {
nl();
plc(9, "Sorry, you can only logon once per day.");
nl();
hangup=1;
}
}
Rules for editting PRELOG.ANS
1. Don't change around the locations of the info from the 4th line down.
Everything above that line can be either taken out, changed, or added
to.
2. If using The Draw, mark a block from the top of the screen, to the last
line of the file (which should be a solid line). The save that block.
Saving with extra lines at the bottom of the file would cause
mis-alignment (sp?)
3. E-Mail me any significant changes that you make that could help me in
future versions.
l8r Winds Master