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