Im going to assume that you are only on these two servers since your the one using
scon -at1
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.