From 10caed057a63ccc0bcadf9e26572bd4d16b352f1 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Sun, 20 Feb 2022 15:53:52 +0100 Subject: [PATCH] add -silent switch in syntax comment and respect it without args --- src/fe-common/core/fe-modules.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/fe-common/core/fe-modules.c b/src/fe-common/core/fe-modules.c index 01b603f5..955b9a9e 100644 --- a/src/fe-common/core/fe-modules.c +++ b/src/fe-common/core/fe-modules.c @@ -164,7 +164,7 @@ static void module_prefixes_free(char **list) g_free(list); } -/* SYNTAX: LOAD [] */ +/* SYNTAX: LOAD [-silent] [] */ 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);