mIRC Home    About    Download    Register    News    Help

Print Thread
Help With echoing from one server to another #110279
06/02/05 12:49 AM
06/02/05 12:49 AM
Joined: Jul 2004
Posts: 59
L
LittleJohn Offline OP
Babel fish
LittleJohn  Offline OP
Babel fish
L

Joined: Jul 2004
Posts: 59
Hi,

What I am trying to do is echo text typed on Server 1 channel 1 to server 2 channel 2 and vise versa without repeating the typed text in the channel in which it was typed.

This is what I have in my bot right now but it echos the text in the same channel it was typed as well which just wont work .

on *:Text:*:#: {
scon -at1 /amsg $nick $1-
}

Thanks for any help

Re: Help With echoing from one server to another #110280
06/02/05 01:42 AM
06/02/05 01:42 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
DaveC  Offline
Hoopy frood
D

Joined: Sep 2003
Posts: 4,230
Im going to assume that you are only on these two servers since your the one using scon -at1

Code:
on *:Text:*:#channel1: {  var %nick = $nick | var %text = $1- | scon -at1 if ( $!cid != $cid ) msg #channel2 % $+ nick % $+ text }
on *:Text:*:#channel2: {  var %nick = $nick | var %text = $1- | scon -at1 if ( $!cid != $cid ) msg #channel1 % $+ nick % $+ text }


i simply check if the $cid of the currently executing code is not equal to the $cid of the event triggering code, and only then msg the channel with the message.

I didnt understand why u were using /amsg tho.?

[edit]
I removed using /msg #channel? $nick $1- since they get pre evaluated and thus could be used to exploit you, this way there stored and used as what they are two texts.

Last edited by DaveC; 06/02/05 01:46 AM.