From: brain Date: Fri, 6 May 2005 03:44:02 +0000 (+0000) Subject: Added numeric 412 "no text to send" X-Git-Tag: v2.0.23~10366 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=e7c00d97aaab7c3e9b140207004a25e63b71bdbe;p=user%2Fhenk%2Fcode%2Finspircd.git Added numeric 412 "no text to send" git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1316 e03df62e-2008-0410-955e-edbf42e46eb7 --- 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