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
$findfile's combo of non-numeric $4 and $5 causes $5 to be ignored, in favor of using $4 as the /command parameter. However a non-numeric $4 becomes a /command parameter without benefit of $1- or $parms, and $5 seems completely ignored. If $5 contains $my_identifier it doesn't get triggered. Whichever is most backwards compatible, this should either be invalid syntax or $4 should be given the $1- and $parms:

Code:
//echo -a $findfile($mircdir,*.ini,0,echo 3 -a test $1 vs $parms,echo 4 -a test $1 vs $parms)



Because $4 is not seeing the $1-, having $4 being "@window $1-" is not being handled as if invalid syntax:

Code:
//window -c @test | window -e2l40 @test | echo -s test $findfile($mircdir,*.ini,0,@test $1-)
vs
//window -c @test | window -e2l40 @test | echo -s test $findfile($mircdir,*.ini,0,@test $1-,noop)


Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Thanks for your bug report. This is difficult to solve becuase the $findfile() identifier was extended multiple times to handle extra features which required that it handle a variable number of parameters. Changing the way it works now would very likely break existing scripts. It should definitely not issue an error message, as that would break backwards compatibility, and it should not be passing/evaluating parameters that it was not meant to pass.


Link Copied to Clipboard