summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_chgident.cpp24
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;
}
};