diff options
| author | Sadie Powell <sadie@witchery.services> | 2024-02-21 19:43:21 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2024-02-22 00:14:08 +0000 |
| commit | 9b77fdf5b680e4a084effe56345a9d01cfbf6f11 (patch) | |
| tree | de63e015aa4bfe9ef1a23d92ac4136bc540038be /modules/protocol | |
| parent | 7a6979c8140e1d8997b69273548da579ed9587fa (diff) | |
Rework SendNumericInternal to be usable with Uplink::Send.
Diffstat (limited to 'modules/protocol')
| -rw-r--r-- | modules/protocol/inspircd.cpp | 6 | ||||
| -rw-r--r-- | modules/protocol/ngircd.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp index a622d26e9..cef005f83 100644 --- a/modules/protocol/inspircd.cpp +++ b/modules/protocol/inspircd.cpp @@ -296,9 +296,11 @@ public: SendAddLine("G", x->GetUser() + "@" + x->GetHost(), timeleft, x->by, x->GetReason()); } - void SendNumericInternal(int numeric, const Anope::string &dest, const Anope::string &buf) override + void SendNumericInternal(int numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms) override { - UplinkSocket::Message() << "NUM " << Me->GetSID() << " " << dest << " " << numeric << " " << buf; + auto newparams = params; + newparams.insert(newparams.begin(), { Me->GetSID(), dest, numeric }); + Uplink::SendInternal({}, Me, numeric, newparams); } void SendModeInternal(const MessageSource &source, const Channel *dest, const Anope::string &buf) override diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index 28018e522..1ea020290 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -61,7 +61,7 @@ public: /* Make myself known to myself in the serverlist */ SendServer(Me); /* finish the enhanced server handshake and register the connection */ - this->SendNumeric(376, "*", ":End of MOTD command"); + this->SendNumeric(376, "*", "End of MOTD command"); } void SendForceNickChange(User *u, const Anope::string &newnick, time_t when) override |
