Store real jid with occupants

This commit is contained in:
James Booth
2014-10-01 13:27:01 +01:00
parent b189f8f52e
commit 60e0d5ef7b
8 changed files with 47 additions and 24 deletions

View File

@@ -1937,7 +1937,11 @@ _ui_show_room_role_list(ProfWin *window, const char * const room, muc_role_t rol
while(curr_occupant) {
Occupant *occupant = curr_occupant->data;
if (occupant->role == role) {
win_save_vprint(window, '!', NULL, 0, 0, "", " %s", occupant->nick);
if (occupant->jid) {
win_save_vprint(window, '!', NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid);
} else {
win_save_vprint(window, '!', NULL, 0, 0, "", " %s", occupant->nick);
}
}
curr_occupant = g_slist_next(curr_occupant);
@@ -1992,7 +1996,11 @@ _ui_show_room_affiliation_list(ProfWin *window, const char * const room, muc_aff
while(curr_occupant) {
Occupant *occupant = curr_occupant->data;
if (occupant->affiliation == affiliation) {
win_save_vprint(window, '!', NULL, 0, 0, "", " %s", occupant->nick);
if (occupant->jid) {
win_save_vprint(window, '!', NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid);
} else {
win_save_vprint(window, '!', NULL, 0, 0, "", " %s", occupant->nick);
}
}
curr_occupant = g_slist_next(curr_occupant);

View File

@@ -204,6 +204,10 @@ win_show_occupant_info(ProfWin *window, const char * const room, Occupant *occup
win_save_newline(window);
if (occupant->jid) {
win_save_vprint(window, '!', NULL, 0, 0, "", " Jid: %s", occupant->jid);
}
win_save_vprint(window, '!', NULL, 0, 0, "", " Affiliation: %s", occupant_affiliation);
win_save_vprint(window, '!', NULL, 0, 0, "", " Role: %s", occupant_role);