I would need a self-contained bug report script that reproduces a specific, described problem. It should be possible to copy the bug report script into mIRC and to run it to see if it reproduces the problem you are describing.

In your snippet that is not possible because the code makes references to external aliases, identifiers, variables, etc. which I do not have.

The author of the script would need to use debugging code in his/her script, eg. using /echo to display values, in order to pinpoint the bug, and then submit a bug report that states what the bug is and how to reproduce it.