mIRC Home    About    Download    Register    News    Help

Print Thread
#4618 03/01/03 12:29 AM
Joined: Dec 2002
Posts: 40
L
Lucifer Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 40
I'm making a custom switchbar and I'm have some trouble with getting all the channels and queries where they are suppose to be the code works if I'm only connected to 1 server but when I connect to more than 1 things get [censored] up
Code:
load.switchbar {
  load.icons  
  did -r sb 1  
  var %i = 1
  var %a = 1
  while (%i <= $scid(0)) {
    %a = 1
    did -a sb 1 +aG $+ $iif($scid(0) >= 2,v) 1 $scid(%i).server $tab $scid(%i).server 
    if ($chan(0) == 0) { goto query }
    while (%a <= $chan(0)) { if ($chan(%a).cid == $scon(%i).cid) { did -a sb 1 +aGv $chan(%a) $tab $chan(%a) } | inc %a } 
    if ($query(0) == 0) { goto serv }
    var %b = 1
    while (%b <= $query(0)) { if ($query(%b).cid == $scon(%b).cid) { did -a sb 1 +aGv $query(%b) $tab $query(%b} } | inc %b }
    :serv    
    inc %i
  }
}

and if you can make it faster thats good too wink . I'm using MDX if your wondering what the +aGv $tab and such is.

Last edited by Lucifer; 03/01/03 12:50 AM.
#4619 03/01/03 01:00 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Code:

load.switchbar {
  var %activeCID = $activecid
  load.icons  
  did -r sb 1  
  var %j, %i = 1
  while ($scon(%i)) {
    scon %i
    did -a sb 1 $iif($scid(0) > 1,+aGv,+aG) 1 $server $tab $server 
    %j = 1 | while  ($chan(%j)) { did -a sb 1 +aGv $ifmatch $tab $ifmatch | inc %j } 
    %j = 1 | while ($query(%j)) { did -a sb 1 +aGv $ifmatch $tab $ifmatch | inc %j }
    inc %i
  }
  scid %activeCID
}


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#4620 03/01/03 01:11 AM
Joined: Dec 2002
Posts: 40
L
Lucifer Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 40
It didn't work exactly like I wanted but I'm gonna change it some thanx


Link Copied to Clipboard