diff options
-rw-r--r-- | src/coremods/core_wallops.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_globops.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/coremods/core_wallops.cpp b/src/coremods/core_wallops.cpp index 09fafd244..15fbb188b 100644 --- a/src/coremods/core_wallops.cpp +++ b/src/coremods/core_wallops.cpp @@ -54,6 +54,12 @@ class CommandWallops : public Command CmdResult CommandWallops::Handle(User* user, const Params& parameters) { + if (parameters[0].empty()) + { + user->WriteNumeric(ERR_NOTEXTTOSEND, "No text to send"); + return CMD_FAILURE; + } + ClientProtocol::Message msg("WALLOPS", user); msg.PushParamRef(parameters[0]); ClientProtocol::Event wallopsevent(protoevprov, msg); diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp index e70645161..b583e22ff 100644 --- a/src/modules/m_globops.cpp +++ b/src/modules/m_globops.cpp @@ -35,6 +35,12 @@ class CommandGlobops : public Command 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; } |