Okay... So, I got my switchbar...
But here's my problem: @Windows.. They don't show, and when they do, the switchbar tries to open a connection that doesn't exist... Here's the code:
Code:
alias switch { dialog -mh switchbar switchbar }
alias refresh { .timer -m 1 20 switchbar }
dialog switchbar {
  title "switchbar"
  size -1 -1 76 324
  option dbu
  list 1, 1 1 74 321, sort size
}



on *:START: { switch }


alias switchreload {
  dialog -x switchbar
  switch
}
on *:dialog:switchbar:*:*:{
  if ($devent == init) {
    $mdxin
    dll $mdx SetDialog $dname style
    dll $mdx SetControlMDX $dname 1 TreeView haslines hasbuttons showsel rowselect insertdroptarget > $views
    did -i $dname 1 1 SetColor bkg  $color(1)
    did -i $dname 1 1 SetColor line $color(14)
    did -i $dname 1 1 SetColor text $color(15)
    dll $hos Dock $dname Left -1
    $switchbar
  }
  if ($devent == sclick) {
    if ($did == 1) {
      tokenize 32 $did(1,1,1)
      if ($3 == unknown) halt
      if ($4 >= 2) && (!$5-) {
        scon $calc($4 - 1)
        window -a "Status Window"
      }
      if ($4 >= 2) && ($5 == 2) && (!$6) {
        scon $calc($4 - 1)
        if ($server) list
      }
      if ($4 >= 2) && ($5 == 2) && ($6) {
        scon $calc($4 - 1)
        var %chan = $chan($calc($6 - 1))
        window -a %chan
      }
      if ($4 >= 2) && ($5 == 3) && ($6) {
        scon $calc($4 - 1)
        var %query = $query($calc($6 - 1))
        window -a %query
      }
      if ($4 >= 2) && ($5 == 4) && ($6) {
;        scon $calc($4 - 1)
        var %window = $window($calc($6 - 1))
        window -a %window
      }
      if ($4 >= 2) && ($5 == 5) && ($6 == 2) && ($7) {
        scon $calc($4 - 1)
        var %send = $send($calc($7 - 1))
        window -a %send
      }
      if ($4 >= 2) && ($5 == 5) && ($6 == 3) && ($7) {
        scon $calc($4 - 1)
        var %get = $get($calc($7 - 1))
        window -a %get
      }
      if ($4 >= 2) && ($5 == 5) && ($6 == 4) && ($7) {
        scon $calc($4 - 1)
        var %chat = $chat($calc($7 - 1))
        window -a %chat
      }
    }
  }
}
alias switchbar { 
  did -r switchbar 1
  did -i switchbar 1 1 iconsize normal small
  did -i switchbar 1 1 seticon normal icons/connect.ico
  did -i switchbar 1 1 seticon normal icons/chan.ico
  did -i switchbar 1 1 seticon normal icons/userlist2.ico
  did -i switchbar 1 1 seticon normal icons/chan2.ico
  did -i switchbar 1 1 seticon normal icons/dcc.ico
  did -i switchbar 1 1 seticon normal icons/disconnect.ico
  did -i switchbar 1 1 seticon normal icons/about.ico
  var %a = 1
  while (%a <= $scid(0)) {
    scon %a
    did -i switchbar 1 1 cb root
    if ($server) did -a switchbar 1 +eb 1 1 $server
    if (!$server) did -a switchbar 1 +eb 6 1 Not connected.
    did -i switchbar 1 1 cb last
    did -i switchbar 1 1 cb last
    did -a switchbar 1 +e 2 2 Channels
    did -i switchbar 1 1 cb last
    var %c = 1
    while (%c <= $chan(0)) {
      if (%Notify. [ $+ [ $+($server $+ $chan(%c)) ] ] != On) did -a switchbar 1 +eu 2 2 $chan(%c)
      if (%Notify. [ $+ [ $+($server $+ $chan(%c)) ] ] == On) did -a switchbar 1 +eu 2 2 ! $+ $chan(%c)
      inc %c
    }
    did -i switchbar 1 1 cb up
    did -a switchbar 1 +e 3 3 Queries
    did -i switchbar 1 1 cb last
    var %q = 1
    while (%q <= $query(0)) {
      if (%Notify. [ $+ [ $+($server $+ $query(%q)) ] ] != On) did -a switchbar 1 +eu 3 3 $query(%q)
      if (%Notify. [ $+ [ $+($server $+ $query(%q)) ] ] == On) did -a switchbar 1 +eu 3 3 ! $+ $query(%q)
      inc %q

    }
    inc %a
  }
; did -i switchbar 1 1 cb root
; did -a switchbar 1 +e 4 4 Windows
; did -i switchbar 1 1 cb last
; var %w = 1
; if ($window(0) > 0) {
;  while (%w <= $window(0)) {
;   did -a switchbar 1 +eu 4 4 $window(%w)
;   inc %w
;  }
; }
}
on *:ACTIVE:*:{
  if ($activecid != $lactivecid) && ($lactive) {
    nbar
  }
  if ($lactive) {
    if (%Notify. [ $+ [ $+($server $+ $active) ] ] == On) unset %Notify. [ $+ [ $+($server $+ $active) ] ]
    switchbar 
  }
}
on *:CONNECT:{ .timer 1 1 refresh }
on *:DISCONNECT:{ refresh }
on *:CLOSE:*:{ refresh }
on *:TEXT:*:#:{ 
  if ($active != $chan) && (%Notify. [ $+ [ $+($server $+ $chan) ] ] != On) {
    set %Notify. [ $+ [ $+($server $+ $chan) ] ] On
    switchbar
  }
}
on *:ACTION:#:{ 
  if ($active != $chan) && (%Notify. [ $+ [ $+($server $+ $chan) ] ] != On) {
    set %Notify. [ $+ [ $+($server $+ $chan) ] ] On
    switchbar
  }
}
on *:RAWMODE:#:{ 
  if ($active != $chan) && (%Notify. [ $+ [ $+($server $+ $chan) ] ] != On) {
    set %Notify. [ $+ [ $+($server $+ $chan) ] ] On
    switchbar
  }
}
on *:JOIN:#:{ 
  if ($active != $chan) && (%Notify. [ $+ [ $+($server $+ $chan) ] ] != On) {
    set %Notify. [ $+ [ $+($server $+ $chan) ] ] On
    switchbar
  }
}
on *:TEXT:*:?:{ 
  if ($active != $nick) && (%Notify. [ $+ [ $+($server $+ $chan) ] ] != On) {
    set %Notify. [ $+ [ $+($server $+ $nick) ] ] On
    switchbar
  }
}
on *:ACTION:?:{ 
  if ($active != $nick) && (%Notify. [ $+ [ $+($server $+ $chan) ] ] != On) {
    set %Notify. [ $+ [ $+($server $+ $nick) ] ] On
    switchbar
  }
}
Any sugestions?