mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
mucwin_history takes ProfMucWin
This commit is contained in:
parent
6ed72d8a35
commit
e68784be43
@ -155,7 +155,10 @@ void
|
||||
sv_ev_room_history(const char *const room_jid, const char *const nick,
|
||||
GDateTime *timestamp, const char *const message)
|
||||
{
|
||||
mucwin_history(room_jid, nick, timestamp, message);
|
||||
ProfMucWin *mucwin = wins_get_muc(room_jid);
|
||||
if (mucwin) {
|
||||
mucwin_history(mucwin, nick, timestamp, message);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -332,13 +332,11 @@ mucwin_nick_change(ProfMucWin *mucwin, const char *const nick)
|
||||
}
|
||||
|
||||
void
|
||||
mucwin_history(const char *const roomjid, const char *const nick,
|
||||
GDateTime *timestamp, const char *const message)
|
||||
mucwin_history(ProfMucWin *mucwin, const char *const nick, GDateTime *timestamp, const char *const message)
|
||||
{
|
||||
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
|
||||
if (window == NULL) {
|
||||
log_error("Room history message received from %s, but no window open for %s", nick, roomjid);
|
||||
} else {
|
||||
assert(mucwin != NULL);
|
||||
|
||||
ProfWin *window = (ProfWin*)mucwin;
|
||||
GString *line = g_string_new("");
|
||||
|
||||
if (strncmp(message, "/me ", 4) == 0) {
|
||||
@ -355,7 +353,6 @@ mucwin_history(const char *const roomjid, const char *const nick,
|
||||
win_print(window, '-', 0, timestamp, NO_COLOUR_DATE, 0, "", line->str);
|
||||
g_string_free(line, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
mucwin_message(const char *const roomjid, const char *const nick,
|
||||
|
@ -173,8 +173,7 @@ void mucwin_occupant_affiliation_change(ProfMucWin *mucwin, const char *const ni
|
||||
void mucwin_occupant_role_and_affiliation_change(ProfMucWin *mucwin, const char *const nick,
|
||||
const char *const role, const char *const affiliation, const char *const actor, const char *const reason);
|
||||
void mucwin_roster(ProfMucWin *mucwin, GList *occupants, const char *const presence);
|
||||
void mucwin_history(const char *const roomjid, const char *const nick, GDateTime *timestamp,
|
||||
const char *const message);
|
||||
void mucwin_history(ProfMucWin *mucwin, const char *const nick, GDateTime *timestamp, const char *const message);
|
||||
void mucwin_message(const char *const roomjid, const char *const nick, const char *const message);
|
||||
void mucwin_subject(const char *const roomjid, const char *const nick, const char *const subject);
|
||||
void mucwin_requires_config(const char *const roomjid);
|
||||
|
@ -204,8 +204,7 @@ void mucwin_occupant_affiliation_change(ProfMucWin *mucwin, const char * const n
|
||||
void mucwin_occupant_role_and_affiliation_change(ProfMucWin *mucwin, const char * const nick, const char * const role,
|
||||
const char * const affiliation, const char * const actor, const char * const reason) {}
|
||||
void mucwin_roster(ProfMucWin *mucwin, GList *occupants, const char * const presence) {}
|
||||
void mucwin_history(const char * const roomjid, const char * const nick,
|
||||
GDateTime *timestamp, const char * const message) {}
|
||||
void mucwin_history(ProfMucWin *mucwin, const char * const nick, GDateTime *timestamp, const char * const message) {}
|
||||
void mucwin_message(const char * const roomjid, const char * const nick,
|
||||
const char * const message) {}
|
||||
void mucwin_subject(const char * const roomjid, const char * const nick, const char * const subject) {}
|
||||
|
Loading…
Reference in New Issue
Block a user