]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
Argh, i give up
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index 682fc2f013f1e2946fdd07acffc7523bb632e8a2..0e40dc0ea1a9f99edf77451badb8c7a46c7265ce 100644 (file)
@@ -94,7 +94,8 @@ class CommandTban : public Command
                                }
                                return CMD_FAILURE;
                        }
-                       else user->WriteServ("482 %s %s :You must be at least a half-operator to change modes on this channel",user->nick, channel->name);
+                       else user->WriteServ("482 %s %s :You must be at least a%soperator to change modes on this channel",user->nick, channel->name,
+                                       ServerInstance->Config->AllowHalfop ? " half-" : " channel ");
                        return CMD_FAILURE;
                }
                user->WriteServ("401 %s %s :No such channel",user->nick, parameters[0]);
@@ -113,6 +114,8 @@ class ModuleTimedBans : public Module
                mycommand = new CommandTban(ServerInstance);
                ServerInstance->AddCommand(mycommand);
                TimedBanList.clear();
+               Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer };
+               ServerInstance->Modules->Attach(eventlist, this, 2);
        }
        
        virtual ~ModuleTimedBans()
@@ -120,10 +123,6 @@ class ModuleTimedBans : public Module
                TimedBanList.clear();
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnDelBan] = List[I_OnBackgroundTimer] = 1;
-       }
 
        virtual int OnDelBan(User* source, Channel* chan, const std::string &banmask)
        {