You have the syntax to do your script, now you just gotta do the actual script that we don't know of. For instance, if you want to join different channels based on network, just edit KindOne's script to do that.
alias foobar {
if ($network == freenode) { join #FreenodeChan }
elseif ($network == Rizon) { join #RizonChan }
elseif ($network == EsperNet) { join #EsperNetChan }
else { join #OtherChan }
}
If you already have tons of scripts that you only want to be used on one network, I guess just add a network check before all scripts.
if ($network != youroneanonlynetwork) halt