mIRC Home    About    Download    Register    News    Help

Topic Options
#264595 - 18/12/18 10:11 PM $findfile both $4 and $5 are non-numeric
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 1036
$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:

//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:

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

#264599 - 19/12/18 10:04 AM Re: $findfile both $4 and $5 are non-numeric [Re: maroon]
Khaled Offline

Planetary brain

Registered: 04/12/02
Posts: 4326
Loc: London, UK
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.