]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_showwhois.cpp
Minor spelling errors in m_spanningtree.so
[user/henk/code/inspircd.git] / src / modules / m_showwhois.cpp
index ba4ba9e6ee04a69b04889f6421a1a96c3e68d64e..398ebf571bda40d549319385a4aed41536d7550a 100644 (file)
@@ -39,7 +39,7 @@ class SeeWhois : public SimpleUserModeHandler
 class WhoisNoticeCmd : public Command
 {
  public:
-       WhoisNoticeCmd(Module* Creator) : Command(Creator,"WHOISNOTICE", 1)
+       WhoisNoticeCmd(Module* Creator) : Command(Creator,"WHOISNOTICE", 2)
        {
                flags_needed = FLAG_SERVERONLY;
        }
@@ -87,9 +87,8 @@ 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, sizeof(eventlist)/sizeof(Implementation));
        }