mirror of https://github.com/velour/catbase.git
Fixes #11: Change addressing scheme.
Check to be sure there's something other than a space after the bot's name for addressing purposes.
This commit is contained in:
parent
5433f51508
commit
03a20d0446
|
@ -87,7 +87,7 @@ func (b *Bot) isCmd(message string) (bool, string) {
|
||||||
if strings.HasPrefix(lowerMessage, cmdc) && len(cmdc) > 0 {
|
if strings.HasPrefix(lowerMessage, cmdc) && len(cmdc) > 0 {
|
||||||
iscmd = true
|
iscmd = true
|
||||||
message = message[len(cmdc):]
|
message = message[len(cmdc):]
|
||||||
} else if strings.HasPrefix(lowerMessage, botnick) {
|
} else if strings.HasPrefix(lowerMessage, botnick) && lowerMessage[len(botnick)] != ' ' {
|
||||||
iscmd = true
|
iscmd = true
|
||||||
message = message[len(botnick):]
|
message = message[len(botnick):]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue