mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 22:06:20 +00:00
Dont print error message if a valid setting function is called
This is because the actual command that parses itself (cmd_logging) returns false if it didn't get the expected parameters. Handing the printing however is done by another function. This function is added to the Command struct as setting_function. So if this is set, and the actual command returns false. We should just call the setting_function and not print the error message. Fix https://github.com/profanity-im/profanity/issues/1237
This commit is contained in:
@@ -462,7 +462,6 @@ ui_invalid_command_usage(const char *const cmd, void (*setting_func)(void))
|
|||||||
if (setting_func) {
|
if (setting_func) {
|
||||||
cons_show("");
|
cons_show("");
|
||||||
(*setting_func)();
|
(*setting_func)();
|
||||||
cons_show(msg->str);
|
|
||||||
} else {
|
} else {
|
||||||
cons_show("");
|
cons_show("");
|
||||||
cons_show(msg->str);
|
cons_show(msg->str);
|
||||||
|
|||||||
Reference in New Issue
Block a user