mirror of https://github.com/velour/catbase.git
Adding support for QUIT
This commit is contained in:
parent
13b77ad2b1
commit
ecdc1a7bb7
4
main.go
4
main.go
|
@ -71,6 +71,10 @@ func main() {
|
||||||
b.ActionRecieved(conn, line)
|
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) {
|
c.AddHandler("JOIN", func(conn *irc.Conn, line *irc.Line) {
|
||||||
b.ActionRecieved(conn, line)
|
b.ActionRecieved(conn, line)
|
||||||
})
|
})
|
||||||
|
|
|
@ -140,7 +140,7 @@ func (p *DowntimePlugin) Event(kind string, message bot.Message) bool {
|
||||||
} else {
|
} else {
|
||||||
p.record(strings.ToLower(message.User.Name))
|
p.record(strings.ToLower(message.User.Name))
|
||||||
}
|
}
|
||||||
} else if kind == "PART" {
|
} else if kind == "PART" || kind == "QUIT" {
|
||||||
p.remove(strings.ToLower(message.User.Name))
|
p.remove(strings.ToLower(message.User.Name))
|
||||||
} else {
|
} else {
|
||||||
log.Println("Unknown event: ", kind, message.User, message)
|
log.Println("Unknown event: ", kind, message.User, message)
|
||||||
|
|
Loading…
Reference in New Issue