mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
mucwin_occupant_offline takes ProfMucWin
This commit is contained in:
parent
8b4bb1c7f1
commit
24f283e960
@ -485,8 +485,9 @@ sv_ev_room_occupant_offline(const char *const room, const char *const nick,
|
|||||||
muc_roster_remove(room, nick);
|
muc_roster_remove(room, nick);
|
||||||
|
|
||||||
char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC);
|
char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC);
|
||||||
if (g_strcmp0(muc_status_pref, "none") != 0) {
|
ProfMucWin *mucwin = wins_get_muc(room);
|
||||||
mucwin_occupant_offline(room, nick);
|
if (mucwin && (g_strcmp0(muc_status_pref, "none") != 0)) {
|
||||||
|
mucwin_occupant_offline(mucwin, nick);
|
||||||
}
|
}
|
||||||
prefs_free_string(muc_status_pref);
|
prefs_free_string(muc_status_pref);
|
||||||
occupantswin_occupants(room);
|
occupantswin_occupants(room);
|
||||||
|
@ -232,14 +232,12 @@ mucwin_roster(ProfMucWin *mucwin, GList *roster, const char *const presence)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
mucwin_occupant_offline(const char *const roomjid, const char *const nick)
|
mucwin_occupant_offline(ProfMucWin *mucwin, const char *const nick)
|
||||||
{
|
{
|
||||||
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
|
assert(mucwin != NULL);
|
||||||
if (window == NULL) {
|
|
||||||
log_error("Received offline presence for room participant %s, but no window open for %s.", nick, roomjid);
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
} else {
|
win_vprint(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s has left the room.", nick);
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s has left the room.", nick);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -188,7 +188,7 @@ void mucwin_occupant_kicked(const char *const roomjid, const char *const nick, c
|
|||||||
void mucwin_occupant_banned(const char *const roomjid, const char *const nick, const char *const actor,
|
void mucwin_occupant_banned(const char *const roomjid, const char *const nick, const char *const actor,
|
||||||
const char *const reason);
|
const char *const reason);
|
||||||
void mucwin_broadcast(const char *const roomjid, const char *const message);
|
void mucwin_broadcast(const char *const roomjid, const char *const message);
|
||||||
void mucwin_occupant_offline(const char *const roomjid, const char *const nick);
|
void mucwin_occupant_offline(ProfMucWin *mucwin, const char *const nick);
|
||||||
void mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const roles,
|
void mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const roles,
|
||||||
const char *const affiliation, const char *const show, const char *const status);
|
const char *const affiliation, const char *const show, const char *const status);
|
||||||
void mucwin_occupant_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick);
|
void mucwin_occupant_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick);
|
||||||
|
@ -227,7 +227,7 @@ void mucwin_occupant_banned(const char * const roomjid, const char * const nick,
|
|||||||
void ui_leave_room(const char * const roomjid) {}
|
void ui_leave_room(const char * const roomjid) {}
|
||||||
void mucwin_broadcast(const char * const roomjid,
|
void mucwin_broadcast(const char * const roomjid,
|
||||||
const char * const message) {}
|
const char * const message) {}
|
||||||
void mucwin_occupant_offline(const char * const roomjid, const char * const nick) {}
|
void mucwin_occupant_offline(ProfMucWin *mucwin, const char * const nick) {}
|
||||||
void mucwin_occupant_online(const char * const roomjid, const char * const nick, const char * const roles,
|
void mucwin_occupant_online(const char * const roomjid, const char * const nick, const char * const roles,
|
||||||
const char * const affiliation, const char * const show, const char * const status) {}
|
const char * const affiliation, const char * const show, const char * const status) {}
|
||||||
void mucwin_occupant_nick_change(const char * const roomjid,
|
void mucwin_occupant_nick_change(const char * const roomjid,
|
||||||
|
Loading…
Reference in New Issue
Block a user