]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
m_spanningtree Remove SpanningTreeUtilities* fields and parameters
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index 93245432d996332e374d5beaf1dab0ad592036dc..29691b338b54161f6e0dcf6d7b9707f9696ab142 100644 (file)
@@ -20,8 +20,6 @@
  */
 
 
-/* $ModDesc: Adds timed bans */
-
 #include "inspircd.h"
 
 /** Holds a timed ban
@@ -45,7 +43,6 @@ class CommandTban : public Command
        CommandTban(Module* Creator) : Command(Creator,"TBAN", 3)
        {
                syntax = "<channel> <duration> <banmask>";
-               TRANSLATE4(TR_TEXT, TR_TEXT, TR_TEXT, TR_END);
        }
 
        CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -82,9 +79,9 @@ class CommandTban : public Command
                        mask.append("!*@*");
 
                setban.push_back(mask);
-               // use CallHandler to make it so that the user sets the mode
-               // themselves
-               ServerInstance->Parser->CallHandler("MODE",setban,user);
+               // Pass the user (instead of ServerInstance->FakeClient) to ModeHandler::Process() to
+               // make it so that the user sets the mode themselves
+               ServerInstance->Modes->Process(setban, user);
                if (ServerInstance->Modes->GetLastParse().empty())
                {
                        user->WriteNotice("Invalid ban mask");
@@ -154,8 +151,6 @@ class ModuleTimedBans : public Module
        void init() CXX11_OVERRIDE
        {
                ServerInstance->Modules->AddService(cmd);
-               Implementation eventlist[] = { I_OnBackgroundTimer };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
                ServerInstance->Modes->AddModeWatcher(&banwatcher);
        }