Skip to content
Permalink
Browse files

Merge pull request #25 from nado/hotfix

Reorder tests in condition to avoid a "index out of range" error
  • Loading branch information...
Depado committed Jan 23, 2016
2 parents b46554b + facb8b0 commit 142eb66688f997cad26f8577eca6e7d80c0205fb
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugins/usercommand/middleware.go
@@ -31,7 +31,7 @@ func (m *Middleware) Get(ib *irc.Connection, from string, to string, message str
return
}
cnf := configuration.Config
if !strings.HasPrefix(message, cnf.UserCommandCharacter) || len(message) == 1 {
if len(message) == 1 || !strings.HasPrefix(message, cnf.UserCommandCharacter) {
return
}

0 comments on commit 142eb66

Please sign in to comment.
You can’t perform that action at this time.