eggdrop icon indicating copy to clipboard operation
eggdrop copied to clipboard

Fix user_entry_find()

Open michaelortmann opened this issue 1 year ago • 2 comments

Found by: michaelortmann Patch by: michaelortmann Fixes: Could help with fixing #133

One-line summary: Fix user_entry_find()

Additional description (if needed):

Test cases demonstrating functionality (if applicable): Here is a bug fixed by this PR. Before: .chinfo cannot find and remove an INFO. After: it can as expected. Before:

.whois test123
HANDLE                           PASS NOTES FLAGS           LAST
test123                          no       0 -               never (nowhere)

.chinfo test123 foo
.rehash
.whois test123
HANDLE                           PASS NOTES FLAGS           LAST
test123                          no       0 -               never (nowhere)
  INFO: foo

.chinfo test123
Wiped default info for test123

.whois test123
HANDLE                           PASS NOTES FLAGS           LAST
test123                          no       0 -               never (nowhere)
  INFO: foo

After:

.whois test123
HANDLE                           PASS NOTES FLAGS           LAST
test123                          no       0 -               never (nowhere)

.chinfo test123 foo
.rehash
.whois test123
HANDLE                           PASS NOTES FLAGS           LAST
test123                          no       0 -               never (nowhere)
  INFO: foo

.chinfo test123
Wiped default info for test123

.whois test123
HANDLE                           PASS NOTES FLAGS           LAST
test123                          no       0 -               never (nowhere)

michaelortmann avatar Mar 15 '25 23:03 michaelortmann

Can you explain why your patch fixes this? It's not obvious to me, you only remove an e->name check and move a variable from channels.mod to core

thommey avatar Nov 30 '25 14:11 thommey

look closely for (*e)->name vs. (*e)->type->name therefore the changed if statement checks and compares very different fields

michaelortmann avatar Nov 30 '25 15:11 michaelortmann