This commit is contained in:
+15
-1
@@ -31,7 +31,17 @@ func handler(event *irc.Event, client *irc.Client) {
|
||||
bot.stopLoop()
|
||||
|
||||
conf := config.Get().Server
|
||||
go bot.Connect(conf.Address, conf.SSL, 0)
|
||||
go bot.Connect(conf.Address, conf.SSL, 100)
|
||||
}
|
||||
|
||||
// Log Connections
|
||||
case "client.connecting":
|
||||
{
|
||||
log.Println("Client is connecting...")
|
||||
}
|
||||
case "client.connect":
|
||||
{
|
||||
log.Println("Client connected!")
|
||||
}
|
||||
|
||||
// Log joins and leaves
|
||||
@@ -133,6 +143,10 @@ func handler(event *irc.Event, client *irc.Client) {
|
||||
}
|
||||
}
|
||||
|
||||
if event.Kind() == "error" {
|
||||
log.Printf("Client Error (%s) %s\n", event.Verb(), event.Text)
|
||||
}
|
||||
|
||||
// Always log error numerics.
|
||||
if len(event.Verb()) == 3 && event.Verb()[0] == '4' || event.Verb()[0] == '9' {
|
||||
log.Printf("(%s) %s %s\n", event.Verb(), strings.Join(event.Args, " "), event.Text)
|
||||
|
||||
Reference in New Issue
Block a user