Send PART msg to channel for quitting users
This commit is contained in:
parent
33b787a969
commit
e70874e0d6
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue