Use the /scid command to switch the server connection the script is running on.

With scid you can either specify a connection id or use the -a switch to run the command on all connections. You can specify the command you want to run on the same line as /scid, or simply use it to switch servers and then program as usual afterward.

So you can either:

Code:
on *:connect:{
  if ($network == relay_to) { set %relay_to $cid }
}

on *:text:*:#:{
  if ($network == relay_from) {
    scid %relay_to msg #somechan $1-
    ;scid %relay_to
    ;msg #somechan $1-
  }
}

OR

on *:text:*:#:{
  if ($network == relay_from) {
    scid -a if ($network == relay_to) { msg #somechan $1- }
  }
}

Last edited by Loki12583; 23/11/13 07:08 PM.