increase disconnect buffer and get rid of some magic 510 values

This commit is contained in:
ailin-nemui 2019-08-11 20:41:57 +02:00
commit 27546354ca
5 changed files with 15 additions and 12 deletions

View file

@ -142,7 +142,7 @@ static void irc_channels_join(IRC_SERVER_REC *server, const char *data,
/* don't try to send too long lines
make sure it's not longer than 510
so 510 - strlen("JOIN ") = 505 */
if (cmdlen < 505)
if (cmdlen < MAX_IRC_MESSAGE_LEN - 5 /* strlen("JOIN ") */)
continue;
}
if (outchans->len > 0) {