%cc will retunr channel name (#help)
%net will return network name (DAlnet)

the part that does not work it this..
$iif($me ison %ch && %active_net == %net,$nick($chan(%p),0),0)

$nick($chan(%p),0) will not update the channel #help on the active server. it takes the amount of people from the other network.

Code:
alias test {
var %cc = $did(3), %_h = hadd record, %ch,%net
  %cc = $remove($replace(%cc,$chr(32),$chr(95)),[,])
  %ch = $gettok(%cc,1,95)
  %net = $gettok(%cc,2,95)
  %_h list $addtok($hget(record,list),%cc,32)
  var %s = 1
  while ($scon(%s)) {  
    scon %s
    var %p = 1
    while ($chan(%p)) {
      var %active_net = $scid($activecid).network
      %_h $+(%cc,.count) $iif($me ison %ch && %active_net == %net,$nick($chan(%p),0),0)
      inc %p 
    }  
    inc %s
  }
}

Last edited by da_hype; 11/07/04 09:52 PM.