diff --git a/plugins/admin/admin.go b/plugins/admin/admin.go index bf12c81..85988dc 100644 --- a/plugins/admin/admin.go +++ b/plugins/admin/admin.go @@ -36,7 +36,7 @@ func New(bot bot.Bot) *AdminPlugin { func (p *AdminPlugin) Message(message msg.Message) bool { body := message.Body - if body[0] == '$' { + if len(body) > 0 && body[0] == '$' { return p.handleVariables(message) }