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:
Chris Sexton 2013-05-07 18:56:33 -04:00
parent 5433f51508
commit 03a20d0446
1 changed files with 1 additions and 1 deletions

View File

@ -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):]