Make splitting with commas more sensible.

master
Robert Gerus 2015-12-22 22:03:35 +01:00
parent e486b26324
commit 09286f3def
1 changed files with 3 additions and 1 deletions

View File

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