alias -l findNetworkCid {
var %a 1
var %connections $scon(0)
while (%a <= %connections) {
if ($scon(%a).network == $1) { scon %a | return $cid }
inc %a
}
}
on 1:text:*:#: {
var %networkList network1 network1 network2 network3 network3 network3
var %channelList #chan1 #chan2 #chan3 #chan4 #chan5 #chan6
var %a 1
var %channels $numtok(%channelList,32)
var %channel $chan
var %network $network
while (%a <= %channels) {
if (($gettok(%channelList,%a,32) == %channel) && ($gettok(%networkList,%a,32) == %network) {
var %isOnList $true
break
}
inc %a
}
if (%isOnList != $true) { halt }
var %a 1
while (%a <= %channels) {
if (($gettok(%channelList,%a,32) != %channel) || ($gettok(%networkList,%a,32) != %network) {
scid $findNetworkCid($gettok(%networkList,%a,32))
msg $gettok(%channelList,%a,32) %network $+(%chan,: <,$nick,> $1-)
}
inc %a
}
}