mIRC Homepage
Posted By: ScatMan command line bugs - 05/06/03 02:26 PM
when u are typing in the command line (editbox) this:
//command | command2 | %i = 1 | command3
so command and command2 will work but all after the command2 is not working, the bug is in the %i = 1, it can't be done in the editbox, i know i can do set %i 1 exect but the bug is in the %i = 1
and another bug is that u can't put identifiers/vars as a command in the editbox
i don't have examples cuz i'm a little confused with that (it works in some cases and in some doesn't) but maybe some of u know what i'm talking about


Posted By: v0id Re: command line bugs - 05/06/03 03:07 PM
ScatMan wrote:

[snip]

Quote:
and another bug is that u can't put identifiers/vars as a command in the editbox


[snip]

It's not a bug:

(versions.txt)

03/02/2002 - mIRC v6.0

149.It is no longer possible to enter editbox commands that begin with an $identifier or %variable.
Posted By: qwerty Re: command line bugs - 05/06/03 04:51 PM
That's right, but mirc's tendency to consider %var in "%var = something" a command is a bit silly, don't you think?
Posted By: starbucks_mafia Re: command line bugs - 05/06/03 05:00 PM
Even stranger, perhaps, is that it will work if you use evaluation brackets around the %i, ie. [ %i ] = 1
I don't understand the logic behind why that would work at all.
Posted By: qwerty Re: command line bugs - 05/06/03 05:53 PM
Yeah that does the trick. It seems that mirc checks for variables/idents as first words before it deals with the rest of the command (and whether it contains brackets etc). A possible scenario could be that mirc 'tokenizes' the editbox content with " | " as the separator
For each token it does this:
1. Checks the first char of each token to see if it's a "%" or a "$". If it is, it halts
2. Otherwise proceeds with the normal parsing/evaluation of that token
3. Then it deals with the next token in the same way.

This theory is compatible with the results of the following test:
Code:
alias cmdtest1 echo -s cmdtest1 | return one
alias cmdtest2 echo -s cmdtest2 | return two
Typing
Code:
//!.echo -q $cmdtest1 | %i [ $cmdtest2 ] whatever | echo -s end
makes mirc print only "cmdtest1". Notice how $cmdtest1 is evaluated, as mirc has not seen %i starting a command yet. But when it reaches the 2nd pipe-separated token, it sees %i and halts without evaluating $cmdtest2, even though the latter is inside brackets.
Posted By: tontito Re: command line bugs - 05/06/03 07:31 PM
Hello, its interesting to see that you find so many bugs, i can see at least 4 bug reports in the first page.
Question: you don't read the mirc.hlp or what?
Try to have more atention when you read the help m8.
I script for 5 yeares and didn't find that many bugs...
Posted By: ScatMan Re: command line bugs - 05/06/03 09:37 PM
it IS a bug
Posted By: Raccoon Re: command line bugs - 06/06/03 02:55 AM
It is NOT a bug, as we already explaind.

What I find more interesting, is for someone who has more posts than I do under their belt, you sure seem very wet behind the ears.

As explaind to you earlier, mainly for security reasons to lessen various script exploits, you cannot start a command with a %variable or $identifier. If you wish to set the value of a %variable in the command line, the required method is to /set %var DATA or /var %var = DATA. The ability to %var = DATA is a luxury available only within script files.

- Raccoon
Posted By: bugx Re: command line bugs - 06/06/03 02:58 AM
I test your "bug"

//echo -a ok 1 | echo -a ok 2 | var %i = 3 | echo -a ok %i

ok 1
ok 2
ok 3

Works very fine. The diference is the word "var" and if
i can do that, you too of course
Posted By: ScatMan Re: command line bugs - 06/06/03 07:12 AM
i said that the bug is in "%var = value" why don't u listen
i know that it can be done with set but the bug is with the
%var = value
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!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