]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delaymsg.cpp
Tidy up keywords on module methods.
[user/henk/code/inspircd.git] / src / modules / m_delaymsg.cpp
index 63da04a63cedfb7cfe27378a93c31b787d94585c..752112a56d2bb5fc2706fe074805fb5336a5d870 100644 (file)
@@ -41,24 +41,22 @@ class DelayMsgMode : public ModeHandler
 
 class ModuleDelayMsg : public Module
 {
- private:
        DelayMsgMode djm;
  public:
        ModuleDelayMsg() : djm(this)
        {
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
-               if (!ServerInstance->Modes->AddMode(&djm))
-                       throw ModuleException("Could not add new modes!");
-               ServerInstance->Extensions.Register(&djm.jointime);
+               ServerInstance->Modules->AddService(djm);
+               ServerInstance->Modules->AddService(djm.jointime);
                Implementation eventlist[] = { I_OnUserJoin, I_OnUserPreMessage};
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
-       Version GetVersion();
-       void OnUserJoin(Membership* memb, bool sync, bool created, CUList&);
-       ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string &text, char status, CUList &exempt_list);
+       Version GetVersion() CXX11_OVERRIDE;
+       void OnUserJoin(Membership* memb, bool sync, bool created, CUList&) CXX11_OVERRIDE;
+       ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string &text, char status, CUList &exempt_list) CXX11_OVERRIDE;
 };
 
 ModeAction DelayMsgMode::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
@@ -146,4 +144,3 @@ ModResult ModuleDelayMsg::OnUserPreMessage(User* user, void* dest, int target_ty
 }
 
 MODULE_INIT(ModuleDelayMsg)
-