mIRC Home    About    Download    Register    News    Help

Print Thread
#146162 31/03/06 10:50 PM
S
symphony
symphony
S
//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 ?

#146163 01/04/06 02:12 AM
Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
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

#146164 01/04/06 02:31 AM
S
symphony
symphony
S
Yay. Thanks FOPs.
I totally forgot about $!+ smile


Link Copied to Clipboard