diff --git a/bot/handlers.go b/bot/handlers.go index 18bb052..1d8d6b4 100644 --- a/bot/handlers.go +++ b/bot/handlers.go @@ -29,12 +29,14 @@ func (b *bot) MsgReceived(msg msg.Message) { goto RET } - for _, name := range b.pluginOrdering { - p := b.plugins[name] - if p.Message(msg) { - break + go (func() { + for _, name := range b.pluginOrdering { + p := b.plugins[name] + if p.Message(msg) { + break + } } - } + })() RET: b.logIn <- msg