summaryrefslogtreecommitdiff
path: root/src/core/wee-command.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-09-09 09:22:40 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-09-09 09:22:40 +0200
commit8688c48e420cd192ecd2af7a46f564c09bf2364c (patch)
tree185db1d3f8c0d0a5e29c40ec508a08a8984a80bf /src/core/wee-command.c
parent145ec0db35f1936bf6513c0c071014a4b532fa15 (diff)
downloadweechat-8688c48e420cd192ecd2af7a46f564c09bf2364c.zip
core: display a more explicit error when a filter fails to be added (closes #522)
Diffstat (limited to 'src/core/wee-command.c')
-rw-r--r--src/core/wee-command.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index c128f423c..ec6c6d32a 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -2184,14 +2184,6 @@ COMMAND_CALLBACK(filter)
if (string_strcasecmp (argv[1], "add") == 0)
{
COMMAND_MIN_ARGS(6, "add");
- if (gui_filter_search_by_name (argv[2]))
- {
- gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
- _("%sError: filter \"%s\" already exists"),
- gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- argv[2]);
- return WEECHAT_RC_OK;
- }
if ((strcmp (argv[4], "*") == 0) && (strcmp (argv_eol[5], "*") == 0))
{
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
@@ -2201,7 +2193,8 @@ COMMAND_CALLBACK(filter)
return WEECHAT_RC_OK;
}
- ptr_filter = gui_filter_new (1, argv[2], argv[3], argv[4], argv_eol[5]);
+ ptr_filter = gui_filter_new (1, argv[2], argv[3], argv[4],
+ argv_eol[5]);
if (ptr_filter)
{
gui_filter_all_buffers ();
@@ -2211,12 +2204,6 @@ COMMAND_CALLBACK(filter)
argv[2]);
command_filter_display (ptr_filter);
}
- else
- {
- gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
- _("%sError adding filter"),
- gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
- }
return WEECHAT_RC_OK;
}