mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-12 01:40:27 +00:00
Return ERR_NOTEXTTOSEND on empty PRIVMSG content
They are dropped further down the line anyway; and sending ERR_NOTEXTTOSEND early matches other servers' behavior.
This commit is contained in:
parent
445e559dbd
commit
0714466af8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user