X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sanick.cpp;h=4e4be77ae635c6e7f6d73d452dee4c6e88057e81;hb=d3b6538f955e824d46141f64fc081ce19fc081ef;hp=8bafa5289abfd5dbcbfa831dc7b2d0ae98f6a9b3;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index 8bafa5289..4e4be77ae 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -30,6 +30,7 @@ class CommandSanick : public Command public: CommandSanick(Module* Creator) : Command(Creator,"SANICK", 2) { + allow_empty_last_param = false; flags_needed = 'o'; Penalty = 0; syntax = " "; TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } @@ -47,7 +48,7 @@ class CommandSanick : public Command return CMD_FAILURE; } - if (!target) + if ((!target) || (target->registered != REG_ALL)) { user->WriteServ("NOTICE %s :*** No such nickname: '%s'", user->nick.c_str(), parameters[0].c_str()); return CMD_FAILURE; @@ -99,7 +100,7 @@ class ModuleSanick : public Module void init() { - ServerInstance->AddCommand(&cmd); + ServerInstance->Modules->AddService(cmd); } virtual ~ModuleSanick()