From f6cafefcae558c382c71371f73c9383e4cee9c71 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sat, 18 Oct 2008 00:03:52 +0000 Subject: [PATCH] message parsing cleanups git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3115 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clients2c.cpp | 5 +++++ source/src/server.cpp | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 75346a5f..2c4a86a6 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -710,6 +710,11 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) getstring(text, p); v = newvotedisplayinfo(d, type, text, NULL); break; + case SA_STOPDEMO: + case SA_REMBANS: + case SA_SHUFFLETEAMS: + v = newvotedisplayinfo(d, type, NULL, NULL); + break; default: itoa(a, getint(p)); v = newvotedisplayinfo(d, type, a, NULL); diff --git a/source/src/server.cpp b/source/src/server.cpp index 65e5c692..70851322 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -2780,10 +2780,9 @@ void process(ENetPacket *packet, int sender, int chan) // sender may be -1 case SV_FLAGACTION: { - if(!m_flags) { disconnect_client(sender, DISC_TAGT); return; } int action = getint(p); int flag = getint(p); - if(flag < 0 || flag > 1 || action < 0 || action > FA_NUM) return; + if(!m_flags || flag < 0 || flag > 1 || action < 0 || action > FA_NUM) break; flagaction(flag, action, sender); break; }