Try
/help /scid . The commands on that page of the help file are the ones you need in order to send messages from one server connection to another. I've never actually made a script to communicate between server connections, but I imagine it would be something like this:
on *:TEXT:!text *:#channel:{
if ($cid == 1) scid 2 msg someuser Message from cid 1
}
In that example you would have to connect to Efnet first ($cid == 1), and Freenode second ($cid == 2).
-genius_at_work