From: Mario Date: Sat, 15 Jul 2017 15:55:08 +0000 (+1000) Subject: Don't perform floodcontrol checks if there is no source entity X-Git-Tag: xonotic-v0.8.5~2636 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d52d30489d9115119e30ac499733ef9dfe6f9a01;p=xonotic%2Fxonotic-data.pk3dir.git Don't perform floodcontrol checks if there is no source entity --- diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index eebb7d969..e85419cfe 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -34,7 +34,7 @@ CLASS(Client, Object) ATTRIB(Client, playerid, int, this.playerid); ATTRIB(Client, parm_idlesince, int, this.parm_idlesince); - ATTRIB(Client, muted, int, this.muted); + ATTRIB(Client, muted, bool, this.muted); METHOD(Client, m_unwind, bool(Client this)); diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index 70e972da8..fcb29523c 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -838,7 +838,7 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc // FLOOD CONTROL int flood = 0; var .float flood_field = floodcontrol_chat; - if(floodcontrol) + if(floodcontrol && source) { float flood_spl; float flood_burst;