I can't help you to the best of my abilities, if you are not more specific about a number of issues.
* What are the 2 different networks we are dealing with here?
* Do you always connect to those 2 exact servers, or do you use whatever server to get on those specific networks?
* This bot, that you want to relay text from #chan2 back to #chan1, what is its nickname?
* This reply: in what form is it? How can I distinguish it from other text from this bot?
* Is the reply messaged to the channel (#chan2) or noticed to you, or with ctcp, or in a private message?
...
Btw have you read up on the multiserver commands/identifiers? Check out
this document and you should even be able to script this yourself
Greets