]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sethost.cpp
Register a few extensions that weren't registered
[user/henk/code/inspircd.git] / src / modules / m_sethost.cpp
index 907649158aa810dae9b18fb387789477d1d00567..a036085ea7df0d9993ac6b4860df26411d89406d 100644 (file)
@@ -76,14 +76,17 @@ class ModuleSetHost : public Module
  public:
        ModuleSetHost()
                : cmd(this, hostmap)
+       {
+       }
+
+       void init()
        {
                OnRehash(NULL);
-               ServerInstance->AddCommand(&cmd);
+               ServerInstance->Modules->AddService(cmd);
                Implementation eventlist[] = { I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, 1);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
-
        void OnRehash(User* user)
        {
                std::string hmap = ServerInstance->Config->ConfValue("hostname")->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789");