this looks like a bug to me.
if mIRC entered that code block (1 == 1 instead of 1 == 2 for example) and examined each command individually, then it wouldn't ignore '}'. the problem therefore lies in mIRC's ability to identify comments in blocks of code that don't go through its command interpreter.