lrstanley / girc

:bomb: girc is a flexible IRC library for Go :ok_hand:
https://pkg.go.dev/github.com/lrstanley/girc
MIT License
139 stars 13 forks source link

fix: only reply to CTCP message if it's not a reply message itself #70

Closed heavyjoost closed 3 weeks ago

heavyjoost commented 3 weeks ago

๐Ÿš€ Changes proposed by this PR

This fixes some issues I had where it would reply to a CTCP message even though that message was already a reply itself. Normally this probably is not an issue but when using a multiclient bouncer (ZNC in my case), this causes an infinite loop.

๐Ÿงฐ Type of change

๐Ÿ“ Notes to reviewer

Basically adds a if ctcp.Reply check just like the CTCP PING/PONG messages already had.

๐Ÿค Requirements

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 53.88%. Comparing base (3842a06) to head (f8f3579). Report is 5 commits behind head on master.

Files Patch % Lines
ctcp.go 0.00% 8 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #70 +/- ## ========================================== + Coverage 53.75% 53.88% +0.13% ========================================== Files 16 16 Lines 2733 2741 +8 ========================================== + Hits 1469 1477 +8 - Misses 1139 1143 +4 + Partials 125 121 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lrstanley commented 3 weeks ago

Need to fix my CI flow, but tests LGTM locally.

Thanks!