mirror of
https://github.com/weechat/weechat.git
synced 2026-07-01 07:16:37 +02:00
core: display error in command /buffer if arguments are wrong (bug #34180)
This commit is contained in:
@@ -7,6 +7,7 @@ v0.3.7-dev, 2011-11-07
|
||||
Version 0.3.7 (under dev!)
|
||||
--------------------------
|
||||
|
||||
* core: display error in command /buffer if arguments are wrong (bug #34180)
|
||||
* core: add developer's guide (task #5416)
|
||||
* core: add option weechat.history.max_buffer_lines_minutes: maximum number of
|
||||
minutes in history per buffer (task #10900), rename option
|
||||
|
||||
@@ -872,6 +872,14 @@ COMMAND_CALLBACK(buffer)
|
||||
gui_buffer_switch_by_number (gui_current_window,
|
||||
target_buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* invalid number */
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: incorrect buffer number"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -889,6 +897,14 @@ COMMAND_CALLBACK(buffer)
|
||||
gui_buffer_switch_by_number (gui_current_window,
|
||||
target_buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* invalid number */
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: incorrect buffer number"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -916,6 +932,14 @@ COMMAND_CALLBACK(buffer)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* invalid number */
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: incorrect buffer number"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -937,6 +961,12 @@ COMMAND_CALLBACK(buffer)
|
||||
gui_window_switch_to_buffer (gui_current_window, ptr_buffer, 1);
|
||||
}
|
||||
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: unknown option for \"%s\" "
|
||||
"command"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
"buffer");
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user