]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_showwhois.cpp
Some more text fixes and improvements (#1618).
[user/henk/code/inspircd.git] / src / modules / m_showwhois.cpp
index 3cb85f3fb1b18d502ee393cddbc1c01d9694351f..8532b14eb62d2bf7a7acafe32d0fcf9da9bea0a2 100644 (file)
@@ -22,6 +22,7 @@
 
 
 #include "inspircd.h"
+#include "modules/whois.h"
 
 /** Handle user mode +W
  */
@@ -50,11 +51,11 @@ class WhoisNoticeCmd : public Command
        void HandleFast(User* dest, User* src)
        {
                dest->WriteNotice("*** " + src->nick + " (" + src->ident + "@" +
-                       (dest->HasPrivPermission("users/auspex") ? src->host : src->dhost) +
+                       src->GetHost(dest->HasPrivPermission("users/auspex")) +
                        ") did a /whois on you");
        }
 
-       CmdResult Handle(const std::vector<std::string> &parameters, User *user)
+       CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE
        {
                User* dest = ServerInstance->FindNick(parameters[0]);
                if (!dest)
@@ -94,7 +95,7 @@ class ModuleShowwhois : public Module, public Whois::EventListener
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Allows opers to set +W to see when a user uses WHOIS on them",VF_OPTCOMMON|VF_VENDOR);
+               return Version("Provides user mode +W for opers to see when a user uses WHOIS on them", VF_OPTCOMMON|VF_VENDOR);
        }
 
        void OnWhois(Whois::Context& whois) CXX11_OVERRIDE
@@ -113,7 +114,7 @@ class ModuleShowwhois : public Module, public Whois::EventListener
                }
                else
                {
-                       std::vector<std::string> params;
+                       CommandBase::Params params;
                        params.push_back(dest->uuid);
                        params.push_back(source->uuid);
                        ServerInstance->PI->SendEncapsulatedData(dest->server->GetName(), cmd.name, params);