]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
m_modenotice Use WriteNotice()
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index afb042da02041891734d28b208988d7d02b80950..0801c9c52a3c62f829fabb95834720a49eb4a99a 100644 (file)
@@ -79,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");
@@ -150,7 +150,6 @@ class ModuleTimedBans : public Module
 
        void init() CXX11_OVERRIDE
        {
-               ServerInstance->Modules->AddService(cmd);
                ServerInstance->Modes->AddModeWatcher(&banwatcher);
        }