summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-06 03:44:02 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-06 03:44:02 +0000
commite7c00d97aaab7c3e9b140207004a25e63b71bdbe (patch)
treee7ed46f25355ec5b84625f1feff5e1ff3be52be6 /src
parent7c0cacc630bb7c8a757a245471c7de2b61372d2f (diff)
Added numeric 412 "no text to send"
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1316 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/commands.cpp12
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