diff options
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r-- | src/protocol.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp index 57742bf2c..41df1dadc 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -150,14 +150,17 @@ void IRCDProto::SendCTCPInternal(const MessageSource &source, const Anope::strin this->SendNoticeInternal(source, dest, "\1" + s + "\1"); } -void IRCDProto::SendNumericInternal(int numeric, const Anope::string &dest, const Anope::string &buf) +void IRCDProto::SendNumericInternal(int numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms) { Anope::string n = stringify(numeric); if (numeric < 10) n = "0" + n; if (numeric < 100) n = "0" + n; - UplinkSocket::Message(Me) << n << " " << dest << " " << buf; + + auto newparams = params; + newparams.insert(newparams.begin(), dest); + Uplink::SendInternal({}, Me, n, newparams); } void IRCDProto::SendTopic(const MessageSource &source, Channel *c) @@ -329,16 +332,6 @@ void IRCDProto::SendCTCP(const MessageSource &source, const Anope::string &dest, SendCTCPInternal(source, dest, buf); } -void IRCDProto::SendNumeric(int numeric, const Anope::string &dest, const char *fmt, ...) -{ - va_list args; - char buf[BUFSIZE] = ""; - va_start(args, fmt); - vsnprintf(buf, BUFSIZE - 1, fmt, args); - va_end(args); - SendNumericInternal(numeric, dest, buf); -} - bool IRCDProto::IsNickValid(const Anope::string &nick) { /** |