1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

more variables

This commit is contained in:
ailin-nemui 2019-08-15 16:39:26 +02:00
parent 200020da93
commit 6c37099407

View File

@ -485,8 +485,16 @@ static void sig_server_quit(IRC_SERVER_REC *server, const char *msg)
static void cap_maxline(IRC_SERVER_REC *server) static void cap_maxline(IRC_SERVER_REC *server)
{ {
unsigned int maxline = 0; unsigned int maxline = 0;
if (parse_uint(g_hash_table_lookup(server->cap_supported, CAP_MAXLINE), gboolean parse_successful = FALSE;
NULL, 10, &maxline) && const char *maxline_str;
maxline_str = g_hash_table_lookup(server->cap_supported, CAP_MAXLINE);
if (maxline_str != NULL) {
parse_successful = parse_uint(maxline_str, NULL, 10, &maxline);
}
if (parse_successful &&
maxline >= MAX_IRC_MESSAGE_LEN + 2 /* 2 bytes for CR+LF */) { maxline >= MAX_IRC_MESSAGE_LEN + 2 /* 2 bytes for CR+LF */) {
server->max_message_len = maxline - 2; server->max_message_len = maxline - 2;
} }