X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_setname.cpp;h=28fd27f95c7efc42271243259513e2387181edf2;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;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..28fd27f95 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,11 +64,7 @@ class ModuleSetName : public Module void init() { - ServerInstance->AddCommand(&cmd); - } - - virtual ~ModuleSetName() - { + ServerInstance->Modules->AddService(cmd); } virtual Version GetVersion()