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

mucwin_nick_change takes ProfMucWin

This commit is contained in:
James Booth 2015-11-02 00:17:46 +00:00
parent 42643391a4
commit 6ed72d8a35
4 changed files with 11 additions and 10 deletions

View File

@ -548,7 +548,10 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c
// handle self nick change
if (muc_nick_change_pending(room)) {
muc_nick_change_complete(room, nick);
mucwin_nick_change(room, nick);
ProfMucWin *mucwin = wins_get_muc(room);
if (mucwin) {
mucwin_nick_change(mucwin, nick);
}
// handle roster complete
} else if (!muc_roster_complete(room)) {

View File

@ -323,14 +323,12 @@ mucwin_occupant_nick_change(ProfMucWin *mucwin, const char *const old_nick, cons
}
void
mucwin_nick_change(const char *const roomjid, const char *const nick)
mucwin_nick_change(ProfMucWin *mucwin, const char *const nick)
{
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
if (window == NULL) {
log_error("Received self nick change %s, but no window open for %s.", nick, roomjid);
} else {
win_vprint(window, '!', 0, NULL, 0, THEME_ME, "", "** You are now known as %s", nick);
}
assert(mucwin != NULL);
ProfWin *window = (ProfWin*)mucwin;
win_vprint(window, '!', 0, NULL, 0, THEME_ME, "", "** You are now known as %s", nick);
}
void

View File

@ -192,7 +192,7 @@ void mucwin_occupant_offline(ProfMucWin *mucwin, const char *const nick);
void mucwin_occupant_online(ProfMucWin *mucwin, const char *const nick, const char *const roles,
const char *const affiliation, const char *const show, const char *const status);
void mucwin_occupant_nick_change(ProfMucWin *mucwin, const char *const old_nick, const char *const nick);
void mucwin_nick_change(const char *const roomjid, const char *const nick);
void mucwin_nick_change(ProfMucWin *mucwin, const char *const nick);
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);

View File

@ -231,7 +231,7 @@ void mucwin_occupant_offline(ProfMucWin *mucwin, const char * const nick) {}
void mucwin_occupant_online(ProfMucWin *mucwin, const char * const nick, const char * const roles,
const char * const affiliation, const char * const show, const char * const status) {}
void mucwin_occupant_nick_change(ProfMucWin *mucwin, const char * const old_nick, const char * const nick) {}
void mucwin_nick_change(const char * const roomjid, const char * const nick) {}
void mucwin_nick_change(ProfMucWin *mucwin, const char * const nick) {}
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) {}