1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 03:06:37 +02:00

Rework SendModeInternal to be usable with Uplink::Send.

This commit is contained in:
Sadie Powell
2024-02-21 20:45:38 +00:00
parent 9b77fdf5b6
commit aefbb4fbda
9 changed files with 79 additions and 64 deletions
+4 -2
View File
@@ -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<Anope::string> &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