mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
mucwin_kick_error takes ProfMucWin
This commit is contained in:
parent
23ada0d38b
commit
5c53c94253
@ -497,15 +497,13 @@ mucwin_subject(ProfMucWin *mucwin, const char *const nick, const char *const sub
|
||||
}
|
||||
|
||||
void
|
||||
mucwin_kick_error(const char *const roomjid, const char *const nick, const char *const error)
|
||||
mucwin_kick_error(ProfMucWin *mucwin, const char *const nick, const char *const error)
|
||||
{
|
||||
ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
|
||||
if (window == NULL) {
|
||||
log_error("Kick error received for %s, but no window open for %s.", nick, roomjid);
|
||||
} else {
|
||||
assert(mucwin != NULL);
|
||||
|
||||
ProfWin *window = (ProfWin*)mucwin;
|
||||
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error kicking %s: %s", nick, error);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
mucwin_broadcast(const char *const roomjid, const char *const message)
|
||||
|
@ -206,7 +206,7 @@ void mucwin_role_set_error(const char *const roomjid, const char *const nick, co
|
||||
const char *const error);
|
||||
void mucwin_role_list_error(const char *const roomjid, const char *const role, const char *const error);
|
||||
void mucwin_handle_role_list(const char *const roomjid, const char *const role, GSList *nicks);
|
||||
void mucwin_kick_error(const char *const roomjid, const char *const nick, const char *const error);
|
||||
void mucwin_kick_error(ProfMucWin *mucwin, const char *const nick, const char *const error);
|
||||
|
||||
// xml console
|
||||
void xmlwin_show(ProfXMLWin *xmlwin, const char *const msg);
|
||||
|
@ -1462,12 +1462,11 @@ _room_kick_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza,
|
||||
}
|
||||
|
||||
// handle error responses
|
||||
if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) {
|
||||
ProfMucWin *mucwin = wins_get_muc(from);
|
||||
if (mucwin && (g_strcmp0(type, STANZA_TYPE_ERROR) == 0)) {
|
||||
char *error_message = stanza_get_error_message(stanza);
|
||||
mucwin_kick_error(from, nick, error_message);
|
||||
mucwin_kick_error(mucwin, nick, error_message);
|
||||
free(error_message);
|
||||
free(nick);
|
||||
return 0;
|
||||
}
|
||||
|
||||
free(nick);
|
||||
|
@ -281,7 +281,7 @@ void mucwin_role_set_error(const char * const roomjid, const char * const nick,
|
||||
const char * const error) {}
|
||||
void mucwin_role_list_error(const char * const roomjid, const char * const role, const char * const error) {}
|
||||
void mucwin_handle_role_list(const char * const roomjid, const char * const role, GSList *nicks) {}
|
||||
void mucwin_kick_error(const char * const roomjid, const char * const nick, const char * const error) {}
|
||||
void mucwin_kick_error(ProfMucWin *mucwin, const char * const nick, const char * const error) {}
|
||||
void ui_show_form(ProfMucConfWin *confwin) {}
|
||||
void ui_show_form_field(ProfWin *window, DataForm *form, char *tag) {}
|
||||
void ui_show_form_help(ProfMucConfWin *confwin) {}
|
||||
|
Loading…
Reference in New Issue
Block a user