]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_showwhois.cpp
Update detection in module loading commands that relied on old command module names
[user/henk/code/inspircd.git] / src / modules / m_showwhois.cpp
index 96d8d90cf24f8e192c62d8b09b4a251a0e02697c..ba17942cbbc32eb52871c4fe15b5e9c5fe437682 100644 (file)
@@ -42,7 +42,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;
        }
@@ -82,7 +82,7 @@ class ModuleShowwhois : public Module
        {
        }
 
-       void init() CXX11_OVERRIDE
+       void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
        {
                ConfigTag* tag = ServerInstance->Config->ConfValue("showwhois");
 
@@ -110,14 +110,11 @@ class ModuleShowwhois : public Module
                else
                {
                        std::vector<std::string> params;
-                       params.push_back(dest->server);
-                       params.push_back("WHOISNOTICE");
                        params.push_back(dest->uuid);
                        params.push_back(source->uuid);
-                       ServerInstance->PI->SendEncapsulatedData(params);
+                       ServerInstance->PI->SendEncapsulatedData(dest->server->GetName(), cmd.name, params);
                }
        }
 };
 
 MODULE_INIT(ModuleShowwhois)
-