diff --git a/client.go b/client.go index fb9b030..c5b2907 100644 --- a/client.go +++ b/client.go @@ -156,7 +156,7 @@ func (c *Client) reply(code replyCode, args ...string) { case rplNickChange: c.outputChan <- fmt.Sprintf(":%s NICK %s", args[0], args[1]) case rplKill: - c.outputChan <- fmt.Sprintf(":%s KILL %s A %s", c.server.name, c.nick, args[0]) + c.outputChan <- fmt.Sprintf(":%s KILL %s A %s", args[0], c.nick, args[1]) case rplMsg: c.outputChan <- fmt.Sprintf(":%s PRIVMSG %s %s", args[0], args[1], args[2]) case rplList: diff --git a/server.go b/server.go index f9f203c..f3f54b7 100644 --- a/server.go +++ b/server.go @@ -319,8 +319,10 @@ func (s *Server) handleEvent(e Event) { nick := args[0] + reason := strings.Join(args[1:], " ") + if client, exists := s.clientMap[strings.ToLower(nick)]; exists { - client.reply(rplKill, "An operator has disconnected you.") + client.reply(rplKill, e.client.nick, reason) client.disconnect() } else { e.client.reply(errNoSuchNick, nick)