From 1849d886d4c5ae275f6fa31495889c5de74f7029 Mon Sep 17 00:00:00 2001 From: Alex Bramley Date: Fri, 29 Jul 2011 23:14:21 +0100 Subject: [PATCH] Revert "Merge branch 'master' into release" This reverts commit 2528d13314b2e51cfe36e280426bea3efb3c0cf7, reversing changes made to f0a9246c7a0205919b02350b2df31023f2f8b4cb. --- client/handlers.go | 4 ++-- client/line.go | 2 +- event/registry_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/handlers.go b/client/handlers.go index 89d6312..f0a582e 100644 --- a/client/handlers.go +++ b/client/handlers.go @@ -220,7 +220,7 @@ func (conn *Conn) h_352(line *Line) { // XXX: do we care about the actual server the nick is on? // or the hop count to this server? // last arg contains " " - a := strings.SplitN(line.Args[len(line.Args)-1], " ", 2) + a := strings.Split(line.Args[len(line.Args)-1], " ", 2) n.Name = a[1] if idx := strings.Index(line.Args[6], "*"); idx != -1 { n.Modes.Oper = true @@ -236,7 +236,7 @@ func (conn *Conn) h_352(line *Line) { // Handle 353 names reply func (conn *Conn) h_353(line *Line) { if ch := conn.GetChannel(line.Args[2]); ch != nil { - nicks := strings.Split(line.Args[len(line.Args)-1], " ") + nicks := strings.Split(line.Args[len(line.Args)-1], " ", -1) for _, nick := range nicks { // UnrealIRCd's coders are lazy and leave a trailing space if nick == "" { diff --git a/client/line.go b/client/line.go index cf77b3d..e2509ed 100644 --- a/client/line.go +++ b/client/line.go @@ -49,7 +49,7 @@ func parseLine(s string) *Line { // now we're here, we've parsed a :nick!user@host or :server off // s should contain "cmd args[] :text" - args := strings.SplitN(s, " :", 2) + args := strings.Split(s, " :", 2) if len(args) > 1 { args = append(strings.Fields(args[0]), args[1]) } else { diff --git a/event/registry_test.go b/event/registry_test.go index 921c145..abc1744 100644 --- a/event/registry_test.go +++ b/event/registry_test.go @@ -66,7 +66,7 @@ func TestParallelDispatch(t *testing.T) { func TestSerialDispatch(t *testing.T) { r := NewRegistry() - r.(*registry).Serial() + r.Serial() // ensure we have enough of a buffer that all sends complete out := make(chan int, 5) // handler factory :-)