diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-11-25 10:40:25 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2019-11-25 10:40:25 +0100 |
commit | f0a719d1e1281cc2df73397934f172b03b5c2db9 (patch) | |
tree | 5691242259bef6ef940cae633ca79079cf76eeb8 /src/command/cmd_funcs.c | |
parent | 548b64f6c579cc70776eb817938f0ab4b64b007a (diff) | |
download | profani-tty-f0a719d1e1281cc2df73397934f172b03b5c2db9.tar.gz |
Merge /group command into /roster
Fix https://github.com/profanity-im/profanity/issues/1229 Regards https://github.com/profanity-im/profanity/issues/1116
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r-- | src/command/cmd_funcs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 4c0b238a..ccf5c62e 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -2230,7 +2230,7 @@ cmd_group(ProfWin *window, const char *const command, gchar **args) } // list all groups - if (args[0] == NULL) { + if (args[1] == NULL) { GList *groups = roster_get_groups(); GList *curr = groups; if (curr) { @@ -2248,8 +2248,8 @@ cmd_group(ProfWin *window, const char *const command, gchar **args) } // show contacts in group - if (strcmp(args[0], "show") == 0) { - char *group = args[1]; + if (strcmp(args[1], "show") == 0) { + char *group = args[2]; if (group == NULL) { cons_bad_cmd_usage(command); return TRUE; @@ -2261,9 +2261,9 @@ cmd_group(ProfWin *window, const char *const command, gchar **args) } // add contact to group - if (strcmp(args[0], "add") == 0) { - char *group = args[1]; - char *contact = args[2]; + if (strcmp(args[1], "add") == 0) { + char *group = args[2]; + char *contact = args[3]; if ((group == NULL) || (contact == NULL)) { cons_bad_cmd_usage(command); @@ -2292,9 +2292,9 @@ cmd_group(ProfWin *window, const char *const command, gchar **args) } // remove contact from group - if (strcmp(args[0], "remove") == 0) { - char *group = args[1]; - char *contact = args[2]; + if (strcmp(args[1], "remove") == 0) { + char *group = args[2]; + char *contact = args[3]; if ((group == NULL) || (contact == NULL)) { cons_bad_cmd_usage(command); |