Fix victim lookup after op mode binds - #1923
Merged
Merged
Conversation
Member
|
Thank you alot for this PR. The bug is a regression introduced in eggdrop 1.10.0 via #1585. Can you please take a look at |
Contributor
Author
|
Updated the PR to fix The updated change passes the debug build and the full integration suite: 159 passed, 0 failed. |
Member
|
LGTM |
thommey
approved these changes
Jul 30, 2026
thommey
left a comment
Member
There was a problem hiding this comment.
nice find and fix, thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by: tkimball83
Patch by: tkimball83
Fixes:
One-line summary:
Initialize the mode target's nick/userhost before refreshing its user flags after op and halfop Tcl mode binds.
Additional description (if needed):
got_op()andgot_halfop()pass the localsbuffer tomodebind_refresh()without initializing it.modebind_refresh()then uses that buffer as the host argument tolookup_user_record()while refreshing the target's flag record.As a result, the refreshed victim flags can belong to no user or the wrong user. With
+bitch, a recognized bot that has global op can then be treated as unauthorized and deopped immediately after receiving op.Populate
sfrom the channel member before invoking the Tcl mode bind, matching the existing pattern ingot_deop()and the voice-mode handling.Test cases demonstrating functionality (if applicable):
eggdrop:1.10.1Linux image in a ten-bot network using+bitch.developcompiles successfully on macOS arm64 with./configure --disable-tls && make config && make -j4.