1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

mucwin_occupant_presence takes ProfMucWin

This commit is contained in:
James Booth 2015-11-02 00:14:16 +00:00
parent d505a92d1e
commit b3150ef8e1
4 changed files with 11 additions and 12 deletions

View File

@ -658,8 +658,9 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const
// presence updated
if (updated) {
char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC);
if (g_strcmp0(muc_status_pref, "all") == 0) {
mucwin_occupant_presence(room, nick, show, status);
ProfMucWin *mucwin = wins_get_muc(room);
if (mucwin && (g_strcmp0(muc_status_pref, "all") == 0)) {
mucwin_occupant_presence(mucwin, nick, show, status);
}
prefs_free_string(muc_status_pref);
occupantswin_occupants(room);

View File

@ -304,15 +304,13 @@ mucwin_occupant_online(ProfMucWin *mucwin, const char *const nick, const char *c
}
void
mucwin_occupant_presence(const char *const roomjid, const char *const nick,
mucwin_occupant_presence(ProfMucWin *mucwin, const char *const nick,
const char *const show, const char *const status)
{
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
if (window == NULL) {
log_error("Received presence for room participant %s, but no window open for %s.", nick, roomjid);
} else {
win_show_status_string(window, nick, show, status, NULL, "++", "online");
}
assert(mucwin != NULL);
ProfWin *window = (ProfWin*)mucwin;
win_show_status_string(window, nick, show, status, NULL, "++", "online");
}
void

View File

@ -193,7 +193,7 @@ void mucwin_occupant_online(ProfMucWin *mucwin, const char *const nick, const ch
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_nick_change(const char *const roomjid, const char *const nick);
void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show,
void mucwin_occupant_presence(ProfMucWin *mucwin, const char *const nick, const char *const show,
const char *const status);
void mucwin_update_occupants(const char *const roomjid);
void mucwin_show_occupants(const char *const roomjid);

View File

@ -233,8 +233,8 @@ void mucwin_occupant_online(ProfMucWin *mucwin, const char * const nick, const c
void mucwin_occupant_nick_change(const char * const roomjid,
const char * const old_nick, const char * const nick) {}
void mucwin_nick_change(const char * const roomjid, const char * const nick) {}
void mucwin_occupant_presence(const char * const roomjid,
const char * const nick, const char * const show, const char * const status) {}
void mucwin_occupant_presence(ProfMucWin *mucwin, const char * const nick, const char * const show,
const char * const status) {}
void mucwin_update_occupants(const char * const roomjid) {}
void mucwin_show_occupants(const char * const roomjid) {}
void mucwin_hide_occupants(const char * const roomjid) {}