irc: fix split of messages when server option "split_msg_max_length" is set to 0 (no split) (closes #1173)
This commit is contained in:
parent
424c1b99fd
commit
3d5ea005e0
@ -28,6 +28,7 @@ Improvements::
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* irc: fix split of messages when server option "split_msg_max_length" is set to 0 (no split) (issue #1173)
|
||||
* irc: send whole IRC message including IRCv3 tags in the signals irc_in, irc_in2, irc_raw_in and irc_raw_in2 (issue #787)
|
||||
* irc: fix memory leak when receiving a message with IRCv3 tags
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -1001,6 +1002,13 @@ irc_message_split (struct t_irc_server *server, const char *message)
|
||||
{
|
||||
split_msg_max_length = IRC_SERVER_OPTION_INTEGER(
|
||||
server, IRC_SERVER_OPTION_SPLIT_MSG_MAX_LENGTH);
|
||||
|
||||
/*
|
||||
* split disabled? use a very high max_length so the message should
|
||||
* never be split
|
||||
*/
|
||||
if (split_msg_max_length == 0)
|
||||
split_msg_max_length = INT_MAX - 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1056,10 +1064,6 @@ irc_message_split (struct t_irc_server *server, const char *message)
|
||||
index_args = 1;
|
||||
}
|
||||
|
||||
/* split disabled? just add the message as-is */
|
||||
if (split_msg_max_length == 0)
|
||||
goto end;
|
||||
|
||||
max_length_nick = (server && (server->nick_max_length > 0)) ?
|
||||
server->nick_max_length : 16;
|
||||
max_length_host = 1 + /* ":" */
|
||||
|
Loading…
x
Reference in New Issue
Block a user