mirror of https://github.com/velour/catbase.git
Fixed crash on startup with empty message from server
This commit is contained in:
parent
42c934f091
commit
c3c19dda5f
|
@ -91,6 +91,9 @@ func (b *Bot) isCmd(message string) (bool, string) {
|
|||
iscmd = true
|
||||
message = message[len(cmdc):]
|
||||
} else if match, _ := regexp.MatchString(rex, lowerMessage); match {
|
||||
if len(message) < len(botnick) {
|
||||
return false, message
|
||||
}
|
||||
iscmd = true
|
||||
message = message[len(botnick):]
|
||||
|
||||
|
|
Loading…
Reference in New Issue