1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 15:26:39 +02:00

Add support for server-initiated logouts on InspIRCd.

This commit is contained in:
Sadie Powell
2023-10-19 22:52:05 +01:00
parent 0f32d2e553
commit 78398a4481
+16 -3
View File
@@ -1395,9 +1395,22 @@ class IRCDMessageMetadata : IRCDMessage
if (params[1].equals_cs("accountname"))
{
User *u = User::Find(params[0]);
NickCore *nc = NickCore::Find(params[2]);
if (u && nc)
u->Login(nc);
if (!u)
return; // Should never happen.
if (params[2].empty())
{
// The user has been logged out by the IRC server.
u->Logout();
}
else
{
// If we're bursting then then the user was probably logged
// in during a previous connection.
NickCore *nc = NickCore::Find(params[2]);
if (nc)
u->Login(nc);
}
}
/*