X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_globops.cpp;h=b583e22ffea494af4c94917672b33a8533019263;hb=4e3d655dff6f8a5aed626475fbf19c2a7119c20b;hp=1fe911e805101ae636bf42428801497f31138b50;hpb=124c17e14134a4999afc1a5e981ab7c75b3694b9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp index 1fe911e80..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& parameters, User* user) CXX11_OVERRIDE + 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); } };