X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_setident.cpp;h=f63be1381bb2ecee0ebc61142ac4916922280b55;hb=402a1bb010522a35600325c1a3084e092b40ca22;hp=00545e29b65db5c73db7c19d140da2769b7799e2;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp index 00545e29b..f63be1381 100644 --- a/src/modules/m_setident.cpp +++ b/src/modules/m_setident.cpp @@ -31,18 +31,13 @@ class CommandSetident : public Command public: CommandSetident(Module* Creator) : Command(Creator,"SETIDENT", 1) { + allow_empty_last_param = false; flags_needed = 'o'; syntax = ""; TRANSLATE2(TR_TEXT, TR_END); } CmdResult Handle(const std::vector& parameters, User *user) { - if (parameters.size() == 0) - { - user->WriteServ("NOTICE %s :*** SETIDENT: Ident must be specified", user->nick.c_str()); - return CMD_FAILURE; - } - if (parameters[0].size() > ServerInstance->Config->Limits.IdentMax) { user->WriteServ("NOTICE %s :*** SETIDENT: Ident is too long", user->nick.c_str()); @@ -74,7 +69,7 @@ class ModuleSetIdent : public Module void init() { - ServerInstance->AddCommand(&cmd); + ServerInstance->Modules->AddService(cmd); } virtual ~ModuleSetIdent()