Do not Disconnect() on ERROR events (e.g: KILL).

This commit is contained in:
James Mills 2017-11-12 13:45:29 -08:00
parent 656226dc22
commit 547dde5ba3
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6

View File

@ -158,9 +158,6 @@ func (irc *Connection) RunCallbacks(event *Event) {
func (irc *Connection) setupCallbacks() {
irc.events = make(map[string]map[int]func(*Event))
//Handle error events.
irc.AddCallback("ERROR", func(e *Event) { irc.Disconnect() })
//Handle ping events
irc.AddCallback("PING", func(e *Event) { irc.SendRaw("PONG :" + e.Message()) })