mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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 } }

Joined: Dec 2002
Posts: 5,465
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,465
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.


Link Copied to Clipboard