mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
mucwin_occupant_role_change takes ProfMucWin
This commit is contained in:
parent
22cd5b433f
commit
288c1a9d6e
@ -664,7 +664,10 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const
|
||||
|
||||
// role changed
|
||||
} else if (g_strcmp0(role, old_role) != 0) {
|
||||
mucwin_occupant_role_change(room, nick, role, actor, reason);
|
||||
ProfMucWin *mucwin = wins_get_muc(room);
|
||||
if (mucwin) {
|
||||
mucwin_occupant_role_change(mucwin, nick, role, actor, reason);
|
||||
}
|
||||
|
||||
// affiliation changed
|
||||
} else if (g_strcmp0(affiliation, old_affiliation) != 0) {
|
||||
|
@ -92,10 +92,12 @@ mucwin_role_and_affiliation_change(ProfMucWin *mucwin, const char *const role, c
|
||||
|
||||
|
||||
void
|
||||
mucwin_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role,
|
||||
mucwin_occupant_role_change(ProfMucWin *mucwin, const char *const nick, const char *const role,
|
||||
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, "", "%s's role has been changed to: %s", nick, role);
|
||||
if (actor) {
|
||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
||||
|
@ -166,7 +166,7 @@ void mucwin_affiliation_change(ProfMucWin *mucwin, const char *const affiliation
|
||||
const char *const reason);
|
||||
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,
|
||||
void mucwin_occupant_role_change(ProfMucWin *mucwin, const char *const nick, const char *const role,
|
||||
const char *const actor, const char *const reason);
|
||||
void mucwin_occupant_affiliation_change(const char *const roomjid, const char *const nick,
|
||||
const char *const affiliation, const char *const actor, const char *const reason);
|
||||
|
@ -197,7 +197,7 @@ void mucwin_affiliation_change(ProfMucWin *mucwin, const char * const affiliatio
|
||||
const char * const reason) {}
|
||||
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,
|
||||
void mucwin_occupant_role_change(ProfMucWin *mucwin, const char * const nick, const char * const role,
|
||||
const char * const actor, const char * const reason) {}
|
||||
void mucwin_occupant_affiliation_change(const char * const roomjid, const char * const nick, const char * const affiliation,
|
||||
const char * const actor, const char * const reason) {}
|
||||
|
Loading…
Reference in New Issue
Block a user