mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
mucwin_affiliation_change takes ProfMucWin
This commit is contained in:
parent
e547ae0bcc
commit
c0fc7b51e3
@ -599,7 +599,10 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c
|
|||||||
|
|
||||||
// affiliation changed
|
// affiliation changed
|
||||||
} else if (g_strcmp0(affiliation, old_affiliation) != 0) {
|
} else if (g_strcmp0(affiliation, old_affiliation) != 0) {
|
||||||
mucwin_affiliation_change(room, affiliation, actor, reason);
|
ProfMucWin *mucwin = wins_get_muc(room);
|
||||||
|
if (mucwin) {
|
||||||
|
mucwin_affiliation_change(mucwin, affiliation, actor, reason);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,8 +41,7 @@
|
|||||||
#include "ui/window.h"
|
#include "ui/window.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
mucwin_role_change(ProfMucWin *mucwin, const char *const role, const char *const actor,
|
mucwin_role_change(ProfMucWin *mucwin, const char *const role, const char *const actor, const char *const reason)
|
||||||
const char *const reason)
|
|
||||||
{
|
{
|
||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
@ -58,10 +57,12 @@ mucwin_role_change(ProfMucWin *mucwin, const char *const role, const char *const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
mucwin_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor,
|
mucwin_affiliation_change(ProfMucWin *mucwin, const char *const affiliation, const char *const actor,
|
||||||
const char *const reason)
|
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 affiliation has been changed to: %s", affiliation);
|
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Your affiliation has been changed to: %s", affiliation);
|
||||||
if (actor) {
|
if (actor) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
||||||
|
@ -162,7 +162,7 @@ void chatwin_otr_smp_event(ProfChatWin *chatwin, prof_otr_smp_event_t event, voi
|
|||||||
|
|
||||||
// MUC window
|
// MUC window
|
||||||
void mucwin_role_change(ProfMucWin *mucwin, const char *const role, const char *const actor, const char *const reason);
|
void mucwin_role_change(ProfMucWin *mucwin, const char *const role, const char *const actor, const char *const reason);
|
||||||
void mucwin_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor,
|
void mucwin_affiliation_change(ProfMucWin *mucwin, const char *const affiliation, const char *const actor,
|
||||||
const char *const reason);
|
const char *const reason);
|
||||||
void mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role,
|
void mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role,
|
||||||
const char *const affiliation, const char *const actor, const char *const reason);
|
const char *const affiliation, const char *const actor, const char *const reason);
|
||||||
|
@ -193,7 +193,7 @@ void ui_switch_to_room(const char * const roomjid) {}
|
|||||||
|
|
||||||
void mucwin_role_change(ProfMucWin *mucwin, const char * const role, const char * const actor,
|
void mucwin_role_change(ProfMucWin *mucwin, const char * const role, const char * const actor,
|
||||||
const char * const reason) {}
|
const char * const reason) {}
|
||||||
void mucwin_affiliation_change(const char * const roomjid, const char * const affiliation, const char * const actor,
|
void mucwin_affiliation_change(ProfMucWin *mucwin, const char * const affiliation, const char * const actor,
|
||||||
const char * const reason) {}
|
const char * const reason) {}
|
||||||
void mucwin_role_and_affiliation_change(const char * const roomjid, const char * const role,
|
void mucwin_role_and_affiliation_change(const char * const roomjid, const char * const role,
|
||||||
const char * const affiliation, const char * const actor, const char * const reason) {}
|
const char * const affiliation, const char * const actor, const char * const reason) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user