X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_setname.cpp;h=d0610853bc4ce7e1308d01616473136b25c8eb98;hb=a5d110282a864fd2e91b51ce360a977cd0643657;hp=1ca7b1b3f7a38c6b2656727ff0b31c9809d2a3d3;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index 1ca7b1b3f..d0610853b 100644 --- a/src/modules/m_setname.cpp +++ b/src/modules/m_setname.cpp @@ -30,18 +30,13 @@ class CommandSetname : public Command public: CommandSetname(Module* Creator) : Command(Creator,"SETNAME", 1, 1) { + allow_empty_last_param = false; syntax = ""; TRANSLATE2(TR_TEXT, TR_END); } CmdResult Handle (const std::vector& parameters, User *user) { - if (parameters[0].empty()) - { - user->WriteServ("NOTICE %s :*** SETNAME: GECOS must be specified", user->nick.c_str()); - return CMD_FAILURE; - } - if (parameters[0].size() > ServerInstance->Config->Limits.MaxGecos) { user->WriteServ("NOTICE %s :*** SETNAME: GECOS too long", user->nick.c_str()); @@ -69,7 +64,7 @@ class ModuleSetName : public Module void init() { - ServerInstance->AddCommand(&cmd); + ServerInstance->Modules->AddService(cmd); } virtual ~ModuleSetName()