]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delaymsg.cpp
Delete modewatchers when unloading modules that use them to keep the server from...
[user/henk/code/inspircd.git] / src / modules / m_delaymsg.cpp
index 75a1df19a92050cdacc960953acdc3d2226b47db..192bca15f146e20681c2aa643638ce4cd0833840 100644 (file)
@@ -28,19 +28,6 @@ class DelayMsgMode : public ModeHandler
                levelrequired = OP_VALUE;
        }
 
-       ModePair ModeSet(User*, User*, Channel* channel, const std::string &parameter)
-       {
-               std::string climit = channel->GetModeParameter('d');
-               if (!climit.empty())
-               {
-                       return std::make_pair(true, climit);
-               }
-               else
-               {
-                       return std::make_pair(false, parameter);
-               }
-       }
-
        bool ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel*)
        {
                return (atoi(their_param.c_str()) < atoi(our_param.c_str()));
@@ -58,7 +45,7 @@ class ModuleDelayMsg : public Module
        {
                if (!ServerInstance->Modes->AddMode(&djm))
                        throw ModuleException("Could not add new modes!");
-               Extensible::Register(&djm.jointime);
+               ServerInstance->Extensions.Register(&djm.jointime);
                Implementation eventlist[] = { I_OnUserJoin, I_OnUserPreMessage};
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
@@ -100,7 +87,7 @@ ModuleDelayMsg::~ModuleDelayMsg()
 
 Version ModuleDelayMsg::GetVersion()
 {
-       return Version("Provides channelmode +d <int>, to deny messages to a channel until <int> seconds.", VF_COMMON | VF_VENDOR, API_VERSION);
+       return Version("Provides channelmode +d <int>, to deny messages to a channel until <int> seconds.", VF_COMMON | VF_VENDOR);
 }
 
 void ModuleDelayMsg::OnUserJoin(Membership* memb, bool sync, bool created, CUList&)