From e7c00d97aaab7c3e9b140207004a25e63b71bdbe Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 6 May 2005 03:44:02 +0000 Subject: [PATCH] Added numeric 412 "no text to send" git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1316 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/commands.cpp b/src/commands.cpp index 97ce3420c..e9ba484c5 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -654,6 +654,12 @@ void handle_privmsg(char **parameters, int pcnt, userrec *user) return; } parameters[1] = (char*)temp.c_str(); + + if (temp == "") + { + WriteServ(user->fd,"412 %s No text to send", user->nick); + return; + } ChanExceptSender(chan, user, "PRIVMSG %s :%s", chan->name, parameters[1]); @@ -743,6 +749,12 @@ void handle_notice(char **parameters, int pcnt, userrec *user) } parameters[1] = (char*)temp.c_str(); + if (temp == "") + { + WriteServ(user->fd,"412 %s No text to send", user->nick); + return; + } + ChanExceptSender(chan, user, "NOTICE %s :%s", chan->name, parameters[1]); // if any users of this channel are on remote servers, broadcast the packet -- 2.39.5