mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Tidy sv_ev_muc_occupant_online
This commit is contained in:
parent
ed9585376e
commit
cb587b0772
@ -657,27 +657,19 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const
|
|||||||
|
|
||||||
// presence unchanged, check for role/affiliation change
|
// presence unchanged, check for role/affiliation change
|
||||||
} else {
|
} else {
|
||||||
if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) {
|
ProfMucWin *mucwin = wins_get_muc(room);
|
||||||
|
if (mucwin && prefs_get_boolean(PREF_MUC_PRIVILEGES)) {
|
||||||
// both changed
|
// both changed
|
||||||
if ((g_strcmp0(role, old_role) != 0) && (g_strcmp0(affiliation, old_affiliation) != 0)) {
|
if ((g_strcmp0(role, old_role) != 0) && (g_strcmp0(affiliation, old_affiliation) != 0)) {
|
||||||
ProfMucWin *mucwin = wins_get_muc(room);
|
mucwin_occupant_role_and_affiliation_change(mucwin, nick, role, affiliation, actor, reason);
|
||||||
if (mucwin) {
|
|
||||||
mucwin_occupant_role_and_affiliation_change(mucwin, nick, role, affiliation, actor, reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
// role changed
|
// role changed
|
||||||
} else if (g_strcmp0(role, old_role) != 0) {
|
} else if (g_strcmp0(role, old_role) != 0) {
|
||||||
ProfMucWin *mucwin = wins_get_muc(room);
|
mucwin_occupant_role_change(mucwin, nick, role, actor, reason);
|
||||||
if (mucwin) {
|
|
||||||
mucwin_occupant_role_change(mucwin, nick, role, actor, reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
// affiliation changed
|
// affiliation changed
|
||||||
} else if (g_strcmp0(affiliation, old_affiliation) != 0) {
|
} else if (g_strcmp0(affiliation, old_affiliation) != 0) {
|
||||||
ProfMucWin *mucwin = wins_get_muc(room);
|
mucwin_occupant_affiliation_change(mucwin, nick, affiliation, actor, reason);
|
||||||
if (mucwin) {
|
|
||||||
mucwin_occupant_affiliation_change(mucwin, nick, affiliation, actor, reason);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
occupantswin_occupants(room);
|
occupantswin_occupants(room);
|
||||||
|
Loading…
Reference in New Issue
Block a user