]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chghost.cpp
Register a few extensions that weren't registered
[user/henk/code/inspircd.git] / src / modules / m_chghost.cpp
index b259bea8eda01604c46ce6eb94f9ae6ac42ce126..4d39127e7923b2aa4d159acf3dc92f2ee9f1a50e 100644 (file)
@@ -92,14 +92,17 @@ class ModuleChgHost : public Module
        char hostmap[256];
  public:
        ModuleChgHost() : 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");