diff options
author | Peter Powell <petpow@saberuk.com> | 2019-07-15 15:46:06 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-07-15 15:46:44 +0100 |
commit | 5a3627b0a7d650a924da57a939fc50434caeef11 (patch) | |
tree | 9a665359cfd48e87f9c7643a8f8d0a754b87390c /src/modules/m_globops.cpp | |
parent | 06e2961a86705d794fd5904000e44a7ae08004d9 (diff) |
Send ERR_NOTEXTTOSEND in response to an empty GLOBOPS/WALLOPS.
Diffstat (limited to 'src/modules/m_globops.cpp')
-rw-r--r-- | src/modules/m_globops.cpp | 6 |
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; } |