flakes / mirc_fish_10

"FiSH 10" - a blowfish encryption script for mIRC 7, compatible to previous FiSH scripts and other clients! Come visit us in #fish10 on EFNet!
https://syndicode.org/fish_10/
86 stars 16 forks source link

Outgoing cryptmark is broken - fix provided #23

Closed ex0a closed 13 years ago

ex0a commented 13 years ago

The "if ($dll(%FiSH_dll,INI_GetBool,process_outgoing) == 0) return" call in the outgoing cryptmark code will return "0" if there is no process_outgoing setting defined in the blow.ini file. In order to provide a quick workaround, I've replaced the DLL call with a $readini call until the DLL call is updated to reflect this incompatibility, or the code for how the setting is defined is updated. The only problem with changing the process_outgoing setting to not use 0 as the off switch is that it will break all backwards compatibility. The following proposed code will fix the issue until another workaround is available.

START

;; !! The following call will return 0 if the process_outgoing setting is undefined in the ini ;; !! A temporary workaround of using $readini is the easiest solution until the code for the $dll call is updated ;if ($dll(%FiSH_dll,INI_GetBool,process_outgoing) == 0) return if ($readini(%blow_ini,FiSH,process_outgoing) == 0) return

END

Replace the "if ($dll(%FiSH_dll,INI_GetBool,process_outgoing) == 0) return" line with the above code to enable outgoing cryptmarks again.

ex0a commented 13 years ago

The code provided is 4 seperate lines, but was mangled upon submitting.. will try again..

;; !! The following call will return 0 if the process_outgoing setting is undefined in the ini
;; !! A temporary workaround of using $readini is the easiest solution until the code for the $dll call is updated
;if ($dll(%FiSH_dll,INI_GetBool,process_outgoing) == 0) return
if ($readini(%blow_ini,FiSH,process_outgoing) == 0) return
flakes commented 13 years ago

Fixed by 750c4bd09c52fa6a015f162d1cf4364ea5f56c21, thanks!