Code:
on *:input:*: {
  if ($1 == a) if ($2 == b) {
    echo -a yay: $1-
  }
}


It should be valid imo just as the above is valid. Although not pretty :P

I guess mIRC just checks if the first char is a { to see if it's multiline block or not when parsing events.