]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_whois.cpp
Convert WriteNumeric() calls to pass the parameters of the numeric as method parameters
[user/henk/code/inspircd.git] / src / coremods / core_whois.cpp
index ecc406a8cff8f52435d604de956a6b61071a2f99..0645eda4c0b8c999f90f8b4d5f0d868d8fe33498 100644 (file)
@@ -95,9 +95,9 @@ class WhoisNumericSink
        {
        }
 
-       void operator()(unsigned int numeric, const std::string& text) const
+       void operator()(Numeric::Numeric& numeric) const
        {
-               whois.SendLine(numeric, text);
+               whois.SendLine(numeric);
        }
 };
 
@@ -296,8 +296,8 @@ CmdResult CommandWhois::HandleLocal(const std::vector<std::string>& parameters,
        else
        {
                /* no such nick/channel */
-               user->WriteNumeric(ERR_NOSUCHNICK, "%s :No such nick/channel", !parameters[userindex].empty() ? parameters[userindex].c_str() : "*");
-               user->WriteNumeric(RPL_ENDOFWHOIS, "%s :End of /WHOIS list.", !parameters[userindex].empty() ? parameters[userindex].c_str() : "*");
+               user->WriteNumeric(Numerics::NoSuchNick(!parameters[userindex].empty() ? parameters[userindex] : "*"));
+               user->WriteNumeric(RPL_ENDOFWHOIS, (!parameters[userindex].empty() ? parameters[userindex] : "*"), "End of /WHOIS list.");
                return CMD_FAILURE;
        }