diff options
author | James Booth <boothj5@gmail.com> | 2014-10-18 01:07:25 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-10-18 01:07:25 +0100 |
commit | 3790b16299efb29843d4a221c41047d094616b5e (patch) | |
tree | 3cbc4de1f087cb895f82bf3fbe96836bc0093bc7 /src/server_events.c | |
parent | 9134a65e973c97231fe9d5b80e92ed90f980f1cb (diff) | |
download | profani-tty-3790b16299efb29843d4a221c41047d094616b5e.tar.gz |
Add output for when both role and affiliation changed at same time
Diffstat (limited to 'src/server_events.c')
-rw-r--r-- | src/server_events.c | 12 |
1 files changed, 9 insertions, 3 deletions
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); } } |