From 5a3627b0a7d650a924da57a939fc50434caeef11 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 15 Jul 2019 15:46:06 +0100 Subject: Send ERR_NOTEXTTOSEND in response to an empty GLOBOPS/WALLOPS. --- src/modules/m_globops.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules') 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; } -- cgit v1.2.3