1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

core: display an error message when "/buffer notify xxx" fails (with a wrong notify level)

This commit is contained in:
Sebastien Helleu
2013-08-21 11:18:52 +02:00
parent 64bbb327bb
commit fc1e35fb48
14 changed files with 75 additions and 21 deletions
+7 -1
View File
@@ -846,7 +846,13 @@ COMMAND_CALLBACK(buffer)
if (string_strcasecmp (argv[1], "notify") == 0)
{
COMMAND_MIN_ARGS(3, "buffer notify");
config_weechat_notify_set (buffer, argv_eol[2]);
if (!config_weechat_notify_set (buffer, argv_eol[2]))
{
gui_chat_printf (NULL,
_("%sError: unable to set notify level \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv_eol[2]);
}
return WEECHAT_RC_OK;
}