mIRC Homepage
Posted By: da_hype multi server.. - 10/07/04 10:19 AM
Code:
  var %s = 1
  while ($scon(%s)) {  
    scon %s
    var %p = 1
    while ($chan(%p)) {   
      .echo -s $nick(%p,0),0) 
      inc %p 
    }  
    inc %s
  }



how do i make this code udpate ammount of nick ins 2 channels on 2 diff servers.

#help [webnet]
#help [dalnet]

and if i'm only in

#help [webnet]

it will only update that one..
Posted By: Seifer Re: multi server.. - 10/07/04 10:55 AM
If you read my last post, ignore what I said... I re-read what you were asking after posting it and came to the conclusion that I need some sleep... lol
Posted By: da_hype Re: multi server.. - 10/07/04 10:48 PM
anyone know how? frown
Posted By: tsoglanos Re: multi server.. - 11/07/04 11:38 AM
If i understendt you right you tring to get how many ops in channel #help and all networks you are connect to

Code:
  
alias help { return $nick(#help,0,o) } 


alias help2 { var %i = 1 | while ($scon(%i)) { if ($scon(%i).help != $null) { echo -ac notice * #help $scon(%i).network Ops: $scon(%i).help }  | inc %i } }

;Usage: /help2


the update can be done automatic on event

Code:
 
on *!:JOIN:#help:{ help2 }
on *!:Part:#help:{ help2 }
on *:Kick:#help:if ($knick != $me) { help2 }
etc.
 
Posted By: tsoglanos Re: multi server.. - 11/07/04 08:42 PM
-GENERAL REPLY-
dont alias the word "help" use another one,. this was just an explain else if you type /help somthing , it will not work smile
Posted By: da_hype Re: multi server.. - 11/07/04 09:51 PM
%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
  }
}
© mIRC Discussion Forums