From aefbb4fbdab80a41c3f88566abcba4b92b2d36d5 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 21 Feb 2024 20:45:38 +0000 Subject: Rework SendModeInternal to be usable with Uplink::Send. --- modules/protocol/plexus.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/protocol/plexus.cpp') diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index f68cb8072..bcf31155c 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -139,9 +139,11 @@ public: UplinkSocket::Message(Me) << "UID " << u->nick << " 1 " << u->timestamp << " " << modes << " " << u->GetIdent() << " " << u->host << " 255.255.255.255 " << u->GetUID() << " 0 " << u->host << " :" << u->realname; } - void SendModeInternal(const MessageSource &source, User *u, const Anope::string &buf) override + void SendModeInternal(const MessageSource &source, User* u, const Anope::string &modes, const std::vector &values) override { - UplinkSocket::Message(source) << "ENCAP * SVSMODE " << u->GetUID() << " " << u->timestamp << " " << buf; + auto params = values; + params.insert(params.begin(), { "*", "SVSMODE", u->GetUID(), stringify(u->timestamp), modes }); + Uplink::SendInternal({}, source, "ENCAP", params); } void SendLogin(User *u, NickAlias *na) override -- cgit