]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockamsg.cpp
Header update: 2007 -> 2008
[user/henk/code/inspircd.git] / src / modules / m_blockamsg.cpp
index 44f59f34791c4d03f04791e4fa28b51ac182a12a..70fb99b9a25acd68924c14ab45cec9c276b08131 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -44,17 +44,13 @@ class ModuleBlockAmsg : public Module
        BlockAction action;
        
  public:
-       ModuleBlockAmsg(InspIRCd* Me)
-       : Module(Me)
+       ModuleBlockAmsg(InspIRCd* Me) : Module(Me)
        {
-               
                this->OnRehash(NULL,"");
+               Implementation eventlist[] = { I_OnRehash, I_OnPreCommand, I_OnCleanup };
+               ServerInstance->Modules->Attach(eventlist, this, 3);
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnRehash] = List[I_OnPreCommand] = List[I_OnCleanup] = 1;
-       }
        
        virtual ~ModuleBlockAmsg()
        {
@@ -176,7 +172,7 @@ class ModuleBlockAmsg : public Module
                        user->GetExt("amsgblock", m);
                        if(m)
                        {
-                               DELETE(m);
+                               delete m;
                                user->Shrink("amsgblock");
                        }
                }