diff options
-rw-r--r-- | modules/protocol/charybdis.cpp | 7 | ||||
-rw-r--r-- | modules/protocol/inspircd12.cpp | 7 | ||||
-rw-r--r-- | modules/protocol/unreal.cpp | 7 |
3 files changed, 18 insertions, 3 deletions
diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index bdf6d014b..b1d2e6614 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -192,6 +192,11 @@ struct IRCDMessageEncap : IRCDMessage if (!NickServ) return; + Anope::string accountname = GetAccount(); + NickAlias *na = NickAlias::Find(accountname); + if (na) + accountname = na->nc->display; + /* SVSLOGIN * parameters: target, new nick, new username, new visible hostname, new login name * Sent after successful SASL authentication. @@ -202,7 +207,7 @@ struct IRCDMessageEncap : IRCDMessage * broadcast, otherwise the changes will be stored, to be used when registration * completes. */ - UplinkSocket::Message(Me) << "ENCAP " << msource.GetName() << " SVSLOGIN " << this->uid << " * * * " << this->GetAccount(); + UplinkSocket::Message(Me) << "ENCAP " << msource.GetName() << " SVSLOGIN " << this->uid << " * * * " << accountname; UplinkSocket::Message(Me) << "ENCAP " << msource.GetName() << " SASL " << NickServ->GetUID() << " " << this->uid << " D S"; } diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index 45a00e400..328049c64 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -857,7 +857,12 @@ struct IRCDMessageEncap : IRCDMessage void OnSuccess() anope_override { - UplinkSocket::Message(Me) << "METADATA " << this->uid << " accountname :" << this->GetAccount(); + Anope::string accountname = GetAccount(); + NickAlias *na = NickAlias::Find(accountname); + if (na) + accountname = na->nc->display; + + UplinkSocket::Message(Me) << "METADATA " << this->uid << " accountname :" << accountname; UplinkSocket::Message(Me) << "ENCAP " << this->uid.substr(0, 3) << " SASL " << Me->GetSID() << " " << this->uid << " D S"; SASLUser su; diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 379be18a5..00f7cc586 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -881,7 +881,12 @@ struct IRCDMessageSASL : IRCDMessage if (p == Anope::string::npos) return; - UplinkSocket::Message(Me) << "SVSLOGIN " << this->uid.substr(0, p) << " " << this->uid << " " << this->GetAccount(); + Anope::string accountname = GetAccount(); + NickAlias *na = NickAlias::Find(accountname); + if (na) + accountname = na->nc->display; + + UplinkSocket::Message(Me) << "SVSLOGIN " << this->uid.substr(0, p) << " " << this->uid << " " << accountname; UplinkSocket::Message() << "SASL " << this->uid.substr(0, p) << " " << this->uid << " D S"; } |