diff options
author | Michael Vetter <jubalh@iodoru.org> | 2022-07-29 08:47:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 08:47:35 +0200 |
commit | 0e02cc3cf6fb2ff519b1e0a8bed613d906495af4 (patch) | |
tree | c6eec64fb219f563276afad754e9e7754a20e202 | |
parent | 9605334d5a57dfcf6ef367a92574c9901f688bd8 (diff) | |
parent | 4ea98c71ee0095115db905569fac18a8a82731c1 (diff) | |
download | profani-tty-0e02cc3cf6fb2ff519b1e0a8bed613d906495af4.tar.gz |
Merge pull request #1736 from netboy3/fix/autoaway_logic
Fix /autoaway command logic
-rw-r--r-- | src/command/cmd_funcs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 7e08a783..5d3673bb 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -6677,9 +6677,6 @@ cmd_autoaway(ProfWin* window, const char* const command, gchar** args) cons_bad_cmd_usage(command); return TRUE; } - } else { - cons_bad_cmd_usage(command); - return TRUE; } if (g_strcmp0(args[0], "message") == 0) { @@ -6693,7 +6690,7 @@ cmd_autoaway(ProfWin* window, const char* const command, gchar** args) } return TRUE; - } else if (g_strcmp0(args[1], "xa") == 0) { + } else if (g_strcmp0(args[1], "xa") == 0 && args[2] != NULL) { if (g_strcmp0(args[2], "off") == 0) { prefs_set_string(PREF_AUTOXA_MESSAGE, NULL); cons_show("Auto xa message cleared."); @@ -6714,6 +6711,7 @@ cmd_autoaway(ProfWin* window, const char* const command, gchar** args) return TRUE; } + cons_bad_cmd_usage(command); return TRUE; } |