]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
Remove InspIRCd* parameters and fields
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index 17e9cd50e3befcd2a48b8be5c306af8a784e5e36..c0816419f1f1880a9c5a3f6dad7ee2fcf5232c64 100644 (file)
@@ -33,7 +33,7 @@ timedbans TimedBanList;
 class CommandTban : public Command
 {
  public:
-       CommandTban (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"TBAN", 0, 3)
+       CommandTban(Module* Creator) : Command(Creator,"TBAN", 3)
        {
                syntax = "<channel> <duration> <banmask>";
                TRANSLATE4(TR_TEXT, TR_TEXT, TR_TEXT, TR_END);
@@ -44,8 +44,8 @@ class CommandTban : public Command
                Channel* channel = ServerInstance->FindChan(parameters[0]);
                if (channel)
                {
-                       int cm = channel->GetStatus(user);
-                       if ((cm == STATUS_HOP) || (cm == STATUS_OP))
+                       int cm = channel->GetPrefixValue(user);
+                       if ((cm == HALFOP_VALUE) || (cm == OP_VALUE))
                        {
                                if (!ServerInstance->IsValidMask(parameters[2]))
                                {
@@ -118,8 +118,8 @@ class ModuleTimedBans : public Module
 {
        CommandTban cmd;
  public:
-       ModuleTimedBans(InspIRCd* Me)
-               : Module(Me), cmd(Me, this)
+       ModuleTimedBans()
+               : cmd(this)
        {
                ServerInstance->AddCommand(&cmd);
                TimedBanList.clear();
@@ -187,7 +187,7 @@ class ModuleTimedBans : public Module
 
        virtual Version GetVersion()
        {
-               return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("Adds timed bans", VF_COMMON | VF_VENDOR, API_VERSION);
        }
 };