mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-21 21:46:22 +00:00
Removed old command help
This commit is contained in:
@@ -141,6 +141,18 @@ cons_show_help(Command *command)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cons_bad_cmd_usage(const char * const cmd)
|
||||
{
|
||||
GString *msg = g_string_new("");
|
||||
g_string_printf(msg, "Invalid usage, see '/help %s' for details.", &cmd[1]);
|
||||
|
||||
cons_show("");
|
||||
cons_show(msg->str);
|
||||
|
||||
g_string_free(msg, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_error(const char * const msg, ...)
|
||||
{
|
||||
|
||||
@@ -667,22 +667,25 @@ ui_handle_error(const char * const err_msg)
|
||||
}
|
||||
|
||||
void
|
||||
ui_invalid_command_usage(const char * const usage, void (*setting_func)(void))
|
||||
ui_invalid_command_usage(const char * const cmd, void (*setting_func)(void))
|
||||
{
|
||||
GString *msg = g_string_new("");
|
||||
g_string_printf(msg, "Invalid usage, see '/help %s' for details.", &cmd[1]);
|
||||
|
||||
if (setting_func) {
|
||||
cons_show("");
|
||||
(*setting_func)();
|
||||
cons_show("Usage: %s", usage);
|
||||
cons_show(msg->str);
|
||||
} else {
|
||||
cons_show("");
|
||||
cons_show("Usage: %s", usage);
|
||||
cons_show(msg->str);
|
||||
ProfWin *current = wins_get_current();
|
||||
if (current->type == WIN_CHAT) {
|
||||
char usage_cpy[strlen(usage) + 8];
|
||||
sprintf(usage_cpy, "Usage: %s", usage);
|
||||
ui_current_print_line(usage_cpy);
|
||||
ui_current_print_line(msg->str);
|
||||
}
|
||||
}
|
||||
|
||||
g_string_free(msg, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -228,7 +228,7 @@ void ui_input_clear(void);
|
||||
void ui_input_nonblocking(gboolean);
|
||||
void ui_write(char *line, int offset);
|
||||
|
||||
void ui_invalid_command_usage(const char * const usage, void (*setting_func)(void));
|
||||
void ui_invalid_command_usage(const char * const cmd, void (*setting_func)(void));
|
||||
|
||||
void ui_create_xmlconsole_win(void);
|
||||
gboolean ui_xmlconsole_exists(void);
|
||||
@@ -243,6 +243,7 @@ void cons_show(const char * const msg, ...);
|
||||
void cons_about(void);
|
||||
void cons_help(void);
|
||||
void cons_show_help(Command *command);
|
||||
void cons_bad_cmd_usage(const char * const cmd);
|
||||
void cons_navigation_help(void);
|
||||
void cons_prefs(void);
|
||||
void cons_show_ui_prefs(void);
|
||||
|
||||
Reference in New Issue
Block a user