mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
mucwin_role_and_affiliation_change takes ProfMucWin
This commit is contained in:
parent
c0fc7b51e3
commit
6ea9314f98
@ -588,7 +588,10 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c
|
||||
if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) {
|
||||
// both changed
|
||||
if ((g_strcmp0(role, old_role) != 0) && (g_strcmp0(affiliation, old_affiliation) != 0)) {
|
||||
mucwin_role_and_affiliation_change(room, role, affiliation, actor, reason);
|
||||
ProfMucWin *mucwin = wins_get_muc(room);
|
||||
if (mucwin) {
|
||||
mucwin_role_and_affiliation_change(mucwin, role, affiliation, actor, reason);
|
||||
}
|
||||
|
||||
// role changed
|
||||
} else if (g_strcmp0(role, old_role) != 0) {
|
||||
|
@ -74,10 +74,12 @@ mucwin_affiliation_change(ProfMucWin *mucwin, const char *const affiliation, con
|
||||
}
|
||||
|
||||
void
|
||||
mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role, const char *const affiliation,
|
||||
mucwin_role_and_affiliation_change(ProfMucWin *mucwin, const char *const role, const char *const affiliation,
|
||||
const char *const actor, const char *const reason)
|
||||
{
|
||||
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
|
||||
assert(mucwin != NULL);
|
||||
|
||||
ProfWin *window = (ProfWin*)mucwin;
|
||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Your role and affiliation have been changed, role: %s, affiliation: %s", role, affiliation);
|
||||
if (actor) {
|
||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
||||
|
@ -164,7 +164,7 @@ void chatwin_otr_smp_event(ProfChatWin *chatwin, prof_otr_smp_event_t event, voi
|
||||
void mucwin_role_change(ProfMucWin *mucwin, const char *const role, const char *const actor, const char *const reason);
|
||||
void mucwin_affiliation_change(ProfMucWin *mucwin, const char *const affiliation, const char *const actor,
|
||||
const char *const reason);
|
||||
void mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role,
|
||||
void mucwin_role_and_affiliation_change(ProfMucWin *mucwin, const char *const role,
|
||||
const char *const affiliation, const char *const actor, const char *const reason);
|
||||
void mucwin_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role,
|
||||
const char *const actor, const char *const reason);
|
||||
|
@ -195,7 +195,7 @@ void mucwin_role_change(ProfMucWin *mucwin, const char * const role, const char
|
||||
const char * const reason) {}
|
||||
void mucwin_affiliation_change(ProfMucWin *mucwin, const char * const affiliation, const char * const actor,
|
||||
const char * const reason) {}
|
||||
void mucwin_role_and_affiliation_change(const char * const roomjid, const char * const role,
|
||||
void mucwin_role_and_affiliation_change(ProfMucWin *mucwin, const char * const role,
|
||||
const char * const affiliation, const char * const actor, const char * const reason) {}
|
||||
void mucwin_occupant_role_change(const char * const roomjid, const char * const nick, const char * const role,
|
||||
const char * const actor, const char * const reason) {}
|
||||
|
Loading…
Reference in New Issue
Block a user