]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_showwhois.cpp
m_spanningtree Fix crash when connecting to a remote server that has the same name...
[user/henk/code/inspircd.git] / src / modules / m_showwhois.cpp
index 9b260447308c6da87a3606600b26d4101841177a..434d1b07fdc0e50d9bde39efa211930700eb17f9 100644 (file)
@@ -87,11 +87,10 @@ class ModuleShowwhois : public Module
                ShowWhoisFromOpers = tag->getBool("showfromopers", true);
 
                sw = new SeeWhois(this, OpersOnly);
-               if (!ServerInstance->Modes->AddMode(sw))
-                       throw ModuleException("Could not add new modes!");
-               ServerInstance->AddCommand(&cmd);
+               ServerInstance->Modules->AddService(*sw);
+               ServerInstance->Modules->AddService(cmd);
                Implementation eventlist[] = { I_OnWhois };
-               ServerInstance->Modules->Attach(eventlist, this, 1);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        ~ModuleShowwhois()