From 4b5b66dd6db71b5fecec03076260e4be3c0411a8 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Tue, 5 Feb 2019 15:24:49 -0500 Subject: [PATCH] bot: unroll args --- bot/handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/handlers.go b/bot/handlers.go index 4c95f1c..2108afc 100644 --- a/bot/handlers.go +++ b/bot/handlers.go @@ -29,7 +29,7 @@ func (b *bot) Receive(kind Kind, msg msg.Message, args ...interface{}) { } for _, name := range b.pluginOrdering { - if b.runCallback(b.plugins[name], kind, msg, args) { + if b.runCallback(b.plugins[name], kind, msg, args...) { goto RET } } @@ -42,7 +42,7 @@ RET: func (b *bot) runCallback(plugin Plugin, evt Kind, message msg.Message, args ...interface{}) bool { t := reflect.TypeOf(plugin) for _, cb := range b.callbacks[t][evt] { - if cb(evt, message, args) { + if cb(evt, message, args...) { return true } }