on *:start: { dialog -m tyr tyr }

dialog tyr {
  size -1 -1 25 300
  option dbu
  list 2, 2 1 23 300, size
  ;size 760 85 190 600
  ;list 1, 50 2 135 500, size
  ;list 2, 2 2 45 500, size
  ;icon 3, 5 505 185 95, scripting\ico\menu\tbar.jpg
  ;option pixels
}

on *:dialog:tyr:*:*: {
  if ($devent == init) {
    mdx SetMircVersion $version 
    mdx MarkDialog $dname
    mdx SetBorderStyle $dname 2 staticedge
    mdx SetBorderStyle 2
    rebar Dock $dialog(tyr).hwnd > right
    mdx SetControlMDX $dname 2 toolbar flat wrap arrows nodivider > $bars
    mdx SetFont $dname 2 12 700 verdana
    mdx SetColor 2,74,75,177,178,179,180,60,61,65 text [ $rgb(97,115,133) ] 
    mdx SetFont $dname 2,74,75,177,178,179,180,40,41,45,60,61,65 13 700 Fixedsys
    mdx SetFont $dname 2,74,75,177,178,179,180,40,41,45,60,61,65 13 1200 Tahoma
    mdx SetFont $dname 5,6,7 13 1200 Tahoma
    mdx SetFont $dname 15,16,17 12 1200 Tahoma
    did -i $dname 2 1 setscheme $rgb(97,115,133) $rgb(97,115,133)
  }
  if ($devent == sclick) { 
    if ($did == 1) {
    }
    if ($did == 2) {
      if (@* iswm $active) {
        if $did($dname,2).sel == 2 { window -c $active }
      }
      elseif ($active == Status Window) {
        if $did($dname,2).sel == 2 { $iif($status == connected,ircops,halps) }
        if $did($dname,2).sel == 3 { $iif($status == connected,helpers,halps) }
        if $did($dname,2).sel == 4 { $iif($status == connected,lusers,halps) }
        if $did($dname,2).sel == 5 { $iif($status == connected,motd,halps) }
        if $did($dname,2).sel == 6 { clear $active }
      }
      elseif (#* iswm $active && $me isop $active) { 
        if $did($dname,2).sel == 2 { if ($snick($active))  {  whois $snick($active)  }  }
        if $did($dname,2).sel == 3 { if ($snick($active))  {  ns info $snick($active) all  }  }
        if $did($dname,2).sel == 4 { if ($snick($active))  {  query $snick($active)  }  }
        if $did($dname,2).sel == 5 {
          var  %a.q! = 1 
          while $snick($active,%a.q!) { 
            if $nick($active,$snick($active,%a.q!),o) { mode $active -o $snick($active,%a.q!) }
            else { mode $active +o $snick($active,%a.q!)  }
            inc %a.q!
          }
        }
        if $did($dname,2).sel == 6 { 
          var  %a.q! = 1 
          while $snick($active,%a.q!) { 
            if $nick($active,$snick($active,%a.q!),h) { mode $active -h $snick($active,%a.q!) }
            else { mode $active +h $snick($active,%a.q!)  }
            inc %a.q!
          }
        }
        if $did($dname,2).sel == 7 { 
          var  %a.q! = 1 
          while $snick($active,%a.q!) { 
            if $nick($active,$snick($active,%a.q!),v) { mode $active -v $snick($active,%a.q!) }
            else { mode $active +v $snick($active,%a.q!)  }
            inc %a.q!
          }
        }
        if $did($dname,2).sel == 8 { if ($snick($active)) { mode $active +b $snick($active) | kick $active $snick($active) $active 7  Kanalından Uzaklaştırıldınız. Kanal Kurallarına Uymadığınız Tesipt Edilmiştir. %SohbetSen  } }
        if $did($dname,2).sel == 9 { if ($snick($active)) { kick $active $snick($active) $active 7  Kanalından Uzaklaştırıldınız. 12 Hızlı Kick. %SohbetSen  } }
        if $did($dname,2).sel == 10 { if ($snick($active)) {  ping $snick($active) }   }
        if $did($dname,2).sel == 11 { if ($snick($active)) { ignore  $snick($active)   | echo -a  12 $snick($active)  1 İgnore Listesine Eklendi %SohbetSen   | notice $snick($active) 4Ignore edildiniz.5Sizin Yazdiklariniz Artik 7[1 $me 7] 5Bana Ulaşmayacak.!  %SohbetSen  }    }
        if $did($dname,2).sel == 12 { clear $active   }
      }
      elseif (#* iswm $active) {
        if $did($dname,2).sel == 2 { if  ($snick($active)) { .whois $snick($active)  } } 
        if $did($dname,2).sel == 3 { if ($snick($active)) { ns info $snick($active) all   } }
        if $did($dname,2).sel == 4 { if ($snick($active)) { query $snick($active)  }  }
        if $did($dname,2).sel == 5 { if ($snick($active)) { ping $snick($active) }  }
        if $did($dname,2).sel == 6 { if ($snick($active)) { .ignore  $snick($active)   | echo -a  12 $snick($active)  1 İgnore Listesine Eklendi %SohbetSen   | notice $snick($active) 4Ignore edildiniz.5Sizin Yazdiklariniz Artik 7[1 $me 7] 5Bana Ulaşmayacak.!  %SohbetSen  }    }
        if $did($dname,2).sel == 7 { clear $active }
      }
      else {
        if $did($dname,2).sel == 2 { .whois $active } 
        if $did($dname,2).sel == 3 { .msg nickserv info $active all   } 
        if $did($dname,2).sel == 4 { ignore -p $active | timer 1 2 close -m $active | notice $active 5İgnore Edildiniz Artık Yazdıklarımızı Görmeyeceğim.  %SohbetSen  | echo -a $active 5İgnore Listesine eklendi %SohbetSen   }
        if $did($dname,2).sel == 5 { log on $active }
        if $did($dname,2).sel == 6 { close -m $active }
        if $did($dname,2).sel == 7 { close -m }
        if $did($dname,2).sel == 8 { clear $active }
      }
    }

    if ($devent == dclick) { 
    }
  }
}

on *:active:*:{
  if $active == Status Window {  amenu Status }
  elseif @* iswm $active {  amenu web }
  elseif #* iswm $active && $me !isop $active  { amenu Kullanıcı | Kanal }
  elseif #* iswm $active && $me isop $active || $me ishop $active { amenu Operator | Kanal   }
  else  { amenu Ozel }
}

alias amenu {
  if $1 == Operator { 
    mdx  SetMircVersion $version 
    mdx  MarkDialog $dname
    did -r tyr 2 
    did -i tyr 2 1 bmpsize 25 25
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\whois.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\info.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\ozel.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\op.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\hop.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\vop.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\bankick.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\kick.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\ping.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\engelle.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\temizle.ico
    did -a tyr 2 +a 1 Whois $chr(9) $+ Seçili Nick'e Whois Çeker
    did -a tyr 2 +a 2 İnfo  $chr(9) $+ Seçili Nick'e İnfo Çeker
    did -a tyr 2 +a 3 Özel $chr(9) $+ Seçili Nick'i Özel görüşmeye Alır
    did -a tyr 2 +a 4 Aop $chr(9) $+ Seçili Nick'e Aop Verir Veya Alır 
    did -a tyr 2 +a 5 Hop $chr(9) $+ Seçili Nick'e HalfOp Verir Veya Alır
    did -a tyr 2 +a 6 Vop $chr(9) $+ Seçili Nick'e Voie Verir veya Alır
    did -a tyr 2 +a 7 Bn+K $chr(9) $+ Seçili Nick'i Kanaldan Atar
    did -a tyr 2 +a 8 Kick $chr(9) $+ Seçili Nick'i  Kickler
    did -a tyr 2 +a 9 Ping $chr(9) $+ Seçili Nick'i Pingler
    did -a tyr 2 +a 10 ignore $chr(9) $+ Seçili Nick'i İgnore Eder
    did -a tyr 2 +a 11 clear $chr(9) $+ Aktif Pencereyi Temizler
  }
  elseif $1 == Kullanıcı { 
    mdx  SetMircVersion $version 
    mdx  MarkDialog $dname
    did -r tyr 2 
    did -i tyr 2 1 bmpsize 25 25
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\whois.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\info.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\ozel.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\ping.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\engelle.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\temizle.ico
    did -a tyr 2 +a 1 Whois $chr(9) $+ Seçili Nick'e Whois Çeker
    did -a tyr 2 +a 2 İnfo  $chr(9) $+ Seçili Nick'e İnfo Çeker
    did -a tyr 2 +a 3 Özel $chr(9) $+ Seçili Nick'i Özel görüşmeye Alır
    did -a tyr 2 +a 4 Ping $chr(9) $+ Seçili Nick'i Pingler
    did -a tyr 2 +a 5 İgnore $chr(9) $+ Seçili Nick'i İgnore Eder ( Size Yazamaz )
    did -a tyr 2 +a 6 Clear $chr(9) $+ Aktif Pencereyi Temizler
  }
  elseif $1 == web { 
    mdx  SetMircVersion $version 
    mdx  MarkDialog $dname
    did -r tyr 2 
    did -i tyr 2 1 bmpsize 25 25
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\kapat.ico
    did -a tyr 2 +a 1 Kapat $chr(9) $+ Kapat
  }
  elseif $1 == Status {
    mdx  SetMircVersion $version 
    mdx  MarkDialog $dname
    did -r tyr 2 
    did -i tyr 2 1 bmpsize 25 25
    did -i tyr 2 1 setimage icon normal  SohbetSen\ico\ircops.ico
    did -i tyr 2 1 setimage icon normal  SohbetSen\ico\lusers.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\motd.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\temizle.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\helper.ico
    did -a tyr 2 +a 1 Ircops $chr(9) $+ Şuan Bağlı Olan İRCoplar 
    did -a tyr 2 +a 5 Helps $chr(9) $+ Şuan Online Olan Helperler
    did -a tyr 2 +a 2 Users $chr(9) $+ Sunucu Kullanıcı Bilgileri
    did -a tyr 2 +a 3 Motd $chr(9) $+ Sunucu Giriş Mesajı
    did -a tyr 2 +a 4 clear $chr(9) $+ Ekranı Temizler
  }
  elseif $1 == Ozel {
    mdx  SetMircVersion $version 
    mdx  MarkDialog $dname
    did -r tyr 2 
    did -i tyr 2 1 bmpsize 25 25
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\whois.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\info.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\engelle.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\loglar.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\kapat.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\kapatal.ico
    did -i tyr 2 1 setimage icon normal SohbetSen\ico\temizle.ico
    did -a tyr 2 +a 1 Whois $chr(9) $+  $active Whois Çeker
    did -a tyr 2 +a 2 İnfo $chr(9) $+ $active Nick İnfo Çeker  
    did -a tyr 2 +a 3 İgnore $chr(9) $+  $active Nickinin Size Yazmasını Engeller
    did -a tyr 2 +a 4 Log $chr(9) $+ $active İle Yazışmalırınızı Kayıt Eder
    did -a tyr 2 +a 5 Kapat $chr(9) $+  $active İle Pencerenizi Kapatır 
    did -a tyr 2 +a 6 Kapat! $chr(9) $+ Tüm Özel Pencereleri Kapatır 
    did -a tyr 2 +a 7 Clear $chr(9) $+ Ekranı Temizler
  }
}
alias halps { echo -a 3***2 $me Bir Sunucuya Bağlı Değilsiniz..! | helps | halt }
