Send PART msg to channel for quitting users

This commit is contained in:
Andreas Neue 2016-07-21 00:11:44 +02:00
parent 33b787a969
commit e70874e0d6
1 changed files with 2 additions and 1 deletions

View File

@ -130,9 +130,10 @@ func (sv *Server) dispatch() {
case cl := <-sv.DelClient: case cl := <-sv.DelClient:
nick := cl.Name() nick := cl.Name()
cl.Destroy() cl.Destroy()
for _, ch := range sv.chUsers { for chname, ch := range sv.chUsers {
if _, exists := ch[nick]; exists { if _, exists := ch[nick]; exists {
delete(ch, nick) delete(ch, nick)
sv.sendMsg(irc.M(nick, "PART", chname, "quit"))
} }
} }
delete(sv.clients, nick) delete(sv.clients, nick)