irc: fix update of channels modes with arguments when joining a channel (closes #1324)

v2.8-utf8proc
Sébastien Helleu 2019-03-18 20:39:42 +01:00
parent 1ef7a55e72
commit f6c5061590
3 changed files with 9 additions and 4 deletions

View File

@ -33,6 +33,7 @@ Bug fixes::
* core: set max length to 4096 for /secure passphrase (issue #1323)
* core: refilter only affected buffers on filter change (issue #1309, issue #1311)
* fset: fix slow refresh of fset buffer during /reload (issue #1313)
* irc: fix update of channels modes with arguments when joining a channel (issue #1324)
* irc: quote NICK command argument sent to the server (issue #1319)
* php: fix memory leak in functions string_eval_expression, string_eval_path_home, key_bind, hook_process_hashtable, hook_hsignal_send, info_get_hashtable, hdata_update
* spell: fix detection of nick followed by the nick completer (issue #1306, issue #1307)

View File

@ -342,11 +342,13 @@ irc_mode_channel_set (struct t_irc_server *server,
argc = 0;
argv = NULL;
if (modes_arguments)
{
argv = weechat_string_split (modes_arguments, " ",
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &argc);
}
current_arg = 0;

View File

@ -3566,13 +3566,15 @@ IRC_PROTOCOL_CALLBACK(323)
IRC_PROTOCOL_CALLBACK(324)
{
const char *ptr_modes;
const char *ptr_modes, *ptr_modes_args;
struct t_irc_channel *ptr_channel;
IRC_PROTOCOL_MIN_ARGS(4);
ptr_modes = (argc > 4) ?
((argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]) : NULL;
IRC_PROTOCOL_MIN_ARGS(4);
ptr_modes_args = (argc > 5) ?
((argv_eol[5][0] == ':') ? argv_eol[5] + 1 : argv_eol[5]) : NULL;
ptr_channel = irc_channel_search (server, argv[3]);
if (ptr_channel)
@ -3581,7 +3583,7 @@ IRC_PROTOCOL_CALLBACK(324)
if (argc > 4)
{
(void) irc_mode_channel_set (server, ptr_channel, host,
ptr_modes, NULL);
ptr_modes, ptr_modes_args);
}
}
if (!ptr_channel