Fixed errormessage if chatserver is not available
This commit is contained in:
parent
78b302fa31
commit
7839533555
@ -46,6 +46,7 @@ v0.71.5 18-Aug-2005
|
||||
Code cleanup.
|
||||
Changed syntax for calling mbpasswd.
|
||||
Blocked sysop to chat and page the sysop. Sysops use mbmon.
|
||||
Fixed errormessage if chatserver is not available.
|
||||
|
||||
mbnewusr:
|
||||
Changed syntax for calling mbpasswd.
|
||||
@ -61,6 +62,9 @@ v0.71.5 18-Aug-2005
|
||||
Added node setup switch to override node Hold or Down status.
|
||||
Changed syntax for calling mbpasswd.
|
||||
|
||||
mbmon:
|
||||
Fixed error if chatserver is not available.
|
||||
|
||||
script:
|
||||
Added mbfile check to monthly maintenance script.
|
||||
|
||||
|
@ -542,7 +542,7 @@ void Chat(int sysop)
|
||||
{
|
||||
int curpos = 0, stop = FALSE, data, rc;
|
||||
unsigned char ch = 0;
|
||||
char sbuf[81], resp[128], *cnt, *msg;
|
||||
char sbuf[81], resp[128];
|
||||
static char buf[200];
|
||||
|
||||
clr_index();
|
||||
@ -554,12 +554,9 @@ void Chat(int sysop)
|
||||
if (socket_send(buf) == 0) {
|
||||
strcpy(buf, socket_receive());
|
||||
Syslog('-', "< %s", buf);
|
||||
if (strncmp(buf, "100:1,", 6) == 0) {
|
||||
cnt = strtok(buf, ",");
|
||||
msg = strtok(NULL, "\0");
|
||||
msg[strlen(msg)-1] = '\0';
|
||||
if (strncmp(buf, "200:1,", 6) == 0) {
|
||||
set_color(LIGHTRED, BLACK);
|
||||
mbse_mvprintw(4, 1, msg);
|
||||
mbse_mvprintw(4, 1, (char *)"The chatserver is not configured in /etc/services");
|
||||
working(2, 0, 0);
|
||||
working(0, 0, 0);
|
||||
center_addstr(lines -4, (char *)"Press any key");
|
||||
|
@ -162,7 +162,7 @@ void Chat(char *username, char *channel)
|
||||
{
|
||||
int curpos = 0, stop = FALSE, data, rc;
|
||||
unsigned char ch;
|
||||
char sbuf[81], resp[128], *cnt, *msg;
|
||||
char sbuf[81], resp[128];
|
||||
static char buf[200];
|
||||
|
||||
WhosDoingWhat(SYSOPCHAT, NULL);
|
||||
@ -213,13 +213,11 @@ void Chat(char *username, char *channel)
|
||||
if (socket_send(buf) == 0) {
|
||||
strncpy(buf, socket_receive(), sizeof(buf)-1);
|
||||
Syslog('c', "< %s", buf);
|
||||
if (strncmp(buf, "100:1,", 6) == 0) {
|
||||
cnt = strtok(buf, ",");
|
||||
msg = strtok(NULL, "\0");
|
||||
msg[strlen(msg)-1] = '\0';
|
||||
if (strncmp(buf, "200:1,", 6) == 0) {
|
||||
Syslog('!', "Chatsever is not available");
|
||||
colour(LIGHTRED, BLACK);
|
||||
mvprintw(4, 1, msg);
|
||||
sleep(2);
|
||||
mvprintw(4, 1, (char *)"Sorry, the chatserver is not available");
|
||||
Enter(2);
|
||||
Pause();
|
||||
chat_with_sysop = FALSE;
|
||||
return;
|
||||
|
Reference in New Issue
Block a user