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
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
. I'm using MDX if your wondering what the +aGv $tab and such is.