about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
index ba33e5ae..5cf4fe23 100644
--- a/src/ngircd/irc.c
+++ b/src/ngircd/irc.c
@@ -572,6 +572,13 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
 #endif
 		message = Req->argv[1];
 
+	if (message[0] == '\0') {
+		if (!SendErrors)
+			return CONNECTED;
+		return IRC_WriteErrClient(Client, ERR_NOTEXTTOSEND_MSG,
+					  Client_ID(Client));
+	}
+
 	/* handle msgtarget = msgto *("," msgto) */
 	currentTarget = strtok_r(currentTarget, ",", &strtok_last);
 	ngt_UpperStr(Req->command);