eggheads / eggdrop

The Eggdrop IRC Bot
GNU General Public License v2.0
508 stars 84 forks source link

Fix things not working when there is a bind log #1695

Open DasBrain opened 1 month ago

DasBrain commented 1 month ago

When there is a bind log, a few things stop working, as they do not expect logging functions to change the Tcl interpreter result.

This fixes those issues by storing the result before triggering the log binds and restoring it after the call.

Things found to be broken:

And maybe a few more.

Found by: DasBrain Patch by: DasBrain Fixes: bind log, hopefully.

One-line summary: Fix wrong Tcl results when there is a bind log.

Additional description (if needed):

Test cases demonstrating functionality (if applicable): .tcl string cat foo .tcl bind log * +|+ {string cat} .tcl string cat foo