]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_kicknorejoin.cpp
Always set the topic in Channel::SetTopic(), move access checks into cmd_topic
[user/henk/code/inspircd.git] / src / modules / m_kicknorejoin.cpp
index 2f0c15bf3a0c113cca93aa51bace58a33a8a8b3c..01d3aee71843939ee104c26ba025df10419a62ff 100644 (file)
@@ -42,7 +42,7 @@ class KickRejoin : public ModeHandler
        {
        }
 
-       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) CXX11_OVERRIDE
        {
                if (adding)
                {
@@ -56,7 +56,6 @@ class KickRejoin : public ModeHandler
                                v = max;
 
                        parameter = ConvToStr(v);
-                       channel->SetModeParam(this, parameter);
                }
                else
                {
@@ -64,7 +63,6 @@ class KickRejoin : public ModeHandler
                                return MODEACTION_DENY;
 
                        ext.unset(channel);
-                       channel->SetModeParam(this, "");
                }
                return MODEACTION_ALLOW;
        }
@@ -80,7 +78,7 @@ public:
        {
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
                ServerInstance->Modules->AddService(kr);
                ServerInstance->Modules->AddService(kr.ext);
@@ -88,7 +86,7 @@ public:
                ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
-       ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+       ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE
        {
                if (chan)
                {
@@ -115,14 +113,14 @@ public:
                                        }
                                }
 
-                               if (!dl->size())
+                               if (dl->empty())
                                        kr.ext.unset(chan);
                        }
                }
                return MOD_RES_PASSTHRU;
        }
 
-       void OnUserKick(User* source, Membership* memb, const std::string &reason, CUList& excepts)
+       void OnUserKick(User* source, Membership* memb, const std::string &reason, CUList& excepts) CXX11_OVERRIDE
        {
                if (memb->chan->IsModeSet(&kr) && (IS_LOCAL(memb->user)) && (source != memb->user))
                {
@@ -136,7 +134,7 @@ public:
                }
        }
 
-       Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Channel mode to delay rejoin after kick", VF_VENDOR);
        }