mIRC Home    About    Download    Register    News    Help

Print Thread
scon and $scid() #146162 31/03/06 10:50 PM
Joined: Jan 2006
Posts: 468
symphony Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
//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 ?

Re: scon and $scid() #146163 01/04/06 02:12 AM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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


Gone.
Re: scon and $scid() #146164 01/04/06 02:31 AM
Joined: Jan 2006
Posts: 468
symphony Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
Yay. Thanks FOPs.
I totally forgot about $!+ smile