mIRC Homepage
Posted By: bwuser Cross-Network Message Relay? - 22/09/08 09:46 AM
Hey,

I'm trying to relay a message from another server on another channel to my active window and I can't seem to get it to work.

I tried making an alias called /v that just does /say $1- but that did not work.

Here is my remote:

On *:Text:*:#:{
if (clan isin $1-) {
v $1-
}
}
Posted By: Typos Re: Cross-Network Message Relay? - 22/09/08 11:19 AM
I think you just need to use echo -a in this case unless I misunderstand you.

Try this:
Code:
On *:Text:*:#:{
  if (clan isin $1-) {
    if ($active == $chan) && ($activecid != $cid) || ($active != $chan) { echo -a $1- }
  }
}

This basically says, if the channel has the same name as the channel I'm in but the Connection ID is not the same or if the channel I'm in has a different name than the channel the message came from, echo the line to the active window.

If you only want it to echo the message if your on the different server then you can make it.
Code:
On *:Text:*:#:{ if (clan isin $1-) && ($activecid != $cid) { echo -a $1- } }

Hope that helps.

Good luck.
Posted By: bwuser Re: Cross-Network Message Relay? - 22/09/08 12:15 PM
I can make it echo but I'm trying to make it so it sends to another channel on another server.

Here's an example. Say you have #a on serv1 and #b on serv2

Whenever in #a on serv1 someone says clan! blablabla, i'll automatically say on #b on server 2 whatever was said on #a.
Posted By: Typos Re: Cross-Network Message Relay? - 22/09/08 12:45 PM
Using my second example and the /msg command and assuming when you said server 2 that you mean any other server.
Code:
On *:Text:*:#:{ if (clan isin $1-) && ($activecid != $cid) { scid $v1 msg $active $1- } }

That uses the /scid command and $v1 which would be $activecid to send the command on the connection we want which is the active connection and not the connection the text was triggered on.

I have it msg $active but you can make it msg a channel or anything you want.

When scripting you have to use msg and not say so you can tell the script where to say it.

Let me know if this helps.
Posted By: bwuser Re: Cross-Network Message Relay? - 22/09/08 11:36 PM
It worked perfectly, thank you so much for helping.

I was just trying to understand from looking throughout the help file but, I realize there are some undocumented stuff for remotes.

Thank you again laugh
Posted By: qwerty Re: Cross-Network Message Relay? - 23/09/08 12:46 AM
Using scid/scon this way opens up a serious security hole. This post shows a simple safe alternative.
Posted By: qwerty Re: Cross-Network Message Relay? - 23/09/08 12:48 AM
There isn't anything undocumented about this code, maybe
/help /scon
is the page you were looking for?
© mIRC Discussion Forums