From 0627f8a0155e12199797c288e8dc40e37389f5e5 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Mon, 26 Aug 2013 12:18:31 -0400 Subject: [PATCH] Fixes #41: Don't require a space for a command --- bot/handlers.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bot/handlers.go b/bot/handlers.go index 4c8d658..a6f0787 100644 --- a/bot/handlers.go +++ b/bot/handlers.go @@ -63,9 +63,7 @@ func (b *Bot) isCmd(message string) (bool, string) { // } else if match, _ := regexp.MatchString(rex, lowerMessage); match { } else if strings.HasPrefix(lowerMessage, botnick) && len(lowerMessage) > len(botnick) && - (lowerMessage[len(botnick)] == ',' || - lowerMessage[len(botnick)] == ':') && - lowerMessage[len(botnick)+1] == ' ' { + (lowerMessage[len(botnick)] == ',' || lowerMessage[len(botnick)] == ':') { iscmd = true message = message[len(botnick):]