diff options
-rw-r--r-- | src/commands.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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 |