]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Don't run OnUserPostNick hook for initial NICK command
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 1 Feb 2010 01:18:34 +0000 (01:18 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 1 Feb 2010 01:18:34 +0000 (01:18 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12341 e03df62e-2008-0410-955e-edbf42e46eb7

src/users.cpp

index c390e3471cf1124bda6428d769f43ca1fb69ac48..2cc26c158c9bb0324c6e5c6da957c3e33971fa31 100644 (file)
@@ -975,7 +975,9 @@ bool User::ChangeNick(const std::string& newnick, bool force)
        ServerInstance->Users->clientlist->erase(oldnick);
        (*(ServerInstance->Users->clientlist))[newnick] = this;
 
-       FOREACH_MOD(I_OnUserPostNick,OnUserPostNick(this,oldnick));
+       if (registered == REG_ALL)
+               FOREACH_MOD(I_OnUserPostNick,OnUserPostNick(this,oldnick));
+
        return true;
 }