Originally Posted By: Loki12583
You can specify the command you want to run on the same line as /scid
That is very unsafe, any $identifiers or %vars will be evaluated in the relayed msg.

Use the method that Loki commented out.
Code:
on *:text:*:#:{
  if ($network == relay_from) {
    scid %relay_to
    msg #somechan $1-
  }
}
Code:
on *:text:*:#:{
  if ($network == relay_from) { scid %relay_to | msg #somechan $1- }
}
OR
Use $safe($1-)
Code:
on *:text:*:#:{
  if ($network == relay_from) {
    scid -a if ($network == relay_to) { msg #somechan $safe($1-) }
  }
}
alias safe { bset -ct &a 1 $1 | return $!regsubex(safe, $bvar(&a,1-) ,/(\d+)(?: |$)/g,$chr(\1)) }