mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
mucwin_occupant_nick_change takes ProfMucWin
This commit is contained in:
parent
b3150ef8e1
commit
42643391a4
@ -637,7 +637,10 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const
|
||||
// handle nickname change
|
||||
char *old_nick = muc_roster_nick_change_complete(room, nick);
|
||||
if (old_nick) {
|
||||
mucwin_occupant_nick_change(room, old_nick, nick);
|
||||
ProfMucWin *mucwin = wins_get_muc(room);
|
||||
if (mucwin) {
|
||||
mucwin_occupant_nick_change(mucwin, old_nick, nick);
|
||||
}
|
||||
free(old_nick);
|
||||
occupantswin_occupants(room);
|
||||
return;
|
||||
|
@ -314,15 +314,12 @@ mucwin_occupant_presence(ProfMucWin *mucwin, const char *const nick,
|
||||
}
|
||||
|
||||
void
|
||||
mucwin_occupant_nick_change(const char *const roomjid,
|
||||
const char *const old_nick, const char *const nick)
|
||||
mucwin_occupant_nick_change(ProfMucWin *mucwin, const char *const old_nick, const char *const nick)
|
||||
{
|
||||
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
|
||||
if (window == NULL) {
|
||||
log_error("Received nick change for room participant %s, but no window open for %s.", old_nick, roomjid);
|
||||
} else {
|
||||
win_vprint(window, '!', 0, NULL, 0, THEME_THEM, "", "** %s is now known as %s", old_nick, nick);
|
||||
}
|
||||
assert(mucwin != NULL);
|
||||
|
||||
ProfWin *window = (ProfWin*)mucwin;
|
||||
win_vprint(window, '!', 0, NULL, 0, THEME_THEM, "", "** %s is now known as %s", old_nick, nick);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -191,7 +191,7 @@ void mucwin_broadcast(const char *const roomjid, const char *const message);
|
||||
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(const char *const roomjid, const char *const old_nick, const char *const nick);
|
||||
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_occupant_presence(ProfMucWin *mucwin, const char *const nick, const char *const show,
|
||||
const char *const status);
|
||||
|
@ -230,8 +230,7 @@ void mucwin_broadcast(const char * const roomjid,
|
||||
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(const char * const roomjid,
|
||||
const char * const old_nick, const char * const nick) {}
|
||||
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_occupant_presence(ProfMucWin *mucwin, const char * const nick, const char * const show,
|
||||
const char * const status) {}
|
||||
|
Loading…
Reference in New Issue
Block a user