add more logging and update irc code.
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-07-20 21:14:49 +02:00
parent de04d6069b
commit 293102c1c6
3 changed files with 18 additions and 2 deletions
+15 -1
View File
@@ -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)