mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 08:13:14 +02:00
irc: fix parsing of MODE command when there are colons after the first mode argument (closes #1296)
This commit is contained in:
@@ -1424,7 +1424,7 @@ IRC_PROTOCOL_CALLBACK(kill)
|
||||
|
||||
IRC_PROTOCOL_CALLBACK(mode)
|
||||
{
|
||||
char *pos_modes, *pos_modes_args;
|
||||
char *pos_modes, *pos_modes_args, *modes_args;
|
||||
int smart_filter, local_mode;
|
||||
struct t_irc_channel *ptr_channel;
|
||||
struct t_irc_nick *ptr_nick;
|
||||
@@ -1449,6 +1449,7 @@ IRC_PROTOCOL_CALLBACK(mode)
|
||||
local_mode = (irc_server_strcasecmp (server, nick, server->nick) == 0);
|
||||
ptr_nick = irc_nick_search (server, ptr_channel, nick);
|
||||
ptr_buffer = (ptr_channel) ? ptr_channel->buffer : server->buffer;
|
||||
modes_args = irc_mode_get_arguments (pos_modes_args);
|
||||
weechat_printf_date_tags (
|
||||
irc_msgbuffer_get_target_buffer (server, NULL, command, NULL,
|
||||
ptr_buffer),
|
||||
@@ -1464,12 +1465,14 @@ IRC_PROTOCOL_CALLBACK(mode)
|
||||
IRC_COLOR_CHAT_DELIMITERS,
|
||||
IRC_COLOR_RESET,
|
||||
pos_modes,
|
||||
(pos_modes_args) ? " " : "",
|
||||
(pos_modes_args) ? pos_modes_args : "",
|
||||
(modes_args && modes_args[0]) ? " " : "",
|
||||
(modes_args && modes_args[0]) ? modes_args : "",
|
||||
IRC_COLOR_CHAT_DELIMITERS,
|
||||
IRC_COLOR_RESET,
|
||||
irc_nick_color_for_msg (server, 1, ptr_nick, nick),
|
||||
nick);
|
||||
if (modes_args)
|
||||
free (modes_args);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user