From b3ccdf3809277638ec5ca37fa5a4a8527397ddf7 Mon Sep 17 00:00:00 2001 From: Isabel Jenkins Date: Wed, 21 Jun 2017 19:47:58 +0100 Subject: [PATCH 1/2] Added silent entry mode for webclient --- src/webclient/mwpoll.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/webclient/mwpoll.c b/src/webclient/mwpoll.c index 58191d6e..a68f3d0c 100644 --- a/src/webclient/mwpoll.c +++ b/src/webclient/mwpoll.c @@ -54,6 +54,7 @@ static void usage(const char *name) printf("-c channel Initial channel to join\n"); printf("-d Debug (foreground) mode\n"); printf("-s Session mode for sucssite\n"); + printf("-q Quiet Entry\n"); printf("-a Auto create user if required\n"); printf("-h host:port Specify alternate server to connect to.\n"); } @@ -64,6 +65,7 @@ int main(int argc, char ** argv) int channel = 0; int debug = 0; int dbsession = 0; + int quietentry = 0; int autocreate = 0; const char *username = NULL; const char *hostname = NULL; @@ -87,6 +89,9 @@ int main(int argc, char ** argv) case 's': dbsession++; break; + case 'q': + quietentry++; + break; case 'a': autocreate++; break; @@ -220,7 +225,9 @@ int main(int argc, char ** argv) /* spock, announce us please... */ //broadcast_onoffcode(3, 0, user->name, NULL); - talk_rawbcast("\03310%s has just joined web talker room %d", me.record.name, me.record.room); + if (!quietentry) { + talk_rawbcast("\03310%s has just joined web talker room %d", me.record.name, me.record.room); + } broadcast_onoffcode(1, 0, me.record.name, NULL); /* the main loop */ -- GitLab From a6ef8ff603f3a3cb4dff46883883956f81f267d0 Mon Sep 17 00:00:00 2001 From: Isabel Jenkins Date: Thu, 22 Jun 2017 09:41:05 +0100 Subject: [PATCH 2/2] Updated mwpoll for quiet exit as well as entry --- src/webclient/mwpoll.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webclient/mwpoll.c b/src/webclient/mwpoll.c index a68f3d0c..e846ddd5 100644 --- a/src/webclient/mwpoll.c +++ b/src/webclient/mwpoll.c @@ -54,7 +54,7 @@ static void usage(const char *name) printf("-c channel Initial channel to join\n"); printf("-d Debug (foreground) mode\n"); printf("-s Session mode for sucssite\n"); - printf("-q Quiet Entry\n"); + printf("-q Quiet entry\n"); printf("-a Auto create user if required\n"); printf("-h host:port Specify alternate server to connect to.\n"); } @@ -248,7 +248,9 @@ int main(int argc, char ** argv) me.record.chatmode = cm_clear(&me, CM_ONCHAT); update_user(user); - talk_rawbcast("\03311%s has just left the web talker", me.record.name); + if (!quietentry) { + talk_rawbcast("\03311%s has just left the web talker", me.record.name); + } broadcast_onoffcode(0,0,me.record.name,NULL); #if 0 switch (die) { -- GitLab