]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_showwhois.cpp
Omit the server name internally when building a /STATS reply and prepend it later
[user/henk/code/inspircd.git] / src / modules / m_showwhois.cpp
index 96d8d90cf24f8e192c62d8b09b4a251a0e02697c..332752f934488a2f7eff671dfebba0303cc6b0b6 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,7 +110,7 @@ class ModuleShowwhois : public Module
                else
                {
                        std::vector<std::string> params;
-                       params.push_back(dest->server);
+                       params.push_back(dest->server->GetName());
                        params.push_back("WHOISNOTICE");
                        params.push_back(dest->uuid);
                        params.push_back(source->uuid);
@@ -120,4 +120,3 @@ class ModuleShowwhois : public Module
 };
 
 MODULE_INIT(ModuleShowwhois)
-