]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_messageflood.cpp
A little less debug saying WEEEE :]
[user/henk/code/inspircd.git] / src / modules / m_messageflood.cpp
index ff80528fa5d987bbcad686aaa42fbf505f82a35d..638eda6b0e9f9da2ac10d59d5ee68237e7af764c 100644 (file)
@@ -92,7 +92,7 @@ class MsgFlood : public ModeHandler
                return (their_param < our_param);
        }
 
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
        {
                floodsettings *f;
 
@@ -140,8 +140,8 @@ class MsgFlood : public ModeHandler
                                        if (!channel->GetExt("flood", f))
                                        {
                                                parameter = std::string(ban ? "*" : "") + ConvToStr(nlines) + ":" +ConvToStr(nsecs);
-                                               floodsettings *f = new floodsettings(ban,nsecs,nlines);
-                                               channel->Extend("flood",f);
+                                               floodsettings *fs = new floodsettings(ban,nsecs,nlines);
+                                               channel->Extend("flood",fs);
                                                channel->SetMode('f', true);
                                                channel->SetModeParam('f', parameter.c_str(), true);
                                                return MODEACTION_ALLOW;
@@ -160,9 +160,9 @@ class MsgFlood : public ModeHandler
                                                        if (((nlines != f->lines) || (nsecs != f->secs)) && ((nsecs > 0) && (nlines > 0)) || (ban != f->ban))
                                                        {
                                                                delete f;
-                                                               floodsettings *f = new floodsettings(ban,nsecs,nlines);
+                                                               floodsettings *fs = new floodsettings(ban,nsecs,nlines);
                                                                channel->Shrink("flood");
-                                                               channel->Extend("flood",f);
+                                                               channel->Extend("flood",fs);
                                                                channel->SetModeParam('f', cur_param.c_str(), false);
                                                                channel->SetModeParam('f', parameter.c_str(), true);
                                                                return MODEACTION_ALLOW;
@@ -209,7 +209,7 @@ class ModuleMsgFlood : public Module
        {
                
                mf = new MsgFlood(ServerInstance);
-               if (!ServerInstance->AddMode(mf))
+               if (!ServerInstance->Modes->AddMode(mf))
                        throw ModuleException("Could not add new modes!");
                Implementation eventlist[] = { I_OnChannelDelete, I_OnUserPreNotice, I_OnUserPreMessage };
                ServerInstance->Modules->Attach(eventlist, this, 3);