From e70874e0d6e8e261b86746c510e4b68a32905eb5 Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Thu, 21 Jul 2016 00:11:44 +0200 Subject: [PATCH] Send PART msg to channel for quitting users --- server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.go b/server.go index c606dd7..5a2e493 100644 --- a/server.go +++ b/server.go @@ -130,9 +130,10 @@ func (sv *Server) dispatch() { case cl := <-sv.DelClient: nick := cl.Name() cl.Destroy() - for _, ch := range sv.chUsers { + for chname, ch := range sv.chUsers { if _, exists := ch[nick]; exists { delete(ch, nick) + sv.sendMsg(irc.M(nick, "PART", chname, "quit")) } } delete(sv.clients, nick)