diff options
author | Sadie Powell <sadie@witchery.services> | 2020-10-12 17:30:05 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-10-12 17:30:05 +0100 |
commit | cdf147f3511ef66c2854c90556943dfe69e609b6 (patch) | |
tree | 88c4cc849a579b31abf35af8b7e23bfe8431224f | |
parent | 2cf507ed662620d0b97c8484fbfbfa09265e86e1 (diff) |
Fix not sending an account id to InspIRCd on SASL.
Also, send the account id first so it shows on the ACCOUNT message.
-rw-r--r-- | modules/protocol/inspircd3.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/protocol/inspircd3.cpp b/modules/protocol/inspircd3.cpp index de9406258..2a77a8c7d 100644 --- a/modules/protocol/inspircd3.cpp +++ b/modules/protocol/inspircd3.cpp @@ -405,8 +405,8 @@ class InspIRCd3Proto : public IRCDProto if (na->nc->HasExt("UNCONFIRMED")) return; - UplinkSocket::Message(Me) << "METADATA " << u->GetUID() << " accountname :" << na->nc->display; UplinkSocket::Message(Me) << "METADATA " << u->GetUID() << " accountid :" << na->nc->GetId(); + UplinkSocket::Message(Me) << "METADATA " << u->GetUID() << " accountname :" << na->nc->display; } void SendLogout(User *u) anope_override @@ -427,6 +427,12 @@ class InspIRCd3Proto : public IRCDProto void SendSVSLogin(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) anope_override { + // TODO: in 2.1 this function should take a NickAlias instead of strings. + NickCore *nc = NickCore::Find(acc); + if (!nc) + return; + + UplinkSocket::Message(Me) << "METADATA " << uid << " accountid :" << nc->GetId(); UplinkSocket::Message(Me) << "METADATA " << uid << " accountname :" << acc; if (!vident.empty()) |