]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
Include explicit routing information in Command, will replace CMD_LOCALONLY return...
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index c95cf20895f45415e20f2cc3f82d175e2bf6bd0f..31896bfcba0d5e7b79d23dae56dac7e5e52dd845 100644 (file)
@@ -112,14 +112,12 @@ class CommandTban : public Command
 
 class ModuleTimedBans : public Module
 {
-       CommandTban* mycommand;
+       CommandTban cmd;
  public:
        ModuleTimedBans(InspIRCd* Me)
-               : Module(Me)
+               : Module(Me), cmd(Me)
        {
-
-               mycommand = new CommandTban(ServerInstance);
-               ServerInstance->AddCommand(mycommand);
+               ServerInstance->AddCommand(&cmd);
                TimedBanList.clear();
                Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer };
                ServerInstance->Modules->Attach(eventlist, this, 2);
@@ -166,7 +164,7 @@ class ModuleTimedBans : public Module
 
                                        CUList empty;
                                        std::string expiry = "*** Timed ban on " + chan + " expired.";
-                                       cr->WriteChannelWithServ(ServerInstance->FakeClient, true, '@', empty, "NOTICE %s :%s", cr->name.c_str(), expiry.c_str());
+                                       cr->WriteAllExcept(ServerInstance->FakeClient, true, '@', empty, "NOTICE %s :%s", cr->name.c_str(), expiry.c_str());
                                        ServerInstance->PI->SendChannelNotice(cr, '@', expiry);
                                        if (ServerInstance->Config->AllowHalfop)
                                        {