Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix handleTOPIC only supporting modern RPL_TOPIC #72

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

Wessie
Copy link
Contributor

@Wessie Wessie commented Feb 9, 2025

🚀 Changes proposed by this PR

handleTOPIC was using the wrong event parameters when a TOPIC message or (old) RPL_TOPIC was received, it only handles (new) RPL_TOPIC messages correctly.

TOPIC messages are defined as TOPIC <channel> [:<topic>] in both specs while RPL_TOPIC differs between RFC1459/RFC2812 and "Modern IRC" such that they are respectively defined as RPL_TOPIC <channel> :<topic> and RPL_TOPIC <client> <channel> :<topic>.

The old code only correctly parsed the "Modern IRC" RPL_TOPIC variant and not the (old) RPL_TOPIC or TOPIC events, these were instead silently never used in state tracking of the channel topic.

🧰 Type of change

  • Bug fix (non-breaking change which fixes an issue).

🤝 Requirements

  • 💬 My changes as properly commented, primarily for hard-to-understand areas.
  • 📝 I have made corresponding changes to the documentation.
  • 🧪 I have included tests (if necessary) for this change.

handleTOPIC was using the wrong event parameters when a TOPIC message
or (old) RPL_TOPIC was received, it only handles (new) RPL_TOPIC messages
correctly.

TOPIC messages are defined as `TOPIC <channel> [:<topic>]` in both specs
while RPL_TOPIC differs between RFC1459/RFC2812 and "Modern IRC" such that
they are respectively defined as `RPC_TOPIC <channel> :<topic>` and
`RPL_TOPIC <client> <channel> :<topic>`.

The old code only correctly parsed the "Modern IRC" RPL_TOPIC variant and
not the (old) RPL_TOPIC or TOPIC events, these were instead silently never
used in state tracking of the channel topic.
Copy link

codecov bot commented Feb 9, 2025

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 54.16%. Comparing base (956b584) to head (79cfe12).
Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
builtin.go 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #72      +/-   ##
==========================================
+ Coverage   53.52%   54.16%   +0.64%     
==========================================
  Files          16       16              
  Lines        2741     3641     +900     
==========================================
+ Hits         1467     1972     +505     
- Misses       1149     1544     +395     
  Partials      125      125              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lrstanley lrstanley merged commit 6320efd into lrstanley:master Feb 10, 2025
15 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants