message parsing cleanups

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3115 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-10-18 00:03:52 +00:00
parent 1999f29cd0
commit f6cafefcae
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -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);
+1 -2
View File
@@ -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;
}