From f881a42b4b3f1bdc61bc61426f9bfc0ee7771aae Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 6 Dec 2021 18:08:53 +0100 Subject: [PATCH] Stop incrementing hopcount in RPL_WHOREPLY It's extra code for something clients should ignore because it's unreliable and useless. --- upstream.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/upstream.go b/upstream.go index 9a683e8..862650d 100644 --- a/upstream.go +++ b/upstream.go @@ -1338,19 +1338,6 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err return nil } - parts := strings.SplitN(trailing, " ", 2) - if len(parts) != 2 { - return fmt.Errorf("received malformed RPL_WHOREPLY: wrong trailing parameter: %s", trailing) - } - realname := parts[1] - hops, err := strconv.Atoi(parts[0]) - if err != nil { - return fmt.Errorf("received malformed RPL_WHOREPLY: wrong hop count: %s", parts[0]) - } - hops++ - - trailing = strconv.Itoa(hops) + " " + realname - if channel != "*" { channel = dc.marshalEntity(uc.network, channel) }