Well I previously wasn't particularly against the more complex expressions suggestion (besides the side-effect assignment), but now I'm not so sure it's a good idea. Your post demonstrates a common misconception in what's happening in that expression that I think would only serve to confuse a lot of scripters.

if ($3 == this || that)
is not the same as:
if ($3 == this || $3 == that)

if ($3 == this || that)
is actually saying:
if ($3 == this) || (that)

Even if you made it
if ($3 == (this || that))
it would still not be checking what you think, it would be checking that this or that were $true (or any other non-$false/$null value), and then checking the result of that sub-expression is equal to $3

So if this was actually a variable that had a value of 0, and that was actually a variable that had a value of 0 then the subexpression would be $false and the larger expression would check if $3 was $false. If either of the this or that variables had a non-$false/$null value then the sub-expression would be $true and the larger expression would check if $3 equals $true.

In short, I think a lot of people would make the mistake you did. Also, realistically mIRC would probably have to support operator precedence to make complex expressions really useful without needing dozens of parentheses all over the place. I doubt it'll happen, and I'm worried it'd end up doing more harm than good if it ever did.


Spelling mistakes, grammatical errors, and stupid comments are intentional.