[mw-devel] MW3 r1247 - trunk/src/webclient
tswsl1989 at sucs.org
tswsl1989 at sucs.org
Fri Mar 4 15:54:44 GMT 2011
Author: tswsl1989
Date: 2011-03-04 15:54:44 +0000 (Fri, 04 Mar 2011)
New Revision: 1247
Modified:
trunk/src/webclient/mwpoll.c
Log:
Prevent banned users from logging into the talker via the web client.
TODO: Find a sensible way of telling the user that they've been banned.
Currently user only receives a "Session Closed" message
Modified: trunk/src/webclient/mwpoll.c
===================================================================
--- trunk/src/webclient/mwpoll.c 2011-01-27 16:45:00 UTC (rev 1246)
+++ trunk/src/webclient/mwpoll.c 2011-03-04 15:54:44 UTC (rev 1247)
@@ -216,9 +216,16 @@
create_pipe();
open_incoming_fifo();
open_command_socket();
+
+ if (user->status&(1<<3)) {
+ close_fifo();
+ close_cmd();
+ return 0;
+ }
+
who_add(getpid(),userposn);
lastcomm = time(NULL);
-
+
/* spock, announce us please... */
//broadcast_onoffcode(3, 0, user->name, NULL);
talk_rawbcast("\03310%s has just joined web talker room %d", user->name, user->room);
More information about the mw-devel
mailing list