]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nickflood.cpp
Replace hardcoded mode letters, part 3
[user/henk/code/inspircd.git] / src / modules / m_nickflood.cpp
index e7533fc07f29f3de2df873ee695e865d32c162c0..742f71d02cf7cd8b3bee02ac2b9a1ee153401cee 100644 (file)
@@ -20,8 +20,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides channel mode +F (nick flood protection) */
-
 /** Holds settings and state associated with channel mode +F
  */
 class nickfloodsettings
@@ -115,16 +113,14 @@ class NickFlood : public ModeHandler
 
                        ext.set(channel, new nickfloodsettings(nsecs, nnicks));
                        parameter = ConvToStr(nnicks) + ":" + ConvToStr(nsecs);
-                       channel->SetModeParam('F', parameter);
                        return MODEACTION_ALLOW;
                }
                else
                {
-                       if (!channel->IsModeSet('F'))
+                       if (!channel->IsModeSet(this))
                                return MODEACTION_DENY;
 
                        ext.unset(channel);
-                       channel->SetModeParam('F', "");
                        return MODEACTION_ALLOW;
                }
        }
@@ -150,9 +146,6 @@ class ModuleNickFlood : public Module
 
        ModResult OnUserPreNick(User* user, const std::string &newnick) CXX11_OVERRIDE
        {
-               if (ServerInstance->NICKForced.get(user)) /* Allow forced nick changes */
-                       return MOD_RES_PASSTHRU;
-
                for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
                {
                        Channel *channel = *i;