X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_setident.cpp;h=79e1683320c13fc05a2476dd008409f5277d1f00;hb=ac0d5abaace6521643b213423bf57625abe9dd41;hp=2ad886fcda9e9e6b322f1c7a585ed407bee49179;hpb=d9d99cd02dadf34bfcc220734ba0c422f0acb3e6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp index 2ad886fcd..79e168332 100644 --- a/src/modules/m_setident.cpp +++ b/src/modules/m_setident.cpp @@ -22,8 +22,6 @@ #include "inspircd.h" -/* $ModDesc: Provides support for the SETIDENT command */ - /** Handle /SETIDENT */ class CommandSetident : public Command @@ -32,11 +30,10 @@ class CommandSetident : public Command CommandSetident(Module* Creator) : Command(Creator,"SETIDENT", 1) { allow_empty_last_param = false; - flags_needed = 'o'; syntax = ""; - TRANSLATE2(TR_TEXT, TR_END); + flags_needed = 'o'; syntax = ""; } - CmdResult Handle(const std::vector& parameters, User *user) + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { if (parameters[0].size() > ServerInstance->Config->Limits.IdentMax) { @@ -44,13 +41,13 @@ class CommandSetident : public Command return CMD_FAILURE; } - if (!ServerInstance->IsIdent(parameters[0].c_str())) + if (!ServerInstance->IsIdent(parameters[0])) { user->WriteNotice("*** SETIDENT: Invalid characters in ident"); return CMD_FAILURE; } - user->ChangeIdent(parameters[0].c_str()); + user->ChangeIdent(parameters[0]); ServerInstance->SNO->WriteGlobalSno('a', "%s used SETIDENT to change their ident to '%s'", user->nick.c_str(), user->ident.c_str()); return CMD_SUCCESS; @@ -66,11 +63,6 @@ class ModuleSetIdent : public Module { } - void init() CXX11_OVERRIDE - { - ServerInstance->Modules->AddService(cmd); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Provides support for the SETIDENT command", VF_VENDOR);