]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
Introduce ModeProcessFlags, can be passed to ModeParser::Process() to indicate local...
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index ccefe606a19c738f00930ec8d71ecd978c18ffc3..93245432d996332e374d5beaf1dab0ad592036dc 100644 (file)
@@ -115,11 +115,11 @@ class BanWatcher : public ModeWatcher
 {
  public:
        BanWatcher(Module* parent)
-               : ModeWatcher(parent, 'b', MODETYPE_CHANNEL)
+               : ModeWatcher(parent, "ban", MODETYPE_CHANNEL)
        {
        }
 
-       void AfterMode(User* source, User* dest, Channel* chan, const std::string& banmask, bool adding, ModeType type)
+       void AfterMode(User* source, User* dest, Channel* chan, const std::string& banmask, bool adding)
        {
                if (adding)
                        return;
@@ -151,7 +151,7 @@ class ModuleTimedBans : public Module
        {
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
                ServerInstance->Modules->AddService(cmd);
                Implementation eventlist[] = { I_OnBackgroundTimer };
@@ -164,7 +164,7 @@ class ModuleTimedBans : public Module
                ServerInstance->Modes->DelModeWatcher(&banwatcher);
        }
 
-       virtual void OnBackgroundTimer(time_t curtime)
+       void OnBackgroundTimer(time_t curtime) CXX11_OVERRIDE
        {
                timedbans expired;
                for (timedbans::iterator i = TimedBanList.begin(); i != TimedBanList.end();)
@@ -195,12 +195,12 @@ class ModuleTimedBans : public Module
                                cr->WriteAllExcept(ServerInstance->FakeClient, true, '@', empty, "NOTICE %s :%s", cr->name.c_str(), expiry.c_str());
                                ServerInstance->PI->SendChannelNotice(cr, '@', expiry);
 
-                               ServerInstance->SendGlobalMode(setban, ServerInstance->FakeClient);
+                               ServerInstance->Modes->Process(setban, ServerInstance->FakeClient);
                        }
                }
        }
 
-       virtual Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Adds timed bans", VF_COMMON | VF_VENDOR);
        }