]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockamsg.cpp
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / src / modules / m_blockamsg.cpp
index b0001574a0dfee2bd5360371d3c4a76d091ea60a..736c165293c8f32671e0827278f1ea87987cbd0f 100644 (file)
@@ -37,7 +37,7 @@ enum BlockAction { IBLOCK_KILL, IBLOCK_KILLOPERS, IBLOCK_NOTICE, IBLOCK_NOTICEOP
  */
 class BlockedMessage
 {
-public:
+ public:
        std::string message;
        irc::string target;
        time_t sent;
@@ -62,13 +62,9 @@ class ModuleBlockAmsg : public Module
        void init()
        {
                this->OnRehash(NULL);
-               ServerInstance->Extensions.Register(&blockamsg);
+               ServerInstance->Modules->AddService(blockamsg);
                Implementation eventlist[] = { I_OnRehash, I_OnPreCommand };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
-       }
-
-       virtual ~ModuleBlockAmsg()
-       {
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual Version GetVersion()
@@ -169,5 +165,4 @@ class ModuleBlockAmsg : public Module
        }
 };
 
-
 MODULE_INIT(ModuleBlockAmsg)