diff options
author | James Booth <boothj5@gmail.com> | 2014-07-22 23:31:14 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-07-22 23:31:14 +0100 |
commit | 9123675c9c203fcf21f86ec49043fa58d63bea5e (patch) | |
tree | 7ce9698017805bf36f900452df79b8ce0900dbab /src/command | |
parent | fd1d54088955c181a662f68506a01d79c1770e32 (diff) | |
download | profani-tty-9123675c9c203fcf21f86ec49043fa58d63bea5e.tar.gz |
Show message when no group or empty roster on /who
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/commands.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index 49d0557f..be6f4dfb 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -802,8 +802,16 @@ _who_roster(const char * const group, const char * const presence) GSList *list = NULL; if (group != NULL) { list = roster_get_group(group); + if (list == NULL) { + cons_show("No such group: %s.", group); + return; + } } else { list = roster_get_contacts(); + if (list == NULL) { + cons_show("No contacts in roster."); + return; + } } // no arg, show all contacts |