/!$command inside if-else/while statements - 21/12/06 09:50 AM
I don't know if this was reported before, since it's difficult to search for this subject by entering anything other than short keywords.
In the past, people used "!" as a shortcut for /halt in events (especially RAW events). This was deprecated and doesn't seem to work anymore.
Other than that, "!" is used as a /command prefix to tell mIRC not to process the command as an alias, and also as a NOT modifier for most if-else/while operators.
That said, I guess mIRC isn't consistent with "!" inside an if-else/while statement in a single line. Try the test aliases below:
Only /test3 and /test4 will work, and /test1 will also try to send "$some_alias_here(WON'T)" to the IRC server, forgetting to evaluate the identifier.
The behaviour above will be reproduced if you use /else or /while instead of /if.
It'll also work if you replace "! $+ $some_alias_here" by "$+(!,$some_alias_here)", but that's not really the point, since I'm talking about an inconsistence. That's not something urgent to fix, though.
In the past, people used "!" as a shortcut for /halt in events (especially RAW events). This was deprecated and doesn't seem to work anymore.
Other than that, "!" is used as a /command prefix to tell mIRC not to process the command as an alias, and also as a NOT modifier for most if-else/while operators.
That said, I guess mIRC isn't consistent with "!" inside an if-else/while statement in a single line. Try the test aliases below:
Code:
alias some_alias_here { return echo -ag * This $1 be echoed } alias test1 { if (1) !$some_alias_here(WON'T) } alias test2 { if (1) ! $+ $some_alias_here(WON'T) } alias test3 { !$some_alias_here(WILL) } alias test4 { if (1) { !$some_alias_here(WILL) } }
Only /test3 and /test4 will work, and /test1 will also try to send "$some_alias_here(WON'T)" to the IRC server, forgetting to evaluate the identifier.
The behaviour above will be reproduced if you use /else or /while instead of /if.
It'll also work if you replace "! $+ $some_alias_here" by "$+(!,$some_alias_here)", but that's not really the point, since I'm talking about an inconsistence. That's not something urgent to fix, though.