mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Using /who in chat room shows room occupants
This commit is contained in:
parent
181669a8cb
commit
c967cd9dc9
@ -895,6 +895,10 @@ _cmd_who(const char * const inp, struct cmd_help_t help)
|
||||
cons_show("Usage: %s", help.usage);
|
||||
|
||||
// valid arg
|
||||
} else {
|
||||
if (win_in_groupchat()) {
|
||||
char *room = win_get_recipient();
|
||||
win_show_room_roster(room);
|
||||
} else {
|
||||
GSList *list = get_contact_list();
|
||||
|
||||
@ -940,6 +944,7 @@ _cmd_who(const char * const inp, struct cmd_help_t help)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -502,10 +502,10 @@ win_show_room_roster(const char * const room)
|
||||
|
||||
GList *roster = room_get_roster(room);
|
||||
|
||||
if (roster != NULL) {
|
||||
if ((roster == NULL) || (g_list_length(roster) == 0)) {
|
||||
wprintw(win, "You are alone!\n");
|
||||
} else {
|
||||
wprintw(win, "Room occupants:\n");
|
||||
}
|
||||
|
||||
wattron(win, COLOUR_ONLINE);
|
||||
|
||||
while (roster != NULL) {
|
||||
@ -515,9 +515,10 @@ win_show_room_roster(const char * const room)
|
||||
}
|
||||
roster = g_list_next(roster);
|
||||
}
|
||||
wprintw(win, "\n");
|
||||
|
||||
wprintw(win, "\n");
|
||||
wattroff(win, COLOUR_ONLINE);
|
||||
}
|
||||
|
||||
if (win_index == _curr_prof_win)
|
||||
dirty = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user