mIRC Homepage

scon and $scid()

Posted By: symphony

scon and $scid() - 31/03/06 10:50 PM

//scon -a //echo -a timer® [ $+ [ $scid($cid).$!server ] ]
returns
timer®$$server
timer®$$server


//scon -a //echo -a timer® $scid($cid).$!server

returns
timer® Oslo2.NO.EU.undernet.org
timer® irc.efnet.pl

The 1st command line works if called within an alias only!.

Possible bug ?
Posted By: FiberOPtics

Re: scon and $scid() - 01/04/06 02:12 AM

Try:

//scon -a echo -a timer® $!+ $!server

The key factor here is that you need to escape the $+ from evaluating, or it will concatenate the timer® part with the first evaluation of $!server, which evaluates to $server, thus resulting into timer®$server.

Note that, although some experienced scripters pass code to scon -a and the likes, generally it's better to just pass an alias name, and then let the alias take care of it. You will be scratching your head less, and you won't have to worry about exploits.

alias test scon -a _test
alias _test echo -a timer® $+ $server
Posted By: symphony

Re: scon and $scid() - 01/04/06 02:31 AM

Yay. Thanks FOPs.
I totally forgot about $!+ smile
© 2021 mIRC Discussion Forums