1
0
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:
Adam
2012-10-02 01:30:35 -04:00
parent e1d1d18288
commit f7aa837696
3 changed files with 9 additions and 3 deletions
+1
View File
@@ -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);
}
};
+6 -2
View File
@@ -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
+2 -1
View File
@@ -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);