From 14ebeac6eebe9093f5bf8a86e2acecc9c2a6105b Mon Sep 17 00:00:00 2001 From: raylu Date: Fri, 29 Oct 2010 14:06:18 -0400 Subject: [PATCH] Add support for servers that don't use : properly --- irc/connection.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/irc/connection.go b/irc/connection.go index 16f33a2..9d8c4c8 100644 --- a/irc/connection.go +++ b/irc/connection.go @@ -217,10 +217,14 @@ func (conn *Conn) recv() { if len(args) > 1 { line.Text = args[1] } - args = strings.Split(args[0], " ", -1) + args = strings.Fields(args[0]) line.Cmd = strings.ToUpper(args[0]) if len(args) > 1 { line.Args = args[1:len(args)] + // some servers (Gamesurge) don't use : properly + if line.Text == "" { + line.Text = args[1] + } } conn.in <- line }