mIRC Homepage
Posted By: DaICeMaN $nick(#blah,1) on multiple networks - 27/04/05 04:20 AM
is there some trick to getting the $nick(#channelname,1) identifier to work with multiple networks i tried using
/scid 1 /set %x $nick(#channelname,1)
with a channel that was on $cid 1 and i get
* /set: invalid parameters
in the status window
/set %x $nick(#channelname,1)
works fine if im only on one network though
any ideas?
Posted By: SladeKraven Re: $nick(#blah,1) on multiple networks - 27/04/05 04:38 AM
You could try something like..

[code]
alias vars {
var %x = $scon(0)
while (%x) {
if ($scon(%x).status == connected) {
scon %x set $($(%nicks.,0) $+ $server,0) $nick($$1,1)
}
dec %x
}
}
[code]

Syntax: /vars #channel

Edit: removed unwanted character.
Posted By: DaICeMaN Re: $nick(#blah,1) on multiple networks - 27/04/05 04:49 AM
ok cool i was able to use a bit of that
Posted By: SladeKraven Re: $nick(#blah,1) on multiple networks - 27/04/05 04:56 AM
The first connection ID ($cid)? Where did all the networks come into it then?

I've not tested it but it should set set a var on each network like..

%nicks.Network Nickname
Posted By: DaICeMaN Re: $nick(#blah,1) on multiple networks - 27/04/05 05:31 AM
ok i got this to work (kinda) i have the $cid # the channel and the number that specifys wich nick in the list set to variables
/scid %viewcid /did -a testlist 74 $nick(%viewc,%viewn)
and it works fine when set too /scid 1 for all the channels im in on that $cid but if i set it to any other $cid it just adds a blank line instead of a nick
Posted By: Kelder Re: $nick(#blah,1) on multiple networks - 27/04/05 09:27 AM
From help file: Note: If you use a command that contains $identifiers, and you want the identifiers to be evaluated in the target connection, you must pass them as $!identifier to prevent them from being evaluated first in the current connection.

//scid 1 set $(%x,0) $!nick(#channelname,1)

This re-evaluation in /scon and /scid has been a source of bugs and exploits, so maybe it's best to use the following in scripts and aliases:

scid 1
command
scid -r

(for fun stuff, try this from a editbox:
/set %x %y
/set %y %z
//scon 1 set %x blah
and find out which %var is set to blah smile )

I presume the $cid is correct, to check just type $cid<tab> (no, not enter) in the actual channel window smile
Posted By: DaICeMaN Re: $nick(#blah,1) on multiple networks - 27/04/05 11:12 PM
cool ill try it out in a bit
© mIRC Discussion Forums