mIRC Home    About    Download    Register    News    Help

Print Thread
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-
}
}

Joined: Jun 2008
Posts: 48
T
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.
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.

Joined: Jun 2008
Posts: 48
T
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.
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

Joined: Jan 2003
Posts: 2,523
Q
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
Joined: Jan 2003
Posts: 2,523
Q
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

Link Copied to Clipboard