mIRC Home    About    Download    Register    News    Help

Print Thread
multi server.. #89912 10/07/04 10:19 AM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
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..

Re: multi server.. #89913 10/07/04 10:55 AM
Joined: Nov 2003
Posts: 228
S
Seifer Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
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

Re: multi server.. #89914 10/07/04 10:48 PM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
anyone know how? frown

Re: multi server.. #89915 11/07/04 11:38 AM
Joined: Mar 2004
Posts: 130
T
tsoglanos Offline
Vogon poet
Offline
Vogon poet
T
Joined: Mar 2004
Posts: 130
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.
 

Last edited by tsoglanos; 11/07/04 11:56 AM.
Re: multi server.. #89916 11/07/04 08:42 PM
Joined: Mar 2004
Posts: 130
T
tsoglanos Offline
Vogon poet
Offline
Vogon poet
T
Joined: Mar 2004
Posts: 130
-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

Re: multi server.. #89917 11/07/04 09:51 PM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
%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.