mIRC Home    About    Download    Register    News    Help

Print Thread
#171844 01/03/07 08:56 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
i know that if you /set %var #channel
works for ON *:join:%var:{ }

but is there a way to make $alias instead %var

i have some channels written in ini like:

channels= #chan1 #chan2

and: alias chans { return $readini(path, section, subsection) }

but ON *:join:$chans:{ } doesnt work smirk
any work around for this ?


raZOR #171845 01/03/07 08:57 PM
Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
Use $($chans).

Kardafol #171847 01/03/07 09:02 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
doesnt work

raZOR #171852 01/03/07 09:55 PM
Joined: Feb 2006
Posts: 523
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 523
Kardafol's suggestion would work if $chans returned the channels separated by commas, you just need an extra replace:

Code:
on *:join:$($replace($chans,$chr(32),$chr(44))):{ 


or replace them in the actual alias. would look tidier


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
jaytea #171853 01/03/07 09:59 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
how to do it in alias ?
if all i have is: return $readini(values)

Last edited by raZOR; 01/03/07 10:00 PM.
raZOR #171856 01/03/07 10:12 PM
Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
You would need to have them seperated by a comma in the inifile. You may need to put a extra comma at the end so the $chans alias will return "#1,#2,#3,".

Kardafol #171861 01/03/07 10:23 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
ah sweet, thanks guys for help !

btw (last comma isnt necessary i tested it) smile


Link Copied to Clipboard