mirror of
https://github.com/anope/anope.git
synced 2026-07-10 20:43:15 +02:00
Handle edge cases relating to IRCd-sent account names.
This commit is contained in:
@@ -318,12 +318,32 @@ struct IRCDMessageEncap final
|
||||
if (params[1] == "LOGIN" || params[1] == "SU")
|
||||
{
|
||||
User *u = source.GetUser();
|
||||
NickCore *nc = NickCore::Find(params[2]);
|
||||
|
||||
if (!u || !nc)
|
||||
if (!u)
|
||||
return;
|
||||
|
||||
u->Login(nc);
|
||||
// If we're bursting then then the user was probably logged in
|
||||
// during a previous connection.
|
||||
auto *na = NickAlias::Find(params[2]);
|
||||
if (!na)
|
||||
{
|
||||
// Nick has been dropped, force the IRCd to deauth them.
|
||||
IRCD->SendLogout(u);
|
||||
return;
|
||||
}
|
||||
|
||||
NickCore *nc = na->nc;
|
||||
if (na == nc->na)
|
||||
{
|
||||
// User is logged into their display nick.
|
||||
u->Login(nc);
|
||||
}
|
||||
else
|
||||
{
|
||||
// User is logged into a non-display nick, their display has
|
||||
// probably expired due to a config change so reauthenticate
|
||||
// them as their new display nick.
|
||||
u->Identify(nc->na);
|
||||
}
|
||||
}
|
||||
// Received: :42XAAAAAE ENCAP * CERTFP :3f122a9cc7811dbad3566bf2cec3009007c0868f
|
||||
else if (params[1] == "CERTFP")
|
||||
|
||||
Reference in New Issue
Block a user