summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-11-04 19:53:39 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-11-04 19:53:39 +0000
commit101e623b75b58ecb1f8805ad830e4deb79dbb69b (patch)
tree03e17b03b0ec80cd49d729e9438f423c53e5cf91 /src
parenteadfd181172fc1504bf12406a81f606224ab7739 (diff)
downloadweechat-101e623b75b58ecb1f8805ad830e4deb79dbb69b.zip
Fixed bug with ignore: now any IRC command is allowed
Diffstat (limited to 'src')
-rw-r--r--src/irc/irc-ignore.c39
1 files changed, 1 insertions, 38 deletions
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)