]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nickflood.cpp
Remove spanningtree override of /LUSERS
[user/henk/code/inspircd.git] / src / modules / m_nickflood.cpp
index 26d04835ae62ff4f0e6b7bdd4142350653a6334f..f34cc81e42700708086a8b85a8bcf6f37918a1aa 100644 (file)
@@ -17,7 +17,7 @@
 
 /** Holds settings and state associated with channel mode +F
  */
-class nickfloodsettings : public classbase
+class nickfloodsettings
 {
  public:
        int secs;
@@ -92,15 +92,6 @@ class NickFlood : public ModeHandler
        NickFlood(Module* Creator) : ModeHandler(Creator, "nickflood", 'F', PARAM_SETONLY, MODETYPE_CHANNEL),
                ext("nickflood", Creator) { }
 
-       ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
-       {
-               nickfloodsettings* x = ext.get(channel);
-               if (x)
-                       return std::make_pair(true, ConvToStr(x->nicks)+":"+ConvToStr(x->secs));
-               else
-                       return std::make_pair(false, parameter);
-       }
-
        ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
        {
                nickfloodsettings *f = ext.get(channel);
@@ -200,7 +191,7 @@ class ModuleNickFlood : public Module
        {
                if (!ServerInstance->Modes->AddMode(&nf))
                        throw ModuleException("Could not add new modes!");
-               Extensible::Register(&nf.ext);
+               ServerInstance->Extensions.Register(&nf.ext);
                Implementation eventlist[] = { I_OnUserPreNick, I_OnUserPostNick };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
@@ -218,7 +209,7 @@ class ModuleNickFlood : public Module
                        nickfloodsettings *f = nf.ext.get(channel);
                        if (f)
                        {
-                               FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (channel->GetUser(user),channel,"nickflood"));
+                               FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,channel,"nickflood"));
                                if (res == MOD_RES_ALLOW)
                                        continue;
 
@@ -257,7 +248,7 @@ class ModuleNickFlood : public Module
                        nickfloodsettings *f = nf.ext.get(channel);
                        if (f)
                        {
-                               FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (channel->GetUser(user),channel,"nickflood"));
+                               FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,channel,"nickflood"));
                                if (res == MOD_RES_ALLOW)
                                        return;