summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-command.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index d1e3ec953..a79faefc0 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -277,6 +277,15 @@ COMMAND_CALLBACK(bar)
if (string_strcmp (argv[1], "add") == 0)
{
COMMAND_MIN_ARGS(8, "add");
+ ptr_bar = gui_bar_search (argv[2]);
+ if (ptr_bar)
+ {
+ gui_chat_printf (NULL,
+ _("%sBar \"%s\" already exists"),
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
+ argv[2]);
+ return WEECHAT_RC_OK;
+ }
pos_condition = strchr (argv[3], ',');
if (pos_condition)
{