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 add_note() #1763

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Feb 2, 2025

Found by: michaelortmann
Patch by: michaelortmann
Fixes:

One-line summary:

Additional description (if needed):

*** Pirate has changed the topic on channel #scummbar to Have No ReSt
<Pirate> handle cutlass:
<Pirate> note booty map
<Captain> rehash
<Pirate> strip corpse

Eggdrop handles/nicks can contain : characters as long as it is not the first character. add_note() tries to split its function parameter from, which can be such a dcc[idx].nick, into sock:nick at a : character. It cannot distinguish whether from is a nick containing : or whether from is of the form sock:nick. This is irreparable code. It is also probably dead code, I could not find a caller passing sock:nick as a from parameter. It splits the from parameter in place and destroys the original nick. This PR fixes the situation by removing this irreparably dead and treacherous code.

Test cases demonstrating functionality (if applicable):

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.

1 participant