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:
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)