From 00919e941253bdace131c6cdb3224a06627d44b4 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 5 Aug 2022 18:43:46 +0200 Subject: [PATCH] downstream: drop downstreamConn.unmarshalText It's unused. --- downstream.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/downstream.go b/downstream.go index 6266bdf..f5e4c3f 100644 --- a/downstream.go +++ b/downstream.go @@ -492,14 +492,6 @@ func (dc *downstreamConn) unmarshalEntity(name string) (*upstreamConn, string, e return net.conn, name, nil } -func (dc *downstreamConn) unmarshalText(uc *upstreamConn, text string) string { - if dc.upstream() != nil { - return text - } - // TODO: smarter parsing that ignores URLs - return strings.ReplaceAll(text, "/"+uc.network.GetName(), "") -} - func (dc *downstreamConn) ReadMessage() (*irc.Message, error) { msg, err := dc.conn.ReadMessage() if err != nil { @@ -2520,14 +2512,9 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc. dc.handleNickServPRIVMSG(ctx, uc, text) } - unmarshaledText := text - if uc.isChannel(upstreamName) { - unmarshaledText = dc.unmarshalText(uc, text) - } - upstreamParams := []string{upstreamName} if msg.Command != "TAGMSG" { - upstreamParams = append(upstreamParams, unmarshaledText) + upstreamParams = append(upstreamParams, text) } uc.SendMessageLabeled(ctx, dc.id, &irc.Message{