about summary refs log tree commit diff stats
path: root/src/ui/mucwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/mucwin.c')
-rw-r--r--src/ui/mucwin.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c
index 238db218..f4e104ca 100644
--- a/src/ui/mucwin.c
+++ b/src/ui/mucwin.c
@@ -497,14 +497,12 @@ 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 {
-        win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error kicking %s: %s", nick, error);
-    }
+    assert(mucwin != NULL);
+
+    ProfWin *window = (ProfWin*)mucwin;
+    win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error kicking %s: %s", nick, error);
 }
 
 void