X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_chgident.cpp;h=2112e45a3f8d298c6f0e47a4bde6e066d25d920e;hb=a5d110282a864fd2e91b51ce360a977cd0643657;hp=14af298295a126ae4ac77349c8b7a1747d9b8b32;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp index 14af29829..2112e45a3 100644 --- a/src/modules/m_chgident.cpp +++ b/src/modules/m_chgident.cpp @@ -31,6 +31,7 @@ class CommandChgident : public Command public: CommandChgident(Module* Creator) : Command(Creator,"CHGIDENT", 2) { + allow_empty_last_param = false; flags_needed = 'o'; syntax = " "; TRANSLATE3(TR_NICK, TR_TEXT, TR_END); @@ -40,7 +41,7 @@ class CommandChgident : public Command { User* dest = ServerInstance->FindNick(parameters[0]); - if (!dest) + if ((!dest) || (dest->registered != REG_ALL)) { user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str()); return CMD_FAILURE; @@ -90,7 +91,7 @@ public: void init() { - ServerInstance->AddCommand(&cmd); + ServerInstance->Modules->AddService(cmd); } virtual ~ModuleChgIdent()