mIRC Homepage
Hello peeps!

Another question that I seek answers too. xD
So I've been going about for this all day long been searching Google and stuff, but I can't really find anything on it.

Now my questions is: Would it be possible or is there a code to send a message from one server to another without it writing and reading from a txt (Like I'm doing now.)?

So. If I post said message in server 1 in channel 200 I would like it to re-post the message in server 2 in channel 100. I have a feeling this is not possible seen as the commands go to the server you're connected on and not mIRC itself.

Thanks in advance for taking the time to read and (maybe) reply o this! <3
Farcrada
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- }
  }
}
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)) }

Holy shit! Thanks people! <3 Definitely helped me out!
© mIRC Discussion Forums