Code:
        var %net = network, %chan = chan
        var %nr = 1
        ; loop all connections (the network names of-)
        var %max_loops 10
        while ($scon(%nr).network) {

          ; if (%nr > %max_loops) { halt }

          ; if it's the net you specified...
          if ($v1 == %net) {
            ; make this network the active connection
            scon %nr
            ; ...and if you're on the channel specified: forward the text to that chan
            if ($me ison %chan && $nick !isop %chan) { /msg $v2 something }

            ; and return
            return
          } 
          inc %nr
        }
      }
I got the above code snippet from here a few years ago but can't find that topic now

it is used to msg something from a channel on one network to a channel on another network

what I want to know is how to message from one channel on a network to channels on 2 other networks