Fix build errors with new versions of go

This commit is contained in:
ich 2011-11-06 01:58:17 +00:00
parent 726363f01f
commit 0828d4cf56

5
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)]