diff options
author | DebXWoody <stefan@debxwoody.de> | 2021-10-17 20:41:11 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2021-12-06 13:33:21 +0100 |
commit | 2f3de0eb0da2792e6e4f0cade0acfea5af9ab370 (patch) | |
tree | 9e907c1a921a6540e95a9872f8cf8e9ef9e6dad4 /src/command/cmd_funcs.c | |
parent | e745b4af60bf9d504abec737babebe0a0f9c5ef8 (diff) | |
download | profani-tty-2f3de0eb0da2792e6e4f0cade0acfea5af9ab370.tar.gz |
xep-0107: code review
* Remarks in the Merge Request (ac_reset, help) * Defines in iq.c * Mood help and null check * Added additional information about tab key in CMD_DESC. * Added additional null check
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r-- | src/command/cmd_funcs.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 5e6b3cc2..fe5d5e45 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -9649,13 +9649,14 @@ cmd_register(ProfWin* window, const char* const command, gchar** args) gboolean cmd_mood(ProfWin* window, const char* const command, gchar** args) { - if (g_strcmp0(args[0], "set") == 0) { - cons_show("Your mood: %s", args[1]); - if (args[2]) { - publish_user_mood(args[1], args[2]); - } else { - publish_user_mood(args[1], args[1]); + if(args[1]) { + cons_show("Your mood: %s", args[1]); + if (args[2]) { + publish_user_mood(args[1], args[2]); + } else { + publish_user_mood(args[1], args[1]); + } } } return TRUE; |