1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 21:23:13 +02:00

Added inspircd2.0 protocol module, moved usermode +r unsetting on nick change to the protocol modules to fix inspircd1.2s weird usermode +r behavior

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2997 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Adam-
2010-06-03 19:01:28 +00:00
parent f43f6c3864
commit 9abdb4e2e9
10 changed files with 1454 additions and 26 deletions
+1 -11
View File
@@ -977,19 +977,9 @@ User *do_nick(const char *source, const char *nick, const char *username, const
if (old_na && (old_na->nc == user->Account() || user->IsRecognized()))
old_na->last_seen = time(NULL);
/* On nick change -r gets set on nick changes but we aren't informed about it, causing SetMode(UMODE_REGISTERED)
* to fail (we think it is already set). Remove it silently like the IRCds
*/
if (ircd->check_nick_id)
{
UserMode *um = ModeManager::FindUserModeByName(UMODE_REGISTERED);
if (um)
user->RemoveModeInternal(um);
}
std::string oldnick = user->nick;
user->SetNewNick(nick);
FOREACH_MOD(I_OnUserNickChange, OnUserNickChange(user, oldnick.c_str()));
FOREACH_MOD(I_OnUserNickChange, OnUserNickChange(user, oldnick));
if (old_na)
old_na->OnCancel(user);