Fix bug with empty commands

This commit is contained in:
Chris Sexton 2016-01-17 10:29:14 -05:00
parent 72b71de10e
commit 88c2736f5a
2 changed files with 8 additions and 0 deletions

View File

@ -42,6 +42,10 @@ func (p *AdminPlugin) Message(message bot.Message) bool {
body := message.Body
if len(body) == 0 {
return false
}
if body[0] == '$' {
return p.handleVariables(message)
}

View File

@ -129,6 +129,10 @@ func (p *DowntimePlugin) Message(message bot.Message) bool {
channel := message.Channel
ret := false
if len(parts) == 0 {
return false
}
if parts[0] == "idle" && len(parts) == 2 {
nick := parts[1]
// parts[1] must be the userid, or we don't know them