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:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user