From 0828d4cf567dd26ad5a10c9d3000c103d7d20655 Mon Sep 17 00:00:00 2001 From: ich Date: Sun, 6 Nov 2011 01:58:17 +0000 Subject: [PATCH] Fix build errors with new versions of go --- irc.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/irc.go b/irc.go index e8c63f8..d787e08 100644 --- a/irc.go +++ b/irc.go @@ -19,7 +19,6 @@ const ( var error bool - func reader(irc *IRCConnection) { br := bufio.NewReader(irc.socket) for !error { @@ -44,11 +43,11 @@ func reader(irc *IRCConnection) { event.Host = event.Source[j+1 : len(event.Source)] } } - args := strings.Split(msg, " :", 2) + args := strings.SplitN(msg, " :", 2) if len(args) > 1 { event.Message = args[1] } - args = strings.Split(args[0], " ", -1) + args = strings.Split(args[0], " ") event.Code = strings.ToUpper(args[0]) if len(args) > 1 { event.Arguments = args[1:len(args)]