]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_botmode.cpp
m_callerid Route ACCEPT to the server of the target user only, do not send METADATA...
[user/henk/code/inspircd.git] / src / modules / m_botmode.cpp
index 949332ba562b55ec34a90530d8d43ee29ab8a3ca..ca1a9d5c82a2cb0a346502c756aead935b87d00a 100644 (file)
@@ -40,32 +40,25 @@ class ModuleBotMode : public Module
        {
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
-               if (!ServerInstance->Modes->AddMode(&bm))
-                       throw ModuleException("Could not add new modes!");
+               ServerInstance->Modules->AddService(bm);
                Implementation eventlist[] = { I_OnWhois };
                ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
-       virtual ~ModuleBotMode()
-       {
-       }
-
-       virtual Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides user mode +B to mark the user as a bot",VF_VENDOR);
        }
 
-       virtual void OnWhois(User* src, User* dst)
+       void OnWhois(User* src, User* dst) CXX11_OVERRIDE
        {
                if (dst->IsModeSet('B'))
                {
                        ServerInstance->SendWhoisLine(src, dst, 335, src->nick+" "+dst->nick+" :is a bot on "+ServerInstance->Config->Network);
                }
        }
-
 };
 
-
 MODULE_INIT(ModuleBotMode)