summaryrefslogtreecommitdiff
path: root/include/protocol.h
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-02-21 19:43:21 +0000
committerSadie Powell <sadie@witchery.services>2024-02-22 00:14:08 +0000
commit9b77fdf5b680e4a084effe56345a9d01cfbf6f11 (patch)
treede63e015aa4bfe9ef1a23d92ac4136bc540038be /include/protocol.h
parent7a6979c8140e1d8997b69273548da579ed9587fa (diff)
Rework SendNumericInternal to be usable with Uplink::Send.
Diffstat (limited to 'include/protocol.h')
-rw-r--r--include/protocol.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/protocol.h b/include/protocol.h
index ec4570490..f2b510d96 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -40,7 +40,6 @@ public:
virtual void SendPartInternal(User *, const Channel *chan, const Anope::string &buf);
virtual void SendGlobopsInternal(const MessageSource &, const Anope::string &buf);
virtual void SendCTCPInternal(const MessageSource &, const Anope::string &dest, const Anope::string &buf);
- virtual void SendNumericInternal(int numeric, const Anope::string &dest, const Anope::string &buf);
/** Parses an incoming message from the IRC server.
* @param message The message to parse.
@@ -248,7 +247,12 @@ public:
virtual void SendServer(const Server *) = 0;
virtual void SendSquit(Server *, const Anope::string &message);
- virtual void SendNumeric(int numeric, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
+ virtual void SendNumericInternal(int numeric, const Anope::string &dest, const std::vector<Anope::string> &params);
+ template <typename... Args>
+ void SendNumeric(int numeric, const Anope::string &dest, Args &&...args)
+ {
+ SendNumericInternal(numeric, dest, { stringify(args)... });
+ }
virtual void SendLogin(User *u, NickAlias *na) = 0;
virtual void SendLogout(User *u) = 0;