Index: trunk/bridge.go
===================================================================
--- trunk/bridge.go	(revision 258)
+++ trunk/bridge.go	(revision 259)
@@ -17,5 +17,5 @@
 
 func sendTopic(dc *downstreamConn, ch *upstreamChannel) {
-	downstreamName := dc.marshalChannel(ch.conn, ch.Name)
+	downstreamName := dc.marshalEntity(ch.conn, ch.Name)
 
 	if ch.Topic != "" {
@@ -37,8 +37,8 @@
 	// TODO: send multiple members in each message
 
-	downstreamName := dc.marshalChannel(ch.conn, ch.Name)
+	downstreamName := dc.marshalEntity(ch.conn, ch.Name)
 
 	for nick, membership := range ch.Members {
-		s := membership.String() + dc.marshalNick(ch.conn, nick)
+		s := membership.String() + dc.marshalEntity(ch.conn, nick)
 
 		dc.SendMessage(&irc.Message{
Index: trunk/downstream.go
===================================================================
--- trunk/downstream.go	(revision 258)
+++ trunk/downstream.go	(revision 259)
@@ -138,12 +138,4 @@
 	}
 	return name + "/" + uc.network.GetName()
-}
-
-func (dc *downstreamConn) marshalChannel(uc *upstreamConn, name string) string {
-	return dc.marshalEntity(uc, name)
-}
-
-func (dc *downstreamConn) marshalNick(uc *upstreamConn, name string) string {
-	return dc.marshalEntity(uc, name)
 }
 
@@ -244,12 +236,12 @@
 	case "NICK":
 		// Nick change for another user
-		msg.Params[0] = dc.marshalNick(uc, msg.Params[0])
+		msg.Params[0] = dc.marshalEntity(uc, msg.Params[0])
 	case "JOIN", "PART":
-		msg.Params[0] = dc.marshalChannel(uc, msg.Params[0])
+		msg.Params[0] = dc.marshalEntity(uc, msg.Params[0])
 	case "KICK":
-		msg.Params[0] = dc.marshalChannel(uc, msg.Params[0])
-		msg.Params[1] = dc.marshalNick(uc, msg.Params[1])
+		msg.Params[0] = dc.marshalEntity(uc, msg.Params[0])
+		msg.Params[1] = dc.marshalEntity(uc, msg.Params[1])
 	case "TOPIC":
-		msg.Params[0] = dc.marshalChannel(uc, msg.Params[0])
+		msg.Params[0] = dc.marshalEntity(uc, msg.Params[0])
 	case "MODE":
 		msg.Params[0] = dc.marshalEntity(uc, msg.Params[0])
@@ -671,5 +663,5 @@
 					Prefix:  dc.prefix(),
 					Command: "JOIN",
-					Params:  []string{dc.marshalChannel(ch.conn, ch.Name)},
+					Params:  []string{dc.marshalEntity(ch.conn, ch.Name)},
 				})
 
Index: trunk/upstream.go
===================================================================
--- trunk/upstream.go	(revision 258)
+++ trunk/upstream.go	(revision 259)
@@ -765,5 +765,5 @@
 
 			uc.forEachDownstream(func(dc *downstreamConn) {
-				params := []string{dc.nick, dc.marshalChannel(uc, channel), modeStr}
+				params := []string{dc.nick, dc.marshalEntity(uc, channel), modeStr}
 				params = append(params, modeParams...)
 
@@ -827,5 +827,5 @@
 				Prefix:  dc.srv.prefix(),
 				Command: irc.RPL_LIST,
-				Params:  []string{dc.nick, dc.marshalChannel(uc, channel), clients, topic},
+				Params:  []string{dc.nick, dc.marshalEntity(uc, channel), clients, topic},
 			})
 		})
@@ -845,9 +845,9 @@
 			// NAMES on a channel we have not joined, forward to downstream
 			uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) {
-				channel := dc.marshalChannel(uc, name)
+				channel := dc.marshalEntity(uc, name)
 				members := splitSpace(members)
 				for i, member := range members {
 					membership, nick := uc.parseMembershipPrefix(member)
-					members[i] = membership.String() + dc.marshalNick(uc, nick)
+					members[i] = membership.String() + dc.marshalEntity(uc, nick)
 				}
 				memberStr := strings.Join(members, " ")
@@ -882,5 +882,5 @@
 			// NAMES on a channel we have not joined, forward to downstream
 			uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) {
-				channel := dc.marshalChannel(uc, name)
+				channel := dc.marshalEntity(uc, name)
 
 				dc.SendMessage(&irc.Message{
@@ -923,7 +923,7 @@
 			channel := channel
 			if channel != "*" {
-				channel = dc.marshalChannel(uc, channel)
-			}
-			nick := dc.marshalNick(uc, nick)
+				channel = dc.marshalEntity(uc, channel)
+			}
+			nick := dc.marshalEntity(uc, nick)
 			dc.SendMessage(&irc.Message{
 				Prefix:  dc.srv.prefix(),
@@ -957,5 +957,5 @@
 
 		uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) {
-			nick := dc.marshalNick(uc, nick)
+			nick := dc.marshalEntity(uc, nick)
 			dc.SendMessage(&irc.Message{
 				Prefix:  dc.srv.prefix(),
@@ -971,5 +971,5 @@
 
 		uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) {
-			nick := dc.marshalNick(uc, nick)
+			nick := dc.marshalEntity(uc, nick)
 			dc.SendMessage(&irc.Message{
 				Prefix:  dc.srv.prefix(),
@@ -985,5 +985,5 @@
 
 		uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) {
-			nick := dc.marshalNick(uc, nick)
+			nick := dc.marshalEntity(uc, nick)
 			dc.SendMessage(&irc.Message{
 				Prefix:  dc.srv.prefix(),
@@ -999,5 +999,5 @@
 
 		uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) {
-			nick := dc.marshalNick(uc, nick)
+			nick := dc.marshalEntity(uc, nick)
 			params := []string{dc.nick, nick}
 			params = append(params, msg.Params[2:]...)
@@ -1016,9 +1016,9 @@
 
 		uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) {
-			nick := dc.marshalNick(uc, nick)
+			nick := dc.marshalEntity(uc, nick)
 			channelList := make([]string, len(channels))
 			for i, channel := range channels {
 				prefix, channel := uc.parseMembershipPrefix(channel)
-				channel = dc.marshalChannel(uc, channel)
+				channel = dc.marshalEntity(uc, channel)
 				channelList[i] = prefix.String() + channel
 			}
@@ -1037,5 +1037,5 @@
 
 		uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) {
-			nick := dc.marshalNick(uc, nick)
+			nick := dc.marshalEntity(uc, nick)
 			dc.SendMessage(&irc.Message{
 				Prefix:  dc.srv.prefix(),
@@ -1079,5 +1079,5 @@
 				Prefix:  dc.marshalUserPrefix(uc, msg.Prefix),
 				Command: "INVITE",
-				Params:  []string{dc.marshalNick(uc, nick), dc.marshalChannel(uc, channel)},
+				Params:  []string{dc.marshalEntity(uc, nick), dc.marshalEntity(uc, channel)},
 			})
 		})
@@ -1093,5 +1093,5 @@
 				Prefix:  dc.srv.prefix(),
 				Command: irc.RPL_INVITING,
-				Params:  []string{dc.nick, dc.marshalNick(uc, nick), dc.marshalChannel(uc, channel)},
+				Params:  []string{dc.nick, dc.marshalEntity(uc, nick), dc.marshalEntity(uc, channel)},
 			})
 		})
