Fix bug with hostmasks in IRC command /ignore (bug #30716)

This commit is contained in:
Sebastien Helleu 2010-08-20 10:22:32 +02:00
parent 3402de02b0
commit bb42984f5d
2 changed files with 9 additions and 2 deletions

View File

@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.4-dev, 2010-08-12
v0.3.4-dev, 2010-08-20
Version 0.3.4 (under dev!)
@ -10,6 +10,7 @@ Version 0.3.4 (under dev!)
* core: use similar behaviour for keys bound to local or global history
(bug #30759)
* api: add priority for hooks (task #10550)
* irc: fix bug with hostmasks in command /ignore (bug #30716)
* rmodifier: new plugin "rmodifier": alter modifier strings with regular
expressions (bug #26964)

View File

@ -4108,7 +4108,7 @@ irc_protocol_recv_command (struct t_irc_server *server,
const char *msg_channel)
{
int i, cmd_found, return_code, argc, decode_color, message_ignored;
char *dup_irc_message;
char *dup_irc_message, *pos_space;
struct t_irc_channel *ptr_channel;
t_irc_recv_func *cmd_recv_func;
const char *cmd_name;
@ -4273,6 +4273,12 @@ irc_protocol_recv_command (struct t_irc_server *server,
nick = (nick1) ? strdup (nick1) : NULL;
address = (address1) ? strdup (address1) : NULL;
host = (host1) ? strdup (host1) : NULL;
if (host)
{
pos_space = strchr (host, ' ');
if (pos_space)
pos_space[0] = '\0';
}
/* check if message is ignored or not */
ptr_channel = NULL;