From 879bf81d800bd086cb2c2eef162be744dbb1f3cb Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Mon, 20 Mar 2017 11:47:36 +1000 Subject: [PATCH] Fixes to magichat client --- chat_system.c | 4 +++- main.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/chat_system.c b/chat_system.c index ace41d7..4d4d0ff 100644 --- a/chat_system.c +++ b/chat_system.c @@ -149,7 +149,7 @@ void chat_system(struct user_record *user) { } memset(inputbuffer, 0, 80); - if (conf.mgchat_server == NULL) { + if (conf.mgchat_server == NULL && conf.mgchat_bbstag != NULL) { s_putstring(get_string(49)); return; } @@ -186,6 +186,8 @@ void chat_system(struct user_record *user) { memset(screenbuffer[i], 0, 81); } + raw("{ \"bbstag\": \"%s\", \"nick\": \"%s\", \"msg\": \"LOGIN\" }", conf.mgchat_bbstag, user->loginname); + while (1) { FD_ZERO(&fds); FD_SET(chat_in, &fds); diff --git a/main.c b/main.c index 7fd2c04..0812275 100644 --- a/main.c +++ b/main.c @@ -1083,6 +1083,7 @@ int main(int argc, char **argv) { conf.file_directory_count = 0; conf.mgchat_server = NULL; conf.mgchat_port = 2025; + conf.mgchat_bbstag = NULL; conf.text_file_count = 0; conf.external_editor_cmd = NULL; conf.log_path = NULL;