From d52d30489d9115119e30ac499733ef9dfe6f9a01 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 16 Jul 2017 01:55:08 +1000 Subject: [PATCH] Don't perform floodcontrol checks if there is no source entity --- qcsrc/server/client.qh | 2 +- qcsrc/server/player.qc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2