From 788c69aaa8529fede00411ad846be73102d03ee5 Mon Sep 17 00:00:00 2001 From: Alex Bramley Date: Tue, 30 Aug 2011 23:08:10 +0100 Subject: [PATCH] Fix same logic bug in KICK handler. --- client/handlers.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/handlers.go b/client/handlers.go index 145742f..8be354e 100644 --- a/client/handlers.go +++ b/client/handlers.go @@ -144,7 +144,12 @@ func (conn *Conn) h_KICK(line *Line) { ch := conn.GetChannel(line.Args[0]) n := conn.GetNick(line.Args[1]) if ch != nil && n != nil { - ch.DelNick(n) + if _, ok := ch.Nicks[n]; ok { + ch.DelNick(n) + } else { + conn.error("irc.KICK(): nick %s is not on channel %s", + line.Nick, line.Args[0]) + } } else { conn.error("irc.KICK(): buh? KICK from channel %s of nick %s", line.Args[0], line.Args[1])