mirror of https://github.com/velour/catbase.git
Fix empty string indexing crash
This commit is contained in:
parent
078eea0ca3
commit
b4c26956ab
|
@ -36,7 +36,7 @@ func New(bot bot.Bot) *AdminPlugin {
|
||||||
func (p *AdminPlugin) Message(message msg.Message) bool {
|
func (p *AdminPlugin) Message(message msg.Message) bool {
|
||||||
body := message.Body
|
body := message.Body
|
||||||
|
|
||||||
if body[0] == '$' {
|
if len(body) > 0 && body[0] == '$' {
|
||||||
return p.handleVariables(message)
|
return p.handleVariables(message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue