home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
MODSUNKN.ZIP
/
ELRIC17.MOD
< prev
next >
Wrap
Text File
|
1990-04-28
|
5KB
|
175 lines
Hello Kiddies, and welcome once again to another Elric Mod.
Elric's Mod #17
Sysop mode
Well, I just got tired of typing the system password over and over again. So,
I installed a little mod that lets me type it in once, then set a flag and not
have to do it again. It started out as a seperate sysop menu, but then I
realized how much easier (and smaller) it would be to just have a
"sysop mode", and leave the menus alone...So, here we go.
A. Easy way to do it, without source code.
Does not require Turbo C. Does not require effort.
Does not require much at all.
1. Run the BBS.
2. Hit space bar, then F for fast sysop logon.
3. Go down, ignore your mail, get to main menu.
4. Hit D, for defaults.
5. Choose Macros.
6. Make the Ctrl-A macro MYSYSOPPASSWORD^M^Z
7. Now, just hit Ctrl-A for the sysop password.
=============================================================================
B. The fun wasy to do it. Requires Turbo C 1.5 or better.
Requires source code to WWIV 4.xx
Takes a little more time.
1. OK, first load up Turbo C. Load BBS.C.
Scan down to the include lines, where it says this....
#include <math.h>
#include <dos.h>
#include <alloc.h>
#include <time.h>
int in_sysop; /*** add this line ***/
unsigned _stklen=32000;
2. Now, scan down for void mainmenu. Right there, at the top, make these
additions....
tleft(1);
print("T - ",ctim(nsl()),"");
if (in_sysop) /*** add line ***/
pl("SYSOP MODE"); /*** add line
s1[0]=0;
if (usub[cursub].subnum==-1) {
cursub=0;
3. Now, still in mainmenu, scan down and add these lines...
switch(s[0]) {
/*****add these lines here...******/
case '%': if (checkpw())
in_sysop=!in_sysop;
else
sysoplog("tried to enter the sysop menu");
break;
/*****end of addition*************/
case '>':
case '+':
if (usub[cursub+1].subnum>=0)
++cursub;
else
cursub=0;
break;
case '<':
case '-':
if (cursub>0)
4. Ok, now let's go down to void dlmainmenumenu.
nl();
tleft(1);
print("T - ",ctim(nsl()),"");
s1[0]=0;
if (in_sysop) /*** add this line ***/
pl("SYSOP MODE"); /*** add this line ***/
if (udir[curdir].subnum==-1) {
curdir=0;
if (udir[curdir].subnum==-1) {
5. Ok, almost done with BBS.C Search down for void main, and look for this
piece of code....Add the two lines "in_sysop=0;"
logon();
in_sysop=0; /*make sure not in sysop mode when logging on */
main_menu_label:
while (!hangup) {
if (curdloads)
dlmainmenu();
else
mainmenu();
}
logoff();
}
in_sysop=0; /*make sure not in sysop mode when logging off */
frequent_init();
if ((!no_hangup) && (using_modem) && ok_modem_stuff) {
6. Now, save BBS.C, and load up SYSOPF.C
Once again, look for the declarations, and add the line "extern int in_sysop"
extern externalrec *externs;
extern unsigned char agemin,agemax,slmin,slmax,dslmin,dslmax,ressex;
extern int daysmin,daysmax,lecho;
extern unsigned short arres,darres,resres;
extern int questused[20];
extern unsigned char realsl;
extern int in_sysop; /*****add this line*****/
void deluser(int un)
{
userrec u;
7. Almost done now! Scan down to int checkpw, and change it to look like this.
int checkpw()
{
char s[81];
if (in_sysop) /***add me***/
return(1); /***add me***/
else /***add me***/
{ /***add me***/
nl();
prt(2,"SY: ");
echo=0;
input(s,20);
echo=1;
if (strcmp(s,(syscfg.systempw))==0)
return(1);
else
return(0);
} /****ADD ME TOO, OR WATCH IT CRASH AND BURN***/
}
Well, that's it! Now all you have to do is hit % from the main menu, and
you are thrown in sysop mode. I could have added something to leave it toggled
when you shrunk out for something, but quite frankly, I just didn't care.
Someone else can do that, with the exception of the nap I had in Computer
Architecture today I have been up since yesterday morning, and I just don't
care.
If you use this, the only payment I ask is that you send me a
note through WWIVNet to 1@8251 saying you are using it...not too much to
ask is it?
If you have any problems, you can reach me through WWIV-Net, 1@8251, or call
my BBS.
The Kingdom of Melnibone
812-877-3488 24 Hrs a day
3/12/2400/4800/9600/12000/14,400 HST MNP5 baud
Auto-validation of WWIV sysops on first call
Xmodem, Ymodem, DSZ Zmodem with retry, DSZ Ymodem-G supported.
Lord Elric