summaryrefslogtreecommitdiff
path: root/src/modules/m_chgident.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_chgident.cpp')
-rw-r--r--src/modules/m_chgident.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp
index a658e1793..1c9e3f6f4 100644
--- a/src/modules/m_chgident.cpp
+++ b/src/modules/m_chgident.cpp
@@ -17,7 +17,7 @@ class cmd_chgident : public command_t
syntax = "<nick> <newident>";
}
- void Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, userrec *user)
{
userrec* dest = ServerInstance->FindNick(parameters[0]);
@@ -26,16 +26,17 @@ class cmd_chgident : public command_t
if(!ServerInstance->IsIdent(parameters[1]))
{
user->WriteServ("NOTICE %s :*** Invalid characters in ident", user->nick);
- return;
+ return CMD_FAILURE;
}
ServerInstance->WriteOpers("%s used CHGIDENT to change %s's ident from '%s' to '%s'", user->nick, dest->nick, dest->ident, parameters[1]);
dest->ChangeIdent(parameters[1]);
- //strlcpy(dest->ident, parameters[1], IDENTMAX+2);
+ return CMD_SUCCESS;
}
else
{
user->WriteServ("401 %s %s :No such nick/channel", user->nick, parameters[0]);
+ return CMD_FAILURE;
}
}
};