Fixed safe cracker door, added setup for safe door
This commit is contained in:
parent
5a57e59627
commit
faa9dcbe4f
@ -4585,6 +4585,7 @@ v0.33.19 26-Oct-2001
|
|||||||
v0.33.20 10-Feb-2002
|
v0.33.20 10-Feb-2002
|
||||||
|
|
||||||
upgrade:
|
upgrade:
|
||||||
|
Remove /opt/mbse/etc/safe.data
|
||||||
Compile sources and install binaries. Restart the BBS.
|
Compile sources and install binaries. Restart the BBS.
|
||||||
Enter mbsetup, this will upgrade the databases.
|
Enter mbsetup, this will upgrade the databases.
|
||||||
Go into global configuration, exit and save, this will update
|
Go into global configuration, exit and save, this will update
|
||||||
@ -4669,6 +4670,10 @@ v0.33.20 10-Feb-2002
|
|||||||
Some dangerous menus cannot be entered anymore while some
|
Some dangerous menus cannot be entered anymore while some
|
||||||
programs are being used, ie. the bbs must be free. When these
|
programs are being used, ie. the bbs must be free. When these
|
||||||
menus are entered, the bbs will be closed for use.
|
menus are entered, the bbs will be closed for use.
|
||||||
|
Added menu 8.6, edit BBS list entries.
|
||||||
|
Fixed numbering of menu 8.7, edit oneliners.
|
||||||
|
Added menu 8.8 for safe crackers data. If the safe is cracked
|
||||||
|
it can now be reset.
|
||||||
|
|
||||||
mbmon:
|
mbmon:
|
||||||
The top statusbar now displays the bbs Free/Down/Busy status.
|
The top statusbar now displays the bbs Free/Down/Busy status.
|
||||||
@ -4836,6 +4841,9 @@ v0.33.20 10-Feb-2002
|
|||||||
When a user has no Location filled in, the bbs doesn't crash
|
When a user has no Location filled in, the bbs doesn't crash
|
||||||
anymore.
|
anymore.
|
||||||
The new files scan colored areasnames bar length is corrected.
|
The new files scan colored areasnames bar length is corrected.
|
||||||
|
Fixed the problems with the safecracker door. Removed the
|
||||||
|
cheat codes and added a delay for the display of the safe
|
||||||
|
opening.
|
||||||
|
|
||||||
mbnewusr:
|
mbnewusr:
|
||||||
New users have the default internal fullscreen editor.
|
New users have the default internal fullscreen editor.
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
<BLOCKQUOTE>
|
<BLOCKQUOTE>
|
||||||
<h5>Last update 25-Oct-2001</h5>
|
<h5>Last update 05-May-2002</h5>
|
||||||
<P> <P>
|
<P> <P>
|
||||||
|
|
||||||
<H1>mbsetup - The Setup Program</H1>
|
<H1>mbsetup - The Setup Program</H1>
|
||||||
@ -34,7 +34,14 @@ When <b>mbsetup</b> is started without arguments the databases will be checked
|
|||||||
and initialized before the main screen is displayed.
|
and initialized before the main screen is displayed.
|
||||||
Both methods are being used to make sure all needed databases excist.
|
Both methods are being used to make sure all needed databases excist.
|
||||||
For a detailed description of all setup options see
|
For a detailed description of all setup options see
|
||||||
<A HREF="../setup/index.htm">MBSE BBS Setup Guide</A>
|
<A HREF="../setup/index.htm">MBSE BBS Setup Guide</A><br>
|
||||||
|
<b>mbsetup</b> uses locking to protect the system databases. Some setup menus
|
||||||
|
can only be entered if the bbs is free, ie. no users logged on, no mailer
|
||||||
|
sessions, not tossing mail etc. If the bbs is free, then these menus can be
|
||||||
|
entered and the bbs will be closed. No users can login, tossers do not run etc.
|
||||||
|
Only mailer calls are still accepted. So be carefull not to stay too long in
|
||||||
|
these menus, you are blocking normal bbs use. In the top status bar this
|
||||||
|
situation is displayed.
|
||||||
<P> <P>
|
<P> <P>
|
||||||
|
|
||||||
<H3>Environment.</H3>
|
<H3>Environment.</H3>
|
||||||
|
38
lib/faddr.c
38
lib/faddr.c
@ -62,31 +62,49 @@ char *aka2str(fidoaddr aka)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Try to create a aka structure of a string.
|
||||||
|
*/
|
||||||
fidoaddr str2aka(char *addr)
|
fidoaddr str2aka(char *addr)
|
||||||
{
|
{
|
||||||
char a[256];
|
char a[256];
|
||||||
static char b[43];
|
static char b[43];
|
||||||
char *temp;
|
char *p, *temp = NULL;
|
||||||
fidoaddr n;
|
static fidoaddr n;
|
||||||
|
|
||||||
sprintf(b, "%s~", addr);
|
|
||||||
n.zone = 0;
|
n.zone = 0;
|
||||||
n.net = 0;
|
n.net = 0;
|
||||||
n.node = 0;
|
n.node = 0;
|
||||||
n.point = 0;
|
n.point = 0;
|
||||||
n.domain[0] = '\0';
|
n.domain[0] = '\0';
|
||||||
|
|
||||||
if ((strchr(b, ':') == NULL) || (strchr(b, '@') == NULL))
|
/*
|
||||||
|
* Safety check
|
||||||
|
*/
|
||||||
|
if (strlen(addr) > 42)
|
||||||
return n;
|
return n;
|
||||||
|
|
||||||
/* First split the f:n/n.p and domain part
|
sprintf(b, "%s~", addr);
|
||||||
*/
|
if ((strchr(b, ':') == NULL) || (strchr(b, '/') == NULL))
|
||||||
temp = strtok(b, "@");
|
return n;
|
||||||
strcpy(n.domain, strtok(NULL, "~"));
|
|
||||||
|
|
||||||
/* Handle f:n/n.p part
|
/*
|
||||||
|
* First split the f:n/n.p and domain part
|
||||||
*/
|
*/
|
||||||
|
if ((strchr(b, '@'))) {
|
||||||
|
temp = strtok(b, "@");
|
||||||
|
p = strtok(NULL, "~");
|
||||||
|
if (p)
|
||||||
|
strcpy(n.domain, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Handle f:n/n.p part
|
||||||
|
*/
|
||||||
|
if (temp)
|
||||||
strcpy(a, strcat(temp, "~"));
|
strcpy(a, strcat(temp, "~"));
|
||||||
|
else
|
||||||
|
strcpy(a, b);
|
||||||
if (strchr(a, '.') == NULL) {
|
if (strchr(a, '.') == NULL) {
|
||||||
n.zone = atoi(strtok(a, ":"));
|
n.zone = atoi(strtok(a, ":"));
|
||||||
n.net = atoi(strtok(NULL, "/"));
|
n.net = atoi(strtok(NULL, "/"));
|
||||||
@ -101,5 +119,3 @@ fidoaddr str2aka(char *addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ void BBS_Add(void)
|
|||||||
pout(15, 0, (char *) Language(303));
|
pout(15, 0, (char *) Language(303));
|
||||||
colour(CFG.InputColourF, CFG.InputColourB);
|
colour(CFG.InputColourF, CFG.InputColourB);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
GetstrC(bbs.Phone[0], 20);
|
GetstrC(bbs.Phone[0], 19);
|
||||||
|
|
||||||
if((strlen(bbs.Phone[0])) > 3)
|
if((strlen(bbs.Phone[0])) > 3)
|
||||||
break;
|
break;
|
||||||
@ -163,7 +163,7 @@ void BBS_Add(void)
|
|||||||
pout(15, 0, (char *) Language(307));
|
pout(15, 0, (char *) Language(307));
|
||||||
colour(CFG.InputColourF, CFG.InputColourB);
|
colour(CFG.InputColourF, CFG.InputColourB);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
GetstrC(bbs.Speeds[0], 40);
|
GetstrC(bbs.Speeds[0], 39);
|
||||||
|
|
||||||
if((strlen(bbs.Speeds[0])) > 2)
|
if((strlen(bbs.Speeds[0])) > 2)
|
||||||
break;
|
break;
|
||||||
@ -181,11 +181,11 @@ void BBS_Add(void)
|
|||||||
pout(15, 0, (char *)": ");
|
pout(15, 0, (char *)": ");
|
||||||
colour(CFG.InputColourF, CFG.InputColourB);
|
colour(CFG.InputColourF, CFG.InputColourB);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
GetstrC(bbs.Desc[0], 71);
|
GetstrC(bbs.Desc[0], 65);
|
||||||
pout(15, 0, (char *)": ");
|
pout(15, 0, (char *)": ");
|
||||||
colour(CFG.InputColourF, CFG.InputColourB);
|
colour(CFG.InputColourF, CFG.InputColourB);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
GetstrC(bbs.Desc[1], 71);
|
GetstrC(bbs.Desc[1], 65);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
182
mbsebbs/safe.c
182
mbsebbs/safe.c
@ -49,10 +49,11 @@ FILE *pSafe;
|
|||||||
|
|
||||||
int iLoop, iFirst, iSecond, iThird;
|
int iLoop, iFirst, iSecond, iThird;
|
||||||
char sFirst[4], sSecond[4], sThird[4];
|
char sFirst[4], sSecond[4], sThird[4];
|
||||||
|
int cracked;
|
||||||
|
int tries;
|
||||||
|
|
||||||
int getdigits(void);
|
int getdigits(void);
|
||||||
int SafeCheckUser(void);
|
int SafeCheckUser(int);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -63,6 +64,8 @@ void Safe(void)
|
|||||||
|
|
||||||
isize = sizeof(int);
|
isize = sizeof(int);
|
||||||
srand(Time_Now);
|
srand(Time_Now);
|
||||||
|
cracked = FALSE;
|
||||||
|
tries = 0;
|
||||||
|
|
||||||
WhosDoingWhat(SAFE);
|
WhosDoingWhat(SAFE);
|
||||||
|
|
||||||
@ -77,7 +80,7 @@ void Safe(void)
|
|||||||
|
|
||||||
DisplayFile(CFG.sSafeWelcome);
|
DisplayFile(CFG.sSafeWelcome);
|
||||||
|
|
||||||
if (SafeCheckUser() == TRUE)
|
if (SafeCheckUser(TRUE) == TRUE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* In the safe lies */
|
/* In the safe lies */
|
||||||
@ -115,8 +118,10 @@ void Safe(void)
|
|||||||
*/
|
*/
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
/* Get digits, TRUE if safe cracked. */
|
/* Get digits, TRUE if safe cracked. */
|
||||||
if (getdigits() == TRUE)
|
if (getdigits() == TRUE) {
|
||||||
|
SafeCheckUser(FALSE);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
Enter(1);
|
Enter(1);
|
||||||
/* Do you want to try again ? [Y/n]: */
|
/* Do you want to try again ? [Y/n]: */
|
||||||
@ -125,10 +130,12 @@ void Safe(void)
|
|||||||
|
|
||||||
alarm_on();
|
alarm_on();
|
||||||
i = toupper(Getone());
|
i = toupper(Getone());
|
||||||
if (i == Keystroke(101, 1))
|
if (i == Keystroke(101, 1)) {
|
||||||
|
SafeCheckUser(FALSE);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (SafeCheckUser() == TRUE)
|
if (SafeCheckUser(FALSE) == TRUE)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Syslog('+', "User exited Safe Cracker Door");
|
Syslog('+', "User exited Safe Cracker Door");
|
||||||
@ -141,7 +148,6 @@ void Safe(void)
|
|||||||
*/
|
*/
|
||||||
int getdigits(void)
|
int getdigits(void)
|
||||||
{
|
{
|
||||||
long result;
|
|
||||||
int i;
|
int i;
|
||||||
char temp[81];
|
char temp[81];
|
||||||
|
|
||||||
@ -160,7 +166,6 @@ int getdigits(void)
|
|||||||
Getnum(sFirst, 2);
|
Getnum(sFirst, 2);
|
||||||
sprintf(temp, "1st: %s", sFirst);
|
sprintf(temp, "1st: %s", sFirst);
|
||||||
if((strcmp(sFirst, "")) != 0) {
|
if((strcmp(sFirst, "")) != 0) {
|
||||||
Syslog('-', temp);
|
|
||||||
iFirst=atoi(sFirst);
|
iFirst=atoi(sFirst);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +173,6 @@ int getdigits(void)
|
|||||||
colour(WHITE, BLUE);
|
colour(WHITE, BLUE);
|
||||||
/* Please try again! You must input a number greater than Zero and less than */
|
/* Please try again! You must input a number greater than Zero and less than */
|
||||||
printf("\n%s%d.", (char *) Language(92), CFG.iSafeMaxNumber);
|
printf("\n%s%d.", (char *) Language(92), CFG.iSafeMaxNumber);
|
||||||
Syslog('-', "Value out of range!");
|
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -182,7 +186,6 @@ int getdigits(void)
|
|||||||
Getnum(sSecond, 2);
|
Getnum(sSecond, 2);
|
||||||
sprintf(temp, "2nd: %s", sSecond);
|
sprintf(temp, "2nd: %s", sSecond);
|
||||||
if((strcmp(sSecond, "")) != 0) {
|
if((strcmp(sSecond, "")) != 0) {
|
||||||
Syslog('-', temp);
|
|
||||||
iSecond=atoi(sSecond);
|
iSecond=atoi(sSecond);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +193,6 @@ int getdigits(void)
|
|||||||
colour(WHITE, BLUE);
|
colour(WHITE, BLUE);
|
||||||
/* Please try again! You must input a number greater than Zero and less than */
|
/* Please try again! You must input a number greater than Zero and less than */
|
||||||
printf("\n%s%d.\n", (char *) Language(92), CFG.iSafeMaxNumber);
|
printf("\n%s%d.\n", (char *) Language(92), CFG.iSafeMaxNumber);
|
||||||
Syslog('-', "Value out of range!");
|
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -201,25 +203,15 @@ int getdigits(void)
|
|||||||
colour(LIGHTBLUE, BLACK);
|
colour(LIGHTBLUE, BLACK);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
Getnum(sThird, 2);
|
Getnum(sThird, 2);
|
||||||
if((strcmp(sThird, "")) != 0) {
|
|
||||||
if((strcmp(sThird, "737") != 0) && (strcmp(sThird, "747") != 0)) {
|
|
||||||
sprintf(temp, "3rd: %s", sThird);
|
sprintf(temp, "3rd: %s", sThird);
|
||||||
Syslog('!', temp);
|
if((strcmp(sThird, "")) != 0) {
|
||||||
} else {
|
|
||||||
sprintf(temp, "3rd: %d", CFG.iSafeMaxNumber - 1);
|
|
||||||
Syslog('-', temp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
iThird=atoi(sThird);
|
iThird=atoi(sThird);
|
||||||
|
}
|
||||||
|
|
||||||
if((iThird == 737) || (iThird == 747))
|
if((iThird > CFG.iSafeMaxNumber) || (iThird <= 0) || (strcmp(sThird, "") == 0)) {
|
||||||
break;
|
|
||||||
|
|
||||||
if((iThird > CFG.iSafeMaxNumber) || (iThird <= 0)) {
|
|
||||||
colour(WHITE, BLUE);
|
colour(WHITE, BLUE);
|
||||||
/* Please try again! You must input a number greater than Zero and less than */
|
/* Please try again! You must input a number greater than Zero and less than */
|
||||||
printf("\n%s%d.\n", (char *) Language(92), CFG.iSafeMaxNumber);
|
printf("\n%s%d.\n", (char *) Language(92), CFG.iSafeMaxNumber);
|
||||||
Syslog('-', "Value out of range!");
|
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -247,23 +239,34 @@ int getdigits(void)
|
|||||||
|
|
||||||
if ((i == Keystroke(97, 0)) || (i == 13)) {
|
if ((i == Keystroke(97, 0)) || (i == 13)) {
|
||||||
printf("\n\n");
|
printf("\n\n");
|
||||||
|
tries++;
|
||||||
|
Syslog('+', "Attempt %d with combination %d %d %d", tries, iFirst, iSecond, iThird);
|
||||||
|
|
||||||
/* Left: */
|
/* Left: */
|
||||||
pout(LIGHTRED, BLACK, (char *) Language(95));
|
pout(LIGHTRED, BLACK, (char *) Language(95));
|
||||||
for (iLoop = 0; iLoop < iFirst; iLoop++)
|
for (iLoop = 0; iLoop < iFirst; iLoop++) {
|
||||||
pout(YELLOW, BLACK, (char *)".");
|
pout(YELLOW, BLACK, (char *)".");
|
||||||
|
fflush(stdout);
|
||||||
|
usleep(100000);
|
||||||
|
}
|
||||||
poutCR(LIGHTBLUE, BLACK, sFirst);
|
poutCR(LIGHTBLUE, BLACK, sFirst);
|
||||||
|
|
||||||
/* Right: */
|
/* Right: */
|
||||||
pout(LIGHTRED, BLACK, (char *) Language(96));
|
pout(LIGHTRED, BLACK, (char *) Language(96));
|
||||||
for (iLoop = 0; iLoop < iSecond; iLoop++)
|
for (iLoop = 0; iLoop < iSecond; iLoop++) {
|
||||||
pout(YELLOW, BLACK, (char *)".");
|
pout(YELLOW, BLACK, (char *)".");
|
||||||
|
fflush(stdout);
|
||||||
|
usleep(100000);
|
||||||
|
}
|
||||||
poutCR(LIGHTBLUE, BLACK, sSecond);
|
poutCR(LIGHTBLUE, BLACK, sSecond);
|
||||||
|
|
||||||
/* Left: */
|
/* Left: */
|
||||||
pout(LIGHTRED, BLACK, (char *) Language(95));
|
pout(LIGHTRED, BLACK, (char *) Language(95));
|
||||||
for (iLoop = 0; iLoop < iThird; iLoop++)
|
for (iLoop = 0; iLoop < iThird; iLoop++) {
|
||||||
pout(YELLOW, BLACK, (char *)".");
|
pout(YELLOW, BLACK, (char *)".");
|
||||||
|
fflush(stdout);
|
||||||
|
usleep(100000);
|
||||||
|
}
|
||||||
poutCR(LIGHTBLUE, BLACK, sThird);
|
poutCR(LIGHTBLUE, BLACK, sThird);
|
||||||
|
|
||||||
if(CFG.iSafeNumGen) {
|
if(CFG.iSafeNumGen) {
|
||||||
@ -272,11 +275,10 @@ int getdigits(void)
|
|||||||
CFG.iSafeThirdDigit = (rand() % CFG.iSafeMaxNumber) + 1;
|
CFG.iSafeThirdDigit = (rand() % CFG.iSafeMaxNumber) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CFG.iSafeFirstDigit == iFirst)
|
if ((CFG.iSafeFirstDigit == iFirst) && (CFG.iSafeSecondDigit == iSecond) && (CFG.iSafeThirdDigit == iThird)) {
|
||||||
if(CFG.iSafeSecondDigit == iSecond)
|
|
||||||
if(CFG.iSafeThirdDigit == iThird) {
|
|
||||||
|
|
||||||
DisplayFile(CFG.sSafeOpened);
|
DisplayFile(CFG.sSafeOpened);
|
||||||
|
cracked = TRUE;
|
||||||
|
|
||||||
Enter(1);
|
Enter(1);
|
||||||
/* You have won the following... */
|
/* You have won the following... */
|
||||||
@ -285,25 +287,6 @@ int getdigits(void)
|
|||||||
poutCR(LIGHTMAGENTA, BLACK, CFG.sSafePrize);
|
poutCR(LIGHTMAGENTA, BLACK, CFG.sSafePrize);
|
||||||
Enter(1);
|
Enter(1);
|
||||||
|
|
||||||
sprintf(temp, "%s/etc/safe.data", getenv("MBSE_ROOT"));
|
|
||||||
if(( pSafe = fopen(temp, "r+")) == NULL)
|
|
||||||
WriteError("Can't open %s for updating", temp);
|
|
||||||
else {
|
|
||||||
fseek(pSafe, 0L, SEEK_END);
|
|
||||||
result = ftell(pSafe);
|
|
||||||
result /= sizeof(safe);
|
|
||||||
|
|
||||||
fread(&safe, sizeof(safe), 1, pSafe);
|
|
||||||
|
|
||||||
safe.Opened = TRUE;
|
|
||||||
|
|
||||||
fseek(pSafe, 0L, SEEK_END);
|
|
||||||
result = ftell(pSafe);
|
|
||||||
result /= sizeof(safe);
|
|
||||||
fwrite(&safe, sizeof(safe), 1, pSafe);
|
|
||||||
fclose(pSafe);
|
|
||||||
}
|
|
||||||
|
|
||||||
Syslog('!', "User opened Safe Cracker Door");
|
Syslog('!', "User opened Safe Cracker Door");
|
||||||
|
|
||||||
Pause();
|
Pause();
|
||||||
@ -331,14 +314,6 @@ int getdigits(void)
|
|||||||
printf("%s%d\n", (char *) Language(95), CFG.iSafeThirdDigit);
|
printf("%s%d\n", (char *) Language(95), CFG.iSafeThirdDigit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(iThird == 737)
|
|
||||||
CFG.iSafeNumGen = FALSE;
|
|
||||||
|
|
||||||
if(iThird == 747) {
|
|
||||||
colour(LIGHTBLUE, BLACK);
|
|
||||||
printf("Code: %d %d %d\n", CFG.iSafeFirstDigit, CFG.iSafeSecondDigit, CFG.iSafeThirdDigit);
|
|
||||||
}
|
|
||||||
|
|
||||||
Enter(1);
|
Enter(1);
|
||||||
/* Please press key to continue */
|
/* Please press key to continue */
|
||||||
pout(LIGHTGREEN, BLACK, (char *) Language(87));
|
pout(LIGHTGREEN, BLACK, (char *) Language(87));
|
||||||
@ -353,9 +328,8 @@ int getdigits(void)
|
|||||||
/*
|
/*
|
||||||
* Returns true when safe already cracked or maximum trys exceeded
|
* Returns true when safe already cracked or maximum trys exceeded
|
||||||
*/
|
*/
|
||||||
int SafeCheckUser(void)
|
int SafeCheckUser(int init)
|
||||||
{
|
{
|
||||||
int Counter = 0;
|
|
||||||
char *File, *Name, *Date;
|
char *File, *Name, *Date;
|
||||||
|
|
||||||
File = calloc(PATH_MAX, sizeof(char));
|
File = calloc(PATH_MAX, sizeof(char));
|
||||||
@ -366,18 +340,25 @@ int SafeCheckUser(void)
|
|||||||
sprintf(Date, "%s", (char *) GetDateDMY());
|
sprintf(Date, "%s", (char *) GetDateDMY());
|
||||||
sprintf(File, "%s/etc/safe.data", getenv("MBSE_ROOT"));
|
sprintf(File, "%s/etc/safe.data", getenv("MBSE_ROOT"));
|
||||||
|
|
||||||
if(( pSafe = fopen(File, "r")) == NULL) {
|
if ((pSafe = fopen(File, "r+")) == NULL) {
|
||||||
if ((pSafe = fopen(File, "w")) != NULL) {
|
if ((pSafe = fopen(File, "w")) != NULL) {
|
||||||
|
safehdr.hdrsize = sizeof(safehdr);
|
||||||
|
safehdr.recsize = sizeof(safe);
|
||||||
|
fwrite(&safehdr, sizeof(safehdr), 1, pSafe);
|
||||||
sprintf(safe.Date, "%s", (char *) GetDateDMY());
|
sprintf(safe.Date, "%s", (char *) GetDateDMY());
|
||||||
sprintf(safe.Name, "%s", Name);
|
sprintf(safe.Name, "%s", Name);
|
||||||
safe.Trys = 0;
|
safe.Trys = 0;
|
||||||
safe.Opened = 0;
|
safe.Opened = FALSE;
|
||||||
fwrite(&safe, sizeof(safe), 1, pSafe);
|
fwrite(&safe, sizeof(safe), 1, pSafe);
|
||||||
fclose(pSafe);
|
fclose(pSafe);
|
||||||
chmod(File, 0660);
|
chmod(File, 0660);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
while ( fread(&safe, sizeof(safe), 1, pSafe) == 1) {
|
fread(&safehdr, sizeof(safehdr), 1, pSafe);
|
||||||
|
/*
|
||||||
|
* Check if safe already cracked
|
||||||
|
*/
|
||||||
|
while (fread(&safe, safehdr.recsize, 1, pSafe) == 1) {
|
||||||
if (safe.Opened) {
|
if (safe.Opened) {
|
||||||
fclose(pSafe);
|
fclose(pSafe);
|
||||||
Syslog('+', "Safe is currently LOCKED - exiting door.");
|
Syslog('+', "Safe is currently LOCKED - exiting door.");
|
||||||
@ -394,61 +375,88 @@ int SafeCheckUser(void)
|
|||||||
pout(LIGHTGREEN, BLACK, (char *) Language(105));
|
pout(LIGHTGREEN, BLACK, (char *) Language(105));
|
||||||
Enter(2);
|
Enter(2);
|
||||||
Pause();
|
Pause();
|
||||||
fclose(pSafe);
|
|
||||||
free(File);
|
free(File);
|
||||||
free(Name);
|
free(Name);
|
||||||
free(Date);
|
free(Date);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rewind(pSafe);
|
fseek(pSafe, safehdr.hdrsize, SEEK_SET);
|
||||||
|
|
||||||
fread(&safe, sizeof(safe), 1, pSafe);
|
/*
|
||||||
|
* Check if this user is already in the database
|
||||||
|
*/
|
||||||
|
while (fread(&safe, safehdr.recsize, 1, pSafe) == 1) {
|
||||||
|
if ((strcmp(Name, safe.Name)) == 0) {
|
||||||
if ((strcmp(Date, safe.Date)) != 0) {
|
if ((strcmp(Date, safe.Date)) != 0) {
|
||||||
fclose(pSafe);
|
/*
|
||||||
if((pSafe = fopen(File, "w")) != NULL) {
|
* User found, but last time used is not today.
|
||||||
|
* Reset this user.
|
||||||
|
*/
|
||||||
|
fseek(pSafe, - safehdr.recsize, SEEK_CUR);
|
||||||
sprintf(safe.Date, "%s", (char *) GetDateDMY());
|
sprintf(safe.Date, "%s", (char *) GetDateDMY());
|
||||||
sprintf(safe.Name, "%s", Name);
|
|
||||||
safe.Trys = 0;
|
safe.Trys = 0;
|
||||||
safe.Opened = 0;
|
tries = 0;
|
||||||
fwrite(&safe, sizeof(safe), 1, pSafe);
|
safe.Opened = FALSE;
|
||||||
|
fwrite(&safe, safehdr.recsize, 1, pSafe);
|
||||||
fclose(pSafe);
|
fclose(pSafe);
|
||||||
}
|
free(File);
|
||||||
|
free(Name);
|
||||||
|
free(Date);
|
||||||
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
while ( fread(&safe, sizeof(safe), 1, pSafe) == 1) {
|
/*
|
||||||
if((strcmp(Name, safe.Name)) == 0)
|
* User found, last time is today, check attempts
|
||||||
Counter++;
|
*/
|
||||||
|
fseek(pSafe, - safehdr.recsize, SEEK_CUR);
|
||||||
|
if (init)
|
||||||
|
tries = safe.Trys;
|
||||||
|
else {
|
||||||
|
safe.Trys = tries;
|
||||||
}
|
}
|
||||||
|
safe.Opened = cracked;
|
||||||
rewind(pSafe);
|
fwrite(&safe, safehdr.recsize, 1, pSafe);
|
||||||
|
fclose(pSafe);
|
||||||
if(Counter >= CFG.iSafeMaxTrys - 1) {
|
free(File);
|
||||||
|
free(Name);
|
||||||
|
free(Date);
|
||||||
|
if (safe.Trys >= CFG.iSafeMaxTrys) {
|
||||||
|
Syslog('+', "Maximum trys per day exceeded");
|
||||||
Enter(2);
|
Enter(2);
|
||||||
/* Maximum trys per day exceeded */
|
/* Maximum trys per day exceeded */
|
||||||
pout(WHITE, BLACK, (char *) Language(106));
|
pout(WHITE, BLACK, (char *) Language(106));
|
||||||
Enter(1);
|
Enter(1);
|
||||||
sleep(3);
|
sleep(3);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* User not found, append new record
|
||||||
|
*/
|
||||||
fclose(pSafe);
|
fclose(pSafe);
|
||||||
|
if ((pSafe = fopen(File, "a")) == NULL) {
|
||||||
|
WriteError("Can't append to %s", File);
|
||||||
free(File);
|
free(File);
|
||||||
free(Name);
|
free(Name);
|
||||||
free(Date);
|
free(Date);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
fseek(pSafe, 0, SEEK_END);
|
||||||
fclose(pSafe);
|
memset(&safe, 0, sizeof(safe));
|
||||||
|
|
||||||
if(( pSafe = fopen(File, "a+")) == NULL)
|
|
||||||
WriteError("Unable to append to safe.data", File);
|
|
||||||
else {
|
|
||||||
sprintf(safe.Date, "%s", (char *) GetDateDMY());
|
sprintf(safe.Date, "%s", (char *) GetDateDMY());
|
||||||
sprintf(safe.Name, "%s", Name);
|
sprintf(safe.Name, "%s", Name);
|
||||||
safe.Trys = 0;
|
safe.Trys = 0;
|
||||||
safe.Opened = 0;
|
safe.Opened = FALSE;
|
||||||
|
tries = 0;
|
||||||
fwrite(&safe, sizeof(safe), 1, pSafe);
|
fwrite(&safe, sizeof(safe), 1, pSafe);
|
||||||
fclose(pSafe);
|
fclose(pSafe);
|
||||||
|
Syslog('+', "Append new safe.data record");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
free(File);
|
free(File);
|
||||||
free(Name);
|
free(Name);
|
||||||
free(Date);
|
free(Date);
|
||||||
|
@ -9,17 +9,17 @@ SRCS = grlist.c m_domain.c m_fgroup.c m_lang.c m_marea.c m_new.c \
|
|||||||
m_limits.c m_menu.c m_ngroup.c m_service.c m_tty.c mutil.c m_archive.c \
|
m_limits.c m_menu.c m_ngroup.c m_service.c m_tty.c mutil.c m_archive.c \
|
||||||
m_fdb.c m_global.c m_magic.c m_mgroup.c m_node.c m_task.c m_users.c \
|
m_fdb.c m_global.c m_magic.c m_mgroup.c m_node.c m_task.c m_users.c \
|
||||||
screen.c m_bbs.c m_ff.c m_hatch.c m_mail.c m_modem.c m_ol.c m_tic.c \
|
screen.c m_bbs.c m_ff.c m_hatch.c m_mail.c m_modem.c m_ol.c m_tic.c \
|
||||||
m_virus.c stlist.c
|
m_virus.c stlist.c m_bbslist.c m_safe.c
|
||||||
HDRS = grlist.h m_domain.h m_fgroup.h m_lang.h m_marea.h m_new.h m_protocol.h \
|
HDRS = grlist.h m_domain.h m_fgroup.h m_lang.h m_marea.h m_new.h m_protocol.h \
|
||||||
m_ticarea.h mutil.h ledit.h m_farea.h m_fido.h m_limits.h m_menu.h \
|
m_ticarea.h mutil.h ledit.h m_farea.h m_fido.h m_limits.h m_menu.h \
|
||||||
m_ngroup.h m_service.h m_tty.h screen.h m_archive.h m_fdb.h m_global.h \
|
m_ngroup.h m_service.h m_tty.h screen.h m_archive.h m_fdb.h m_global.h \
|
||||||
m_magic.h m_mgroup.h m_node.h m_task.h m_users.h stlist.h m_bbs.h m_ff.h \
|
m_magic.h m_mgroup.h m_node.h m_task.h m_users.h stlist.h m_bbs.h m_ff.h \
|
||||||
m_hatch.h m_mail.h m_modem.h m_ol.h m_tic.h m_virus.h
|
m_hatch.h m_mail.h m_modem.h m_ol.h m_tic.h m_virus.h m_bbslist.h m_safe.h
|
||||||
OBJS = grlist.o m_domain.o m_fgroup.o m_lang.o m_marea.o m_new.o m_protocol.o \
|
OBJS = grlist.o m_domain.o m_fgroup.o m_lang.o m_marea.o m_new.o m_protocol.o \
|
||||||
m_ticarea.o mbsetup.o ledit.o m_farea.o m_fido.o m_limits.o m_menu.o \
|
m_ticarea.o mbsetup.o ledit.o m_farea.o m_fido.o m_limits.o m_menu.o \
|
||||||
m_ngroup.o m_service.o m_tty.o mutil.o m_archive.o m_fdb.o m_global.o \
|
m_ngroup.o m_service.o m_tty.o mutil.o m_archive.o m_fdb.o m_global.o \
|
||||||
m_magic.o m_mgroup.o m_node.o m_task.o m_users.o screen.o m_bbs.o m_ff.o \
|
m_magic.o m_mgroup.o m_node.o m_task.o m_users.o screen.o m_bbs.o m_ff.o \
|
||||||
m_hatch.o m_mail.o m_modem.o m_ol.o m_tic.o m_virus.o stlist.o
|
m_hatch.o m_mail.o m_modem.o m_ol.o m_tic.o m_virus.o stlist.o m_bbslist.o m_safe.o
|
||||||
LIBS += ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a
|
LIBS += ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a
|
||||||
OTHER = Makefile
|
OTHER = Makefile
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ m_marea.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib
|
|||||||
m_new.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h grlist.h m_new.h m_lang.h m_marea.h m_ngroup.h
|
m_new.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h grlist.h m_new.h m_lang.h m_marea.h m_ngroup.h
|
||||||
m_protocol.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h screen.h mutil.h ledit.h stlist.h m_global.h m_protocol.h
|
m_protocol.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h screen.h mutil.h ledit.h stlist.h m_global.h m_protocol.h
|
||||||
m_ticarea.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h grlist.h m_global.h m_node.h m_fgroup.h m_farea.h m_archive.h m_ticarea.h
|
m_ticarea.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h grlist.h m_global.h m_node.h m_fgroup.h m_farea.h m_archive.h m_ticarea.h
|
||||||
mbsetup.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_global.h m_bbs.h m_farea.h m_fgroup.h m_mail.h m_mgroup.h m_hatch.h m_tic.h m_ticarea.h m_magic.h m_fido.h m_lang.h m_archive.h m_virus.h m_tty.h m_limits.h m_users.h m_node.h m_fdb.h m_new.h m_ol.h m_protocol.h m_ff.h m_modem.h m_marea.h m_ngroup.h m_service.h m_domain.h m_task.h
|
mbsetup.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_global.h m_bbs.h m_farea.h m_fgroup.h m_mail.h m_mgroup.h m_hatch.h m_tic.h m_ticarea.h m_magic.h m_fido.h m_lang.h m_archive.h m_virus.h m_tty.h m_limits.h m_users.h m_node.h m_fdb.h m_new.h m_ol.h m_bbslist.h m_protocol.h m_ff.h m_modem.h m_marea.h m_ngroup.h m_service.h m_domain.h m_task.h
|
||||||
ledit.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h screen.h mutil.h ledit.h
|
ledit.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h screen.h mutil.h ledit.h
|
||||||
m_farea.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_global.h m_fgroup.h m_archive.h m_farea.h m_fgroup.h m_ngroup.h
|
m_farea.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_global.h m_fgroup.h m_archive.h m_farea.h m_fgroup.h m_ngroup.h
|
||||||
m_fido.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h m_fido.h
|
m_fido.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h m_fido.h
|
||||||
@ -97,7 +97,7 @@ m_node.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/
|
|||||||
m_task.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_task.h
|
m_task.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_task.h
|
||||||
m_users.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_lang.h m_global.h m_archive.h m_protocol.h m_users.h
|
m_users.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_lang.h m_global.h m_archive.h m_protocol.h m_users.h
|
||||||
screen.o: ../lib/libs.h ../lib/structs.h ../lib/ansi.h ../lib/common.h ../lib/clcomm.h screen.h
|
screen.o: ../lib/libs.h ../lib/structs.h ../lib/ansi.h ../lib/common.h ../lib/clcomm.h screen.h
|
||||||
m_bbs.o: ../lib/libs.h ../lib/structs.h ../lib/common.h screen.h mutil.h ledit.h m_lang.h m_protocol.h m_ol.h m_fgroup.h m_farea.h m_menu.h m_bbs.h m_limits.h
|
m_bbs.o: ../lib/libs.h ../lib/structs.h ../lib/common.h screen.h mutil.h ledit.h m_lang.h m_protocol.h m_ol.h m_fgroup.h m_farea.h m_menu.h m_bbs.h m_bbslist.h m_limits.h
|
||||||
m_ff.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h screen.h mutil.h ledit.h stlist.h m_global.h m_ff.h m_lang.h m_marea.h
|
m_ff.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h screen.h mutil.h ledit.h stlist.h m_global.h m_ff.h m_lang.h m_marea.h
|
||||||
m_hatch.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h m_fgroup.h m_ticarea.h m_hatch.h
|
m_hatch.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h m_fgroup.h m_ticarea.h m_hatch.h
|
||||||
m_mail.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h screen.h mutil.h ledit.h m_global.h m_marea.h m_mgroup.h m_mail.h
|
m_mail.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h screen.h mutil.h ledit.h m_global.h m_marea.h m_mgroup.h m_mail.h
|
||||||
@ -106,4 +106,5 @@ m_ol.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/co
|
|||||||
m_tic.o: ../lib/libs.h ../lib/structs.h ../lib/common.h screen.h mutil.h ledit.h m_fgroup.h m_ticarea.h m_magic.h m_hatch.h m_tic.h
|
m_tic.o: ../lib/libs.h ../lib/structs.h ../lib/common.h screen.h mutil.h ledit.h m_fgroup.h m_ticarea.h m_magic.h m_hatch.h m_tic.h
|
||||||
m_virus.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h screen.h mutil.h ledit.h stlist.h m_global.h m_virus.h
|
m_virus.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h screen.h mutil.h ledit.h stlist.h m_global.h m_virus.h
|
||||||
stlist.o: ../lib/libs.h ../lib/structs.h ../lib/common.h ../lib/clcomm.h stlist.h
|
stlist.o: ../lib/libs.h ../lib/structs.h ../lib/common.h ../lib/clcomm.h stlist.h
|
||||||
|
m_bbslist.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_global.h m_bbslist.h
|
||||||
# End of generated dependencies
|
# End of generated dependencies
|
||||||
|
@ -1,18 +1,13 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: m_bbs.c
|
* $Id$
|
||||||
* Purpose ...............: BBS Setup Program
|
* Purpose ...............: BBS Setup Program
|
||||||
* Last modification date : 17-Jul-1999
|
|
||||||
* Todo ..................:
|
|
||||||
* Edit BBS lists
|
|
||||||
* Edit timebank data
|
|
||||||
* Edit safe data
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-1999
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:2801/16
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10 Internet: mbroek@ux123.pttnwb.nl
|
* Beekmansbos 10
|
||||||
* 1971 BV IJmuiden
|
* 1971 BV IJmuiden
|
||||||
* the Netherlands
|
* the Netherlands
|
||||||
*
|
*
|
||||||
@ -45,10 +40,13 @@
|
|||||||
#include "m_fgroup.h"
|
#include "m_fgroup.h"
|
||||||
#include "m_farea.h"
|
#include "m_farea.h"
|
||||||
#include "m_menu.h"
|
#include "m_menu.h"
|
||||||
|
#include "m_safe.h"
|
||||||
#include "m_bbs.h"
|
#include "m_bbs.h"
|
||||||
|
#include "m_bbslist.h"
|
||||||
#include "m_limits.h"
|
#include "m_limits.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void bbs_menu(void)
|
void bbs_menu(void)
|
||||||
{
|
{
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@ -64,38 +62,33 @@ void bbs_menu(void)
|
|||||||
mvprintw(11, 6, "5. Edit Transfer Protocols");
|
mvprintw(11, 6, "5. Edit Transfer Protocols");
|
||||||
mvprintw(12, 6, "6. Edit BBS List Data");
|
mvprintw(12, 6, "6. Edit BBS List Data");
|
||||||
mvprintw(13, 6, "7. Edit Oneliners");
|
mvprintw(13, 6, "7. Edit Oneliners");
|
||||||
mvprintw(14, 6, "8. Edit TimeBank data");
|
mvprintw(14, 6, "8. Edit Safecracker Data");
|
||||||
mvprintw(15, 6, "9. Edit Safe Cracker data");
|
|
||||||
|
|
||||||
switch(select_menu(9)) {
|
switch(select_menu(8)) {
|
||||||
case 0:
|
case 0: return;
|
||||||
return;
|
|
||||||
|
|
||||||
case 1:
|
case 1: EditLimits();
|
||||||
EditLimits();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2: EditLanguage();
|
||||||
EditLanguage();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3: EditMenus();
|
||||||
EditMenus();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4: EditFilearea();
|
||||||
EditFilearea();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5: EditProtocol();
|
||||||
EditProtocol();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6: bbslist_menu();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7: ol_menu();
|
||||||
ol_menu();
|
break;
|
||||||
|
|
||||||
|
case 8: EditSafe();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@ int EditOnelRec(int Area)
|
|||||||
working(0, 0, 0);
|
working(0, 0, 0);
|
||||||
|
|
||||||
set_color(WHITE, BLACK);
|
set_color(WHITE, BLACK);
|
||||||
mvprintw( 5, 2, "8.8.1 EDIT ONELINER");
|
mvprintw( 5, 2, "8.7.1 EDIT ONELINER");
|
||||||
set_color(CYAN, BLACK);
|
set_color(CYAN, BLACK);
|
||||||
mvprintw( 7, 2, "1. Text");
|
mvprintw( 7, 2, "1. Text");
|
||||||
mvprintw( 8, 2, "2. User");
|
mvprintw( 8, 2, "2. User");
|
||||||
@ -323,7 +323,7 @@ void EditOneline(void)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
clr_index();
|
clr_index();
|
||||||
set_color(WHITE, BLACK);
|
set_color(WHITE, BLACK);
|
||||||
mvprintw( 5, 2, "8.8.1 ONELINERS SETUP");
|
mvprintw( 5, 2, "8.7.1 ONELINERS SETUP");
|
||||||
set_color(CYAN, BLACK);
|
set_color(CYAN, BLACK);
|
||||||
if (records != 0) {
|
if (records != 0) {
|
||||||
sprintf(temp, "%s/etc/oneline.temp", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/oneline.temp", getenv("MBSE_ROOT"));
|
||||||
@ -409,7 +409,7 @@ void PurgeOneline(void)
|
|||||||
|
|
||||||
clr_index();
|
clr_index();
|
||||||
set_color(WHITE, BLACK);
|
set_color(WHITE, BLACK);
|
||||||
mvprintw( 5, 6, "7.8.2 ONELINERS PURGE");
|
mvprintw( 5, 6, "8.7.2 ONELINERS PURGE");
|
||||||
set_color(CYAN, BLACK);
|
set_color(CYAN, BLACK);
|
||||||
working(1, 0, 0);
|
working(1, 0, 0);
|
||||||
|
|
||||||
@ -473,7 +473,7 @@ void ImportOneline(void)
|
|||||||
|
|
||||||
clr_index();
|
clr_index();
|
||||||
set_color(WHITE, BLACK);
|
set_color(WHITE, BLACK);
|
||||||
mvprintw(5, 6, "8.8.3 IMPORT ONELINERS");
|
mvprintw(5, 6, "8.7.3 IMPORT ONELINERS");
|
||||||
set_color(CYAN, BLACK);
|
set_color(CYAN, BLACK);
|
||||||
memset(&temp, 0, sizeof(temp));
|
memset(&temp, 0, sizeof(temp));
|
||||||
strcpy(temp, edit_str(21, 6,64, temp, (char *)"The ^full path and filename^ of the file to import"));
|
strcpy(temp, edit_str(21, 6,64, temp, (char *)"The ^full path and filename^ of the file to import"));
|
||||||
@ -554,7 +554,7 @@ void ol_menu(void)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
clr_index();
|
clr_index();
|
||||||
set_color(WHITE, BLACK);
|
set_color(WHITE, BLACK);
|
||||||
mvprintw( 5, 6, "8.8 ONELINER SETUP");
|
mvprintw( 5, 6, "8.7 ONELINER SETUP");
|
||||||
set_color(CYAN, BLACK);
|
set_color(CYAN, BLACK);
|
||||||
mvprintw( 7, 6, "1. Edit Oneliners");
|
mvprintw( 7, 6, "1. Edit Oneliners");
|
||||||
mvprintw( 8, 6, "2. Purge Oneliners");
|
mvprintw( 8, 6, "2. Purge Oneliners");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* m_ol.h */
|
/* $Id$ */
|
||||||
|
|
||||||
#ifndef _OL_H
|
#ifndef _OL_H
|
||||||
#define _OL_H
|
#define _OL_H
|
||||||
|
@ -58,6 +58,8 @@
|
|||||||
#include "m_fdb.h"
|
#include "m_fdb.h"
|
||||||
#include "m_new.h"
|
#include "m_new.h"
|
||||||
#include "m_ol.h"
|
#include "m_ol.h"
|
||||||
|
#include "m_bbslist.h"
|
||||||
|
#include "m_safe.h"
|
||||||
#include "m_protocol.h"
|
#include "m_protocol.h"
|
||||||
#include "m_ff.h"
|
#include "m_ff.h"
|
||||||
#include "m_modem.h"
|
#include "m_modem.h"
|
||||||
@ -360,6 +362,8 @@ void initdatabases(void)
|
|||||||
InitNGroup();
|
InitNGroup();
|
||||||
InitNodes();
|
InitNodes();
|
||||||
InitOneline();
|
InitOneline();
|
||||||
|
InitBBSlist();
|
||||||
|
InitSafe();
|
||||||
InitProtocol();
|
InitProtocol();
|
||||||
InitService();
|
InitService();
|
||||||
InitTicarea();
|
InitTicarea();
|
||||||
|
Reference in New Issue
Block a user