mirror of
https://github.com/anope/anope.git
synced 2026-06-28 03:56:38 +02:00
Don't unassociate accounts with users on nick changes
This commit is contained in:
@@ -640,6 +640,7 @@ class ProtoBahamut : public Module
|
||||
void OnUserNickChange(User *u, const Anope::string &) anope_override
|
||||
{
|
||||
u->RemoveModeInternal(ModeManager::FindUserModeByName(UMODE_REGISTERED));
|
||||
ircdproto->SendLogout(u);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -361,8 +361,11 @@ class UnrealIRCdProto : public IRCDProto
|
||||
|
||||
void SendLogout(User *u) anope_override
|
||||
{
|
||||
const BotInfo *ns = findbot(Config->NickServ);
|
||||
ircdproto->SendMode(ns, u, "+d 1");
|
||||
if (!Capab.count("ESVID"))
|
||||
{
|
||||
const BotInfo *ns = findbot(Config->NickServ);
|
||||
ircdproto->SendMode(ns, u, "+d 1");
|
||||
}
|
||||
}
|
||||
|
||||
void SendChannel(Channel *c) anope_override
|
||||
@@ -1187,6 +1190,7 @@ class ProtoUnreal : public Module
|
||||
void OnUserNickChange(User *u, const Anope::string &) anope_override
|
||||
{
|
||||
u->RemoveModeInternal(ModeManager::FindUserModeByName(UMODE_REGISTERED));
|
||||
ircdproto->SendLogout(u);
|
||||
}
|
||||
|
||||
void OnChannelCreate(Channel *c) anope_override
|
||||
|
||||
@@ -297,13 +297,14 @@ class NickServCore : public Module
|
||||
/* If the new nick isnt registerd or its registerd and not yours */
|
||||
if (!na || na->nc != u->Account())
|
||||
{
|
||||
ircdproto->SendLogout(u);
|
||||
/* Remove +r, but keep an account associated with the user */
|
||||
u->RemoveMode(NickServ, UMODE_REGISTERED);
|
||||
|
||||
this->mynickserv.Validate(u);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Reset +r and re-send account (even though it really should be set at this point) */
|
||||
ircdproto->SendLogin(u);
|
||||
if (!Config->NoNicknameOwnership && na->nc == u->Account() && na->nc->HasFlag(NI_UNCONFIRMED) == false)
|
||||
u->SetMode(NickServ, UMODE_REGISTERED);
|
||||
|
||||
Reference in New Issue
Block a user