]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_messageflood.cpp
m_spanningtree Remove duplicate code for sending channel messages from RouteCommand()
[user/henk/code/inspircd.git] / src / modules / m_messageflood.cpp
index 2e91cdf062111fd6ae5e1ca61979f33abdf076a7..ef7bf9d5266b2cf005c91647d95831fdeaa5c1e1 100644 (file)
@@ -25,8 +25,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides channel mode +f (message flood protection) */
-
 /** Holds flood settings and state for mode +f
  */
 class floodsettings
@@ -106,7 +104,7 @@ class MsgFlood : public ModeHandler
                }
                else
                {
-                       if (!channel->IsModeSet('f'))
+                       if (!channel->IsModeSet(this))
                                return MODEACTION_DENY;
 
                        ext.unset(channel);
@@ -130,12 +128,11 @@ class ModuleMsgFlood : public Module
        {
                ServerInstance->Modules->AddService(mf);
                ServerInstance->Modules->AddService(mf.ext);
-               ServerInstance->Modules->Attach(I_OnUserPreMessage, this);
        }
 
        ModResult ProcessMessages(User* user,Channel* dest, const std::string &text)
        {
-               if ((!IS_LOCAL(user)) || !dest->IsModeSet('f'))
+               if ((!IS_LOCAL(user)) || !dest->IsModeSet(mf))
                        return MOD_RES_PASSTHRU;
 
                if (ServerInstance->OnCheckExemption(user,dest,"flood") == MOD_RES_ALLOW)