mIRC Home    About    Download    Register    News    Help

Print Thread
Cross-Network Message Relay? #204504 22/09/08 09:46 AM
Joined: Jul 2006
Posts: 248
B
bwuser Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Jul 2006
Posts: 248
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-
}
}

Re: Cross-Network Message Relay? [Re: bwuser] #204508 22/09/08 11:19 AM
Joined: Jun 2008
Posts: 48
T
Typos Offline
Ameglian cow
Offline
Ameglian cow
T
Joined: Jun 2008
Posts: 48
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.


I've gone to look for myself. If I should return before I get back, please keep me here.
Re: Cross-Network Message Relay? [Re: bwuser] #204510 22/09/08 12:15 PM
Joined: Jul 2006
Posts: 248
B
bwuser Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Jul 2006
Posts: 248
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.

Re: Cross-Network Message Relay? [Re: bwuser] #204511 22/09/08 12:45 PM
Joined: Jun 2008
Posts: 48
T
Typos Offline
Ameglian cow
Offline
Ameglian cow
T
Joined: Jun 2008
Posts: 48
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.


I've gone to look for myself. If I should return before I get back, please keep me here.
Re: Cross-Network Message Relay? [Re: Typos] #204525 22/09/08 11:36 PM
Joined: Jul 2006
Posts: 248
B
bwuser Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Jul 2006
Posts: 248
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

Re: Cross-Network Message Relay? [Re: Typos] #204528 23/09/08 12:46 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Using scid/scon this way opens up a serious security hole. This post shows a simple safe alternative.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: Cross-Network Message Relay? [Re: bwuser] #204529 23/09/08 12:48 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
There isn't anything undocumented about this code, maybe
/help /scon
is the page you were looking for?


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com