From 03a20d044694534aeb85a96f7e10ab0a84af0bea Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Tue, 7 May 2013 18:56:33 -0400 Subject: [PATCH] Fixes #11: Change addressing scheme. Check to be sure there's something other than a space after the bot's name for addressing purposes. --- bot/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/handlers.go b/bot/handlers.go index ee0d5b6..e8d9a27 100644 --- a/bot/handlers.go +++ b/bot/handlers.go @@ -87,7 +87,7 @@ func (b *Bot) isCmd(message string) (bool, string) { if strings.HasPrefix(lowerMessage, cmdc) && len(cmdc) > 0 { iscmd = true message = message[len(cmdc):] - } else if strings.HasPrefix(lowerMessage, botnick) { + } else if strings.HasPrefix(lowerMessage, botnick) && lowerMessage[len(botnick)] != ' ' { iscmd = true message = message[len(botnick):]