From e1f34688d6326a7b60d8044f8bfe8bbaeb464602 Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 11 May 2007 18:08:28 +0000 Subject: Yes, and here too. I want these in seperatly so I can roll them back if I screwed up (somehow) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6977 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_chgident.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/modules/m_chgident.cpp') diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp index c1a6b3f07..43bb34b31 100644 --- a/src/modules/m_chgident.cpp +++ b/src/modules/m_chgident.cpp @@ -33,23 +33,23 @@ class cmd_chgident : public command_t { userrec* dest = ServerInstance->FindNick(parameters[0]); - if(dest) + if (!dest) { - if(!ServerInstance->IsIdent(parameters[1])) - { - user->WriteServ("NOTICE %s :*** Invalid characters in ident", user->nick); - return CMD_FAILURE; - } - - dest->ChangeIdent(parameters[1]); - ServerInstance->WriteOpers("%s used CHGIDENT to change %s's ident to '%s'", user->nick, dest->nick, dest->ident); - return CMD_SUCCESS; + user->WriteServ("401 %s %s :No such nick/channel", user->nick, parameters[0]); + return CMD_FAILURE; } - else + + if(!ServerInstance->IsIdent(parameters[1])) { - user->WriteServ("401 %s %s :No such nick/channel", user->nick, parameters[0]); + user->WriteServ("NOTICE %s :*** Invalid characters in ident", user->nick); return CMD_FAILURE; } + + dest->ChangeIdent(parameters[1]); + ServerInstance->WriteOpers("%s used CHGIDENT to change %s's ident to '%s'", user->nick, dest->nick, dest->ident); + + /* route it! */ + return CMD_SUCCESS; } }; -- cgit v1.2.3