aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_messageflood.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-01-02 19:01:57 +0100
committerGravatar attilamolnar2013-01-02 19:01:57 +0100
commit3988e9779e95c4d758a489ca4dc49138a0a0f26f (patch)
tree9861ebf4d003ca2da03420daf94e2102e48e69fb /src/modules/m_messageflood.cpp
parentm_banredirect Deny the join to the redirect channel if it has a redirecting b... (diff)
m_messageflood Ask to be the last to handle OnUserPreMessage/OnUserPreNotice
Fixes #394 reported by @JDowny
Diffstat (limited to 'src/modules/m_messageflood.cpp')
-rw-r--r--src/modules/m_messageflood.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index 814eee5ef..9ff17924d 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -188,8 +188,11 @@ class ModuleMsgFlood : public Module
return MOD_RES_PASSTHRU;
}
- ~ModuleMsgFlood()
+ void Prioritize()
{
+ // we want to be after all modules that might deny the message (e.g. m_muteban, m_noctcp, m_blockcolor, etc.)
+ ServerInstance->Modules->SetPriority(this, I_OnUserPreMessage, PRIORITY_LAST);
+ ServerInstance->Modules->SetPriority(this, I_OnUserPreNotice, PRIORITY_LAST);
}
Version GetVersion()