X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_chghost.cpp;h=6aaed7831dd63e849fb0be1716fba2a97caa7879;hb=a5d110282a864fd2e91b51ce360a977cd0643657;hp=4d39127e7923b2aa4d159acf3dc92f2ee9f1a50e;hpb=349106f3f9f75d7f957fc5d1e71ca650f4807bb9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index 4d39127e7..6aaed7831 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -32,6 +32,7 @@ class CommandChghost : public Command public: CommandChghost(Module* Creator, char* hmap) : Command(Creator,"CHGHOST", 2), hostmap(hmap) { + allow_empty_last_param = false; flags_needed = 'o'; syntax = " "; TRANSLATE3(TR_NICK, TR_TEXT, TR_END); @@ -58,7 +59,8 @@ class CommandChghost : public Command User* dest = ServerInstance->FindNick(parameters[0]); - if (!dest) + // Allow services to change the host of unregistered users + if ((!dest) || ((dest->registered != REG_ALL) && (!ServerInstance->ULine(user->server)))) { user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str()); return CMD_FAILURE;