mIRC Homepage
Posted By: maroon if (1 == 1) !returnex string - 03/05/23 10:27 PM
If returnex uses the ! command prefix, the '!' is also part of the return string if this is the 1st command of the $true or $false condition. Same things happens for the other command prefixes, such as using .returnex or /returnex or //returnex, and for for the useless syntax of doing the same thing inside the while() loop.

This behavior also happens as far back as 6.35, so does not appear to be related to the recent tweaks to the parser, and doesn't happen when using !return nor when !returnex is not used with an if(). I only stumbled across it due to adding the !command prefix to defend against a flood caused by a braces-mismatch that caused a script line's 'return' to become a custom alias for the return command.

* *

//echo 4 -a $returnex1 : $returnex2 : $returnex3 : $returnex4

result: !abc : ! : def : !ghi

Code
alias returnex1 { if (1 == 1) !returnex abc }
alias returnex2 { if (1 == 1) !returnex }
alias returnex3 { if (2 == 1) noop | !returnex def }
alias returnex4 { while (1 == 1) { !returnex ghi } }
Posted By: Khaled Re: if (1 == 1) !returnex string - 11/05/23 11:58 AM
Hmm. /returnex was originally added as an undocumented internal command for a specific use-case, where it does strip prefixes. However, as this command is now in general use, I will extend the prefix-stripping for /returnex to other parts of the parser. This change will be in the next beta.
© mIRC Discussion Forums