summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_globops.cpp6
1 files changed, 6 insertions, 0 deletions
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;
}