X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_swhois.cpp;h=9a433e154131c24b017c3a19251ad712cda2a734;hb=eef45dbfb90f951f3048038aea3ff68b5c157f6d;hp=80c7ddd3b13d8054dc5ddc587890c6d02b572489;hpb=0b63ccd0b5cb26883d6becb196fb98e4f95d0397;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index 80c7ddd3b..9a433e154 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -45,7 +45,7 @@ class CommandSwhois : public Command if (!dest) // allow setting swhois using SWHOIS before reg { - user->WriteNumeric(ERR_NOSUCHNICK, "%s :No such nick/channel", parameters[0].c_str()); + user->WriteNumeric(Numerics::NoSuchNick(parameters[0])); return CMD_FAILURE; } @@ -93,16 +93,16 @@ class ModuleSWhois : public Module, public Whois::LineEventListener } // :kenny.chatspike.net 320 Brain Azhrarn :is getting paid to play games. - ModResult OnWhoisLine(Whois::Context& whois, unsigned int& numeric, std::string& text) CXX11_OVERRIDE + ModResult OnWhoisLine(Whois::Context& whois, Numeric::Numeric& numeric) CXX11_OVERRIDE { /* We use this and not OnWhois because this triggers for remote, too */ - if (numeric == 312) + if (numeric.GetNumeric() == 312) { /* Insert our numeric before 312 */ std::string* swhois = cmd.swhois.get(whois.GetTarget()); if (swhois) { - whois.SendLine(320, ":%s", swhois->c_str()); + whois.SendLine(320, *swhois); } }