X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_globops.cpp;h=b583e22ffea494af4c94917672b33a8533019263;hb=85182d727c0d549b9cf6659ad36dec70fcf02278;hp=1cb87324b5417cbd9803a9eed9d3011905f30874;hpb=b9e11915a976daaf790ebc763aff56e19fd49e0f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp index 1cb87324b..b583e22ff 100644 --- a/src/modules/m_globops.cpp +++ b/src/modules/m_globops.cpp @@ -30,11 +30,17 @@ class CommandGlobops : public Command public: CommandGlobops(Module* Creator) : Command(Creator,"GLOBOPS", 1,1) { - flags_needed = 'o'; syntax = ""; + flags_needed = 'o'; syntax = ":"; } - CmdResult Handle (const std::vector ¶meters, User *user) + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { + if (parameters[0].empty()) + { + user->WriteNumeric(ERR_NOTEXTTOSEND, "No text to send"); + return CMD_FAILURE; + } + ServerInstance->SNO->WriteGlobalSno('g', "From " + user->nick + ": " + parameters[0]); return CMD_SUCCESS; } @@ -53,7 +59,7 @@ class ModuleGlobops : public Module Version GetVersion() CXX11_OVERRIDE { - return Version("Provides support for GLOBOPS and snomask +g", VF_VENDOR); + return Version("Provides the GLOBOPS command and snomask 'g'", VF_VENDOR); } };