Adding support for QUIT

This commit is contained in:
Chris Sexton 2013-02-18 14:08:08 -05:00
parent 13b77ad2b1
commit ecdc1a7bb7
2 changed files with 5 additions and 1 deletions

View File

@ -71,6 +71,10 @@ func main() {
b.ActionRecieved(conn, line)
})
c.AddHandler("QUIT", func(conn *irc.Conn, line *irc.Line) {
b.ActionRecieved(conn, line)
})
c.AddHandler("JOIN", func(conn *irc.Conn, line *irc.Line) {
b.ActionRecieved(conn, line)
})

View File

@ -140,7 +140,7 @@ func (p *DowntimePlugin) Event(kind string, message bot.Message) bool {
} else {
p.record(strings.ToLower(message.User.Name))
}
} else if kind == "PART" {
} else if kind == "PART" || kind == "QUIT" {
p.remove(strings.ToLower(message.User.Name))
} else {
log.Println("Unknown event: ", kind, message.User, message)