diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-11 18:08:28 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-11 18:08:28 +0000 |
commit | e1f34688d6326a7b60d8044f8bfe8bbaeb464602 (patch) | |
tree | 46adfdfb9b9192b748f06f9eaba7d72451c13262 | |
parent | 4f819960854d4e89c958b0ebacfcea692e152e09 (diff) |
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
-rw-r--r-- | src/modules/m_chgident.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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; } }; |