Blocked sysop to page and chat from the bbs

This commit is contained in:
Michiel Broek 2005-08-29 14:06:54 +00:00
parent ce6749c55c
commit cd22f3920f
3 changed files with 28 additions and 2 deletions

View File

@ -41,6 +41,7 @@ v0.71.5 18-Aug-2005
mbsebbs: mbsebbs:
Code cleanup. Code cleanup.
Changed syntax for calling mbpasswd. Changed syntax for calling mbpasswd.
Blocked sysop to chat and page the sysop. Sysops use mbmon.
mbnewusr: mbnewusr:
Changed syntax for calling mbpasswd. Changed syntax for calling mbpasswd.

View File

@ -170,7 +170,18 @@ void Chat(char *username, char *channel)
rsize = exitinfo.iScreenLen - 5; rsize = exitinfo.iScreenLen - 5;
rpointer = 0; rpointer = 0;
if (SYSOP == TRUE) {
/*
* Forbid the sysop to chat, the sysop MUST use mbmon.
*/
Syslog('+', "The Sysop attempted to chat");
pout(LIGHTRED, BLACK, (char *)"The Sysop cannot use the bbs to chat! Use mbmon to chat.");
Enter(1);
Pause();
return;
}
if (username && channel) { if (username && channel) {
colour(LIGHTGREEN, BLACK); colour(LIGHTGREEN, BLACK);
PUTCHAR('\007'); PUTCHAR('\007');

View File

@ -56,9 +56,22 @@ void Page_Sysop(char *String)
char *Reason, temp[81]; char *Reason, temp[81];
static char buf[128]; static char buf[128];
clear();
if (SYSOP == TRUE) {
/*
* Forbid the sysop to page, paging himself causes troubles on the
* chatserver, the sysop can only use mbmon.
*/
Syslog('+', "The Sysop attempted to page the Sysop");
pout(LIGHTRED, BLACK, (char *)"The Sysop cannot page the Sysop!");
Enter(1);
Pause();
return;
}
Reason = calloc(81, sizeof(char)); Reason = calloc(81, sizeof(char));
clear();
/* MBSE BBS Chat */ /* MBSE BBS Chat */
poutCenter(LIGHTRED, BLACK, (char *) Language(151)); poutCenter(LIGHTRED, BLACK, (char *) Language(151));
@ -90,6 +103,7 @@ void Page_Sysop(char *String)
locate(7, 2); locate(7, 2);
colour(LIGHTGRAY, BLACK); colour(LIGHTGRAY, BLACK);
temp[0] = '\0';
GetPageStr(temp, 76); GetPageStr(temp, 76);
if ((strcmp(temp, "")) == 0) if ((strcmp(temp, "")) == 0)