]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Added numeric 412 "no text to send"
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 6 May 2005 03:44:02 +0000 (03:44 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 6 May 2005 03:44:02 +0000 (03:44 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1316 e03df62e-2008-0410-955e-edbf42e46eb7

src/commands.cpp

index 97ce3420c1b2db87c7499c0c35e30e50fa8564fb..e9ba484c56d7f74b5a2c25cc8c17554ef7b5fff4 100644 (file)
@@ -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