From 53b99c7324b5868e1660feca4dd81988bd43d371 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 1 Feb 2010 01:18:34 +0000 Subject: Don't run OnUserPostNick hook for initial NICK command git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12341 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/users.cpp b/src/users.cpp index c390e3471..2cc26c158 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -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; } -- cgit v1.2.3