diff --git a/ChangeLog b/ChangeLog index 82b6f3fe6..b5447c88d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,11 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2006-10-30 +ChangeLog - 2006-11-04 Version 0.2.2 (under dev!): + * fixed bug with ignore: now any IRC command is allowed * fixed crash with Ctrl-T (transpose) and one char on line (bug #18153) * added "modifier" in plugins API * improved /plugin command diff --git a/src/irc/irc-ignore.c b/src/irc/irc-ignore.c index 3ef189c4c..a94d78c99 100644 --- a/src/irc/irc-ignore.c +++ b/src/irc/irc-ignore.c @@ -186,7 +186,7 @@ ignore_search (char *mask, char *type, char *channel_name, char *server_name) t_irc_ignore * ignore_add (char *mask, char *type, char *channel_name, char *server_name) { - int i, type_index; + int type_index; t_irc_command *command_ptr; t_irc_ignore *new_ignore; @@ -227,43 +227,6 @@ ignore_add (char *mask, char *type, char *channel_name, char *server_name) return NULL; } - if (strcmp (type, "*") != 0) - { - /* look for type in pre-defined ignore types */ - for (i = 0; ignore_types[i]; i++) - { - if (ascii_strcasecmp (type, ignore_types[i]) == 0) - { - type_index = i; - break; - } - } - - /* not a pre-defined ignore type, so it MUST be an IRC command */ - if (type_index < 0) - { - for (i = 0; irc_commands[i].command_name; i++) - { - if (irc_commands[i].recv_function && - (ascii_strcasecmp (type, irc_commands[i].command_name) == 0)) - { - command_ptr = &irc_commands[i]; - break; - } - } - } - - /* not a pre-defined command and not an IRC command => error */ - if ((type_index < 0) && (!command_ptr)) - { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); - gui_printf (NULL, - _("%s unknown type or IRC command \"%s\" for ignore\n"), - WEECHAT_ERROR, type); - return NULL; - } - } - /* create new ignore */ new_ignore = (t_irc_ignore *) malloc (sizeof (t_irc_ignore)); if (new_ignore) diff --git a/weechat/ChangeLog b/weechat/ChangeLog index 82b6f3fe6..b5447c88d 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -1,10 +1,11 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2006-10-30 +ChangeLog - 2006-11-04 Version 0.2.2 (under dev!): + * fixed bug with ignore: now any IRC command is allowed * fixed crash with Ctrl-T (transpose) and one char on line (bug #18153) * added "modifier" in plugins API * improved /plugin command diff --git a/weechat/src/irc/irc-ignore.c b/weechat/src/irc/irc-ignore.c index 3ef189c4c..a94d78c99 100644 --- a/weechat/src/irc/irc-ignore.c +++ b/weechat/src/irc/irc-ignore.c @@ -186,7 +186,7 @@ ignore_search (char *mask, char *type, char *channel_name, char *server_name) t_irc_ignore * ignore_add (char *mask, char *type, char *channel_name, char *server_name) { - int i, type_index; + int type_index; t_irc_command *command_ptr; t_irc_ignore *new_ignore; @@ -227,43 +227,6 @@ ignore_add (char *mask, char *type, char *channel_name, char *server_name) return NULL; } - if (strcmp (type, "*") != 0) - { - /* look for type in pre-defined ignore types */ - for (i = 0; ignore_types[i]; i++) - { - if (ascii_strcasecmp (type, ignore_types[i]) == 0) - { - type_index = i; - break; - } - } - - /* not a pre-defined ignore type, so it MUST be an IRC command */ - if (type_index < 0) - { - for (i = 0; irc_commands[i].command_name; i++) - { - if (irc_commands[i].recv_function && - (ascii_strcasecmp (type, irc_commands[i].command_name) == 0)) - { - command_ptr = &irc_commands[i]; - break; - } - } - } - - /* not a pre-defined command and not an IRC command => error */ - if ((type_index < 0) && (!command_ptr)) - { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); - gui_printf (NULL, - _("%s unknown type or IRC command \"%s\" for ignore\n"), - WEECHAT_ERROR, type); - return NULL; - } - } - /* create new ignore */ new_ignore = (t_irc_ignore *) malloc (sizeof (t_irc_ignore)); if (new_ignore)