eggdrop icon indicating copy to clipboard operation
eggdrop copied to clipboard

Fix add_note()

Open michaelortmann opened this issue 1 year ago • 0 comments

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):

michaelortmann avatar Feb 02 '25 06:02 michaelortmann