]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_services_account.cpp
Fix m_chanlog crashing.
[user/henk/code/inspircd.git] / src / modules / m_services_account.cpp
index e5c62ae6c2d0f9b946bffd60ed45b720a706a0a4..7f9c2e77cf0111bc31bee84b8b102cb71dc39fbc 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
@@ -118,8 +118,13 @@ class ModuleServicesAccount : public Module
                m1 = new AChannel_R(ServerInstance);
                m2 = new AChannel_M(ServerInstance);
                m3 = new AUser_R(ServerInstance);
-               if (!ServerInstance->AddMode(m1) || !ServerInstance->AddMode(m2) || !ServerInstance->AddMode(m3))
+               if (!ServerInstance->Modes->AddMode(m1) || !ServerInstance->Modes->AddMode(m2) || !ServerInstance->Modes->AddMode(m3))
                        throw ModuleException("Could not add new modes!");
+
+               Implementation eventlist[] = { I_OnWhois, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreJoin,
+                       I_OnSyncUserMetaData, I_OnUserQuit, I_OnCleanup, I_OnDecodeMetaData };
+
+               ServerInstance->Modules->Attach(eventlist, this, 8);
        }
 
        /* <- :twisted.oscnet.org 330 w00t2 w00t2 w00t :is logged in as */
@@ -134,11 +139,6 @@ class ModuleServicesAccount : public Module
                }
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnWhois] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1;
-               List[I_OnSyncUserMetaData] = List[I_OnUserQuit] = List[I_OnCleanup] = List[I_OnDecodeMetaData] = 1;
-       }
 
        virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {