From 3790b16299efb29843d4a221c41047d094616b5e Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 18 Oct 2014 01:07:25 +0100 Subject: Add output for when both role and affiliation changed at same time --- src/server_events.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/server_events.c') diff --git a/src/server_events.c b/src/server_events.c index 3916fc41..631a190d 100644 --- a/src/server_events.c +++ b/src/server_events.c @@ -719,10 +719,16 @@ handle_muc_self_online(const char * const room, const char * const nick, gboolea // check for change in role/affiliation } else { - if (g_strcmp0(role, old_role) != 0) { + // both changed + if ((g_strcmp0(role, old_role) != 0) && (g_strcmp0(affiliation, old_affiliation) != 0)) { + ui_room_role_and_affiliation_change(room, role, affiliation); + + // role changed + } else if (g_strcmp0(role, old_role) != 0) { ui_room_role_change(room, role); - } - if (g_strcmp0(affiliation, old_affiliation) != 0) { + + // affiliation changed + } else if (g_strcmp0(affiliation, old_affiliation) != 0) { ui_room_affiliation_change(room, affiliation); } } -- cgit 1.4.1-2-gfad0