"Switch" your script to a particular connection (/scon and /scid commands) and execute commands on that connection, or use $scon() / $scid() identifiers and properties. Have a look at /help Multi-server smile

2 examples:
Code:
; if theres a Nth connection
if $scon(N) {
  ; switch to this connection (it's connection ID)
  scid $v1
  ; now you can do whatever you like - all identifiers etc are evaluated for this connection id
  echo -a Here on $network my nick is $me
  ; return to the current connection
  scon -r
}

Code:
if ($scon(1)) {
  echo -a Network 1 has connection ID $v1 . It's name is $scid($v1).network and my nick there is $scid($v1).me
}

Last edited by Horstl; 30/01/09 07:33 AM.