]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hostchange.cpp
m_spanningtree Fix crash when connecting to a remote server that has the same name...
[user/henk/code/inspircd.git] / src / modules / m_hostchange.cpp
index 508171c967216f74cf3ecb5428f27fda5c2fda67..7433fccd3e0195953f5ae9d1ad269bc0de868872 100644 (file)
@@ -54,11 +54,11 @@ class ModuleHostChange : public Module
        std::string MySeparator;
 
  public:
-       ModuleHostChange()
-                       {
+       void init()
+       {
                OnRehash(NULL);
                Implementation eventlist[] = { I_OnRehash, I_OnUserConnect };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual void OnRehash(User* user)