mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-29 08:26:22 +00:00
Show message when no group or empty roster on /who
This commit is contained in:
@@ -802,8 +802,16 @@ _who_roster(const char * const group, const char * const presence)
|
|||||||
GSList *list = NULL;
|
GSList *list = NULL;
|
||||||
if (group != NULL) {
|
if (group != NULL) {
|
||||||
list = roster_get_group(group);
|
list = roster_get_group(group);
|
||||||
|
if (list == NULL) {
|
||||||
|
cons_show("No such group: %s.", group);
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
list = roster_get_contacts();
|
list = roster_get_contacts();
|
||||||
|
if (list == NULL) {
|
||||||
|
cons_show("No contacts in roster.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// no arg, show all contacts
|
// no arg, show all contacts
|
||||||
|
|||||||
Reference in New Issue
Block a user