1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

add -silent switch in syntax comment and respect it without args

This commit is contained in:
Ailin Nemui 2022-02-20 15:53:52 +01:00
parent 3a5f93bbcc
commit 10caed057a

View File

@ -164,7 +164,7 @@ static void module_prefixes_free(char **list)
g_free(list);
}
/* SYNTAX: LOAD <module> [<submodule>] */
/* SYNTAX: LOAD [-silent] <module> [<submodule>] */
static void cmd_load(const char *data)
{
char *rootmodule, *submodule;
@ -181,9 +181,11 @@ static void cmd_load(const char *data)
silent = g_hash_table_lookup(optlist, "silent") != NULL;
if (*rootmodule == '\0')
cmd_load_list();
else {
if (*rootmodule == '\0') {
if (!silent) {
cmd_load_list();
}
} else {
if (silent) {
signal_add_first("module error", (SIGNAL_FUNC) signal_stop);
signal_add_first("module loaded", (SIGNAL_FUNC) signal_stop);