From 09286f3defa2f9368b645a4905a19cb0f521dafd Mon Sep 17 00:00:00 2001 From: Robert Gerus Date: Tue, 22 Dec 2015 22:03:35 +0100 Subject: [PATCH] Make splitting with commas more sensible. --- bot/pick.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot/pick.go b/bot/pick.go index a670730..de7fdd5 100644 --- a/bot/pick.go +++ b/bot/pick.go @@ -20,7 +20,9 @@ func pick(output func(irc.Message), msg irc.Message) { a := strings.TrimPrefix(msg.Trailing, ":pick ") - if strings.Contains(a, ",") { + if strings.Contains(a, ", ") { + args = strings.Split(a, ", ") + } else if strings.Contains(a, ",") { args = strings.Split(a, ",") } else { args = strings.Fields(a)