kunt

golang IRC bot
git clone git://git.2f30.org/kunt.git
Log | Files | Refs | LICENSE

commit 3586eb0f2af44cc116a01a7a0a3a9cda1cb52bea
parent 209ecc402ecaeb40ab323da7c0f05d369e43368b
Author: sin <sin@2f30.org>
Date:   Wed Jun  5 13:50:04 +0100

fix vet warnings

Diffstat:
src/kunt/kunt.go | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/kunt/kunt.go b/src/kunt/kunt.go @@ -407,7 +407,7 @@ func main() { } kunt.ircCtx = irc.NewIrcContext(cfg) - kunt.ircCtx.AddEventHandler(irc.Event{"PRIVMSG", func(msg irc.Message) { + kunt.ircCtx.AddEventHandler(irc.Event{Command: "PRIVMSG", Fn: func(msg irc.Message) { cmd := msg.Args[1] for i, v := range dispatch { if strings.HasPrefix(cmd, i) { @@ -416,15 +416,15 @@ func main() { } }}) - kunt.ircCtx.AddEventHandler(irc.Event{"PING", func(msg irc.Message) { + kunt.ircCtx.AddEventHandler(irc.Event{Command: "PING", Fn: func(msg irc.Message) { kunt.ircCtx.Pong(msg.Args[0]) }}) - kunt.ircCtx.AddEventHandler(irc.Event{"ERROR", func(msg irc.Message) { + kunt.ircCtx.AddEventHandler(irc.Event{Command: "ERROR", Fn: func(msg irc.Message) { os.Exit(0) }}) - kunt.ircCtx.AddEventHandler(irc.Event{"KICK", func(msg irc.Message) { + kunt.ircCtx.AddEventHandler(irc.Event{Command: "KICK", Fn: func(msg irc.Message) { time.Sleep(750 * time.Millisecond) kunt.ircCtx.Join("#2f30", "") }})