summaryrefslogtreecommitdiff
path: root/modules/protocol/unrealircd.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-02-21 20:45:38 +0000
committerSadie Powell <sadie@witchery.services>2024-02-22 00:14:08 +0000
commitaefbb4fbdab80a41c3f88566abcba4b92b2d36d5 (patch)
tree81b6ba768c99606101fbce39d54d9d521d1a1e20 /modules/protocol/unrealircd.cpp
parent9b77fdf5b680e4a084effe56345a9d01cfbf6f11 (diff)
Rework SendModeInternal to be usable with Uplink::Send.
Diffstat (limited to 'modules/protocol/unrealircd.cpp')
-rw-r--r--modules/protocol/unrealircd.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/protocol/unrealircd.cpp b/modules/protocol/unrealircd.cpp
index 0da73d441..0a3d2d094 100644
--- a/modules/protocol/unrealircd.cpp
+++ b/modules/protocol/unrealircd.cpp
@@ -134,10 +134,12 @@ private:
user->KillInternal(source, buf);
}
- 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<Anope::string> &values) override
{
- UplinkSocket::Message(source) << "SVS2MODE " << u->GetUID() <<" " << buf;
- }
+ auto params = values;
+ params.insert(params.begin(), { u->GetUID(), modes });
+ Uplink::SendInternal({}, source, "SVS2MODE", params);
+}
void SendClientIntroduction(User *u) override
{
@@ -350,14 +352,14 @@ private:
{
/* 3.2.10.4+ treats users logged in with accounts as fully registered, even if -r, so we can not set this here. Just use the timestamp. */
if (Servers::Capab.count("ESVID") > 0 && !na->nc->HasExt("UNCONFIRMED"))
- IRCD->SendMode(Config->GetClient("NickServ"), u, "+d %s", na->nc->display.c_str());
+ IRCD->SendMode(Config->GetClient("NickServ"), u, "+d", na->nc->display);
else
- IRCD->SendMode(Config->GetClient("NickServ"), u, "+d %ld", (unsigned long)u->signon);
+ IRCD->SendMode(Config->GetClient("NickServ"), u, "+d", u->signon);
}
void SendLogout(User *u) override
{
- IRCD->SendMode(Config->GetClient("NickServ"), u, "+d 0");
+ IRCD->SendMode(Config->GetClient("NickServ"), u, "+d", 0);
}
void SendChannel(Channel *c) override