alias chanservx { 
  if !$dialog(chanservx) { /dialog -m chanservx chanservx  }
  else { return }
}
dialog chanservx {
  title "..: SohbetSen Cafe Chanserv :.."
  size -1 -1 502 391
  box "Basit İşlemler", 1, 8 6 378 46
  button "Kanalı Kaydet", 2, 14 24 85 21,flat
  button "Drop", 3, 196 24 88 21,flat
  button "Identify Kanal", 4, 106 24 85 21,flat
  button "Kanal info", 5, 289 24 88 20,flat
  box "Kanal Yazınız", 6, 389 7 111 45
  combo 7, 394 25 99 500, autohs, drop, size, edit
  box "Kanal Kontrol", 8, 9 54 190 45
  button "Op/Deop", 9, 14 71 85 21,flat
  button "Deop", 10, 106 71 85 21,flat
  box "Kanal İşlemi", 11, 10 103 488 45
  button "Unban", 12, 14 120 85 21,flat
  button "Unban all", 13, 109 120 85 21,flat
  button "Unlock Kanal", 14, 201 120 85 21,flat
  button "Kick all", 15, 292 120 85 21,flat
  button "Deop all", 16, 383 120 89 21,flat
  box "Access List", 17, 6 153 492 70
  box "", 18, 13 165 382 45
  button "OP", 19, 18 182 85 21,flat
  button "Master", 20, 113 182 85 21,flat
  button "Auto voice", 21, 205 182 85 21,flat
  button "Diğer Level", 22, 297 182 85 21,flat
  button "Access Sil", 23, 398 167 93 22,flat
  button "Access List", 24, 399 194 91 21,flat
  box "Kanal Ayarları", 25, 9 227 214 129
  button "Kanal Modları", 26, 26 246 85 21,flat
  button "Founder Değiş", 27, 121 246 85 21,flat
  button "Şifre Değiştir", 28, 26 301 85 21,flat
  button "Açıklama", 29, 26 327 86 21,flat
  button "URL Değiştir", 30, 121 327 85 21,flat
  button "Mail Değiştir", 31, 26 274 85 21,flat
  button "Giriş Mesajı", 32, 121 274 85 21,flat
  button "Topic Değiştir", 33, 121 301 85 21,flat
  box "Korumalar", 34, 228 229 269 156
  box "Keep lock", 35, 234 242 122 45
  button "Aç", 36, 239 260 52 22,flat
  button "Kapa", 37, 296 260 52 22,flat
  box "Topic Lock", 38, 361 241 129 45
  button "Kapa", 40, 431 260 52 22,flat
  button "Aç", 39, 369 260 54 22,flat
  box "Özel Kanal", 41, 235 288 122 44
  button "Kapa", 42, 298 305 51 22,flat
  button "Aç", 43, 239 305 54 22,flat
  box "Secure ops", 44, 361 287 130 44
  button "Aç", 45, 369 305 54 22,flat
  button "Kapa", 46, 430 305 53 22,flat
  box "Leave ops", 47, 235 334 122 44
  button "Aç", 48, 239 352 51 22,flat
  button "Kapa", 50, 298 352 54 22,flat
  box "Restricted", 57, 361 334 130 44
  button "Aç", 56, 369 350 54 22,flat
  button "Kapa", 58, 430 350 53 22,flat
  box "Akick", 51, 208 54 290 46
  button "List", 52, 218 71 85 21,flat
  button "Ekle", 54, 310 71 85 21,flat
  button "Kaldır", 55, 402 71 85 21,flat
  button "Tamam", 49, 24 362 85 21,ok flat default
  button "İptal", 53, 122 362 81 21, cancel flat
}

on *:dialog:chanservx:init:0:{
  { Splay $mircdirSohbetSen\sounds\Menu.wav }
  mdx.
  mdx SetColor $dname 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58 text 200
  mdx SetFont $dname 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58 12 500 verdana
  var %tmp = 1
  var %tmp2 = $chan(0)
  while (%tmp <= %tmp2) {
    did -a chanservx 7 $chan(%tmp)
    inc %tmp
  }
  did -a chanservx 7 %chana
  did -c chanservx 7 $calc(%tmp2 + 1) 
}
on 1:dialog:chanservx:edit:7:{
  if $did(7) != $null { %chana = $did(7) }
}
on 1:dialog:chanservx:sclick:*:{
  if $did == 7 { %chana = $did(7) }
  if $did == 2 { if $dialog(chan2) == $null dialog -ma chan $+ $did chan $+ $did  }
  if $did == 4 { if $dialog(chan3) == $null {
      %chan.t = Identify 
      %chan.b = Identify
      dialog -ma chan3 chan3
  }  }
  if $did == 49 { unset %chan* } 
  if $did == 53 { unset %chan* } 
  if $did == 3 { if $dialog(chan4) == $null {
      %chan.t = Kanal Droplama 
      %chan.b = drop
      dialog -ma chan3 chan3
  }  }
  if $did == 5 { if $dialog(chan4) == $null {
      %chan.t = Kanal Bilgisi
      %chan.b = Info
      %chan.c = info
      dialog -ma chan4 chan4
  }  }
  if $did == 9 { if $dialog(chan7) == $null {
      %chan.t = Op/deop
      %chan.b = Op/deop
      %chan.c = op 
      dialog -ma chan7 chan7
  }  }
  if $did == 10 { if $dialog(chan7) == $null {
      %chan.t = Deop
      %chan.b = Deop
      %chan.c = deop 
      dialog -ma chan7 chan7
  }  }
  if $did == 12 { if $dialog(chan4) == $null {
      %chan.t = Unban
      %chan.b = Unban
      %chan.c = unban 
      dialog -ma chan4 chan4
  }  }
  if $did == 13 { if $dialog(chan4) == $null {
      %chan.t = Unban all
      %chan.b = Unban
      %chan.c = clear
      %chan.c2 = bans
      dialog -ma chan4 chan4
  }  }
  if $did == 14 { if $dialog(chan4) == $null {
      %chan.t = Unlock Kanal
      %chan.b = Unlock
      %chan.c = clear 
      %chan.c2 = modes
      dialog -ma chan4 chan4
  }  }
  if $did == 15 { if $dialog(chan4) == $null {
      %chan.t = Kick all
      %chan.b = Kick
      %chan.c = clear 
      %chan.c2 = users
      dialog -ma chan4 chan4
  }  }
  if $did == 16 { if $dialog(chan4) == $null {
      %chan.t = Deop all
      %chan.b = Deop
      %chan.c = clear 
      %chan.c2 = ops
      dialog -ma chan4 chan4
  }  }


  if $did == 19 { if $dialog(chan5) == $null {
      %chan.t = Access Ekle
      %chan.b = Ekle
      %chan.c = add
      %chan.n = 50
      dialog -ma chan5 chan5
  }  }
  if $did == 20 { if $dialog(chan5) == $null {
      %chan.t = Kanal Master
      %chan.c = add
      %chan.b = Ekle
      %chan.n = 999
      dialog -ma chan5 chan5
  }  }
  if $did == 21 { if $dialog(chan5) == $null {
      %chan.t = AutoVoice Ekle
      %chan.c = add
      %chan.b = Ekle
      %chan.n = 30
      dialog -ma chan5 chan5
  }  }
  if $did == 22 { if $dialog(chan5) == $null {
      %chan.t = Register user 
      %chan.c = add
      %chan.b = Register
      dialog -ma chan6 chan6
  }  }
  if $did == 23 { if $dialog(chan5) == $null {
      %chan.t = Access Sil
      %chan.b = Sil
      %chan.c = del
      dialog -ma chan5 chan5
  }  }
  if $did == 24 { if $dialog(chan4) == $null {
      %chan.t = List users
      %chan.b = List
      %chan.c = access
      %chan.c2 = list
      dialog -ma chan4 chan4
  }  }
  if $did == 52 { if $dialog(chan4) == $null {
      %chan.t = Akick Listesi
      %chan.b = Listele
      %chan.c = akick
      %chan.c2 = list
      dialog -ma chan4 chan4
  }  }
  if $did == 54 { if $dialog(chan8) == $null {
      %chan.t = ChanServ Akick Ekle
      %chan.b = Ekle
      %chan.c = add
      dialog -ma chan8 chan8
  }  }
  if $did == 55 { if $dialog(chan8) == $null {
      %chan.t = Akick Kaldır
      %chan.b = Kaldır
      %chan.c = del
      dialog -ma chan8 chan8
  }  }
  if $did == 26 { if $dialog(chan9) == $null {
      %chan.t = Kanal Modları
      %chan.b = Tamam
      %chan.c = mlock
      %chan.e = Modes:
      dialog -ma chan9 chan9
  }  }
  if $did == 27 { if $dialog(chan9) == $null {
      %chan.t = Kanal Sahibi
      %chan.b = Tamam
      %chan.c = founder
      %chan.e = Founder->
      dialog -ma chan9 chan9
  }  }
  if $did == 28 { if $dialog(chan9) == $null {
      %chan.t = Kanal Şifresi 
      %chan.b = Tamam
      %chan.c = password
      %chan.e = Şifre-->
      dialog -ma chan9 chan9
  }  }
  if $did == 29 { if $dialog(chan9) == $null {
      %chan.t = Kanal Açıklaması
      %chan.b = Tamam
      %chan.c = desc
      %chan.e = Açıklama->
      dialog -ma chan9 chan9
  }  }
  if $did == 30 { if $dialog(chan9) == $null {
      %chan.t = Kanal URL
      %chan.b = Tamam
      %chan.c = url
      %chan.e = URL->
      dialog -ma chan9 chan9
  }  }
  if $did == 31 { if $dialog(chan9) == $null {
      %chan.t = Set Email
      %chan.b = OK
      %chan.c = email
      %chan.e = Email:
      dialog -ma chan9 chan9
  }  }
  if $did == 32 { if $dialog(chan9) == $null {
      %chan.t = ChanServ Mesajı
      %chan.b = Tamam
      %chan.c = entrymsg
      %chan.e = Mesajınız->
      dialog -ma chan9 chan9
  }  }
  if $did == 33 { if $dialog(chan31) == $null {
      %chan.t = Topic At
      %chan.b = Tamam
      %chan.c = topic
      %chan.e = Topic:
      dialog -ma chan31 chan31
  }  }
  if $did == 36 { if $dialog(chan4) == $null {
      %chan.t = Topic Hatırlama Aç
      %chan.b = Tamam
      %chan.c = set
      %chan.c2 = keeptopic on
      %chan.e = Topic:
      dialog -ma chan4 chan4
  }  }
  if $did == 37 { if $dialog(chan4) == $null {
      %chan.t = Topic Hatırlama Kapat
      %chan.b = Kapat
      %chan.c = set
      %chan.c2 = keeptopic off
      dialog -ma chan4 chan4
  }  }
  if $did == 39 { if $dialog(chan4) == $null {
      %chan.t = Topic Kilidi Aç
      %chan.b = Tamam
      %chan.c = set
      %chan.c2 = topiclock on
      dialog -ma chan4 chan4
  }  }
  if $did == 40 { if $dialog(chan4) == $null {
      %chan.t = Topic Kilidi Kapat
      %chan.b = Kapat
      %chan.c = set
      %chan.c2 = topiclock off
      dialog -ma chan4 chan4
  }  }
  if $did == 43 { if $dialog(chan4) == $null {
      %chan.t = Özel Kanal Aç
      %chan.b = Tamam
      %chan.c = set
      %chan.c2 = private on
      dialog -ma chan4 chan4
  }  }
  if $did == 42 { if $dialog(chan4) == $null {
      %chan.t = Özel Kanal Kapat
      %chan.b = Kapat
      %chan.c = set
      %chan.c2 = private off
      dialog -ma chan4 chan4
  }  }
  if $did == 45 { if $dialog(chan4) == $null {
      %chan.t = Op Koruması Aç
      %chan.b = Tamam
      %chan.c = set
      %chan.c2 = secureops on
      dialog -ma chan4 chan4
  }  }
  if $did == 46 { if $dialog(chan4) == $null {
      %chan.t = Op Korumasını Kapat
      %chan.b = Off
      %chan.c = set
      %chan.c2 = secureops off
      dialog -ma chan4 chan4
  }  }
  if $did == 48 { if $dialog(chan4) == $null {
      %chan.t = leave Ops Aç
      %chan.b = Tamam
      %chan.c = set
      %chan.c2 = leaveops on
      dialog -ma chan4 chan4
  }  }
  if $did == 50 { if $dialog(chan4) == $null {
      %chan.t = LeaveOps Kapat
      %chan.b = Kapat
      %chan.c = set
      %chan.c2 = leaveops off
      dialog -ma chan4 chan4
  }  }
  if $did == 56 { if $dialog(chan4) == $null {
      %chan.t =  Restricted Aç
      %chan.b = Tamam
      %chan.c = set
      %chan.c2 = restricted  on
      dialog -ma chan4 chan4
  }  }
  if $did == 58 { if $dialog(chan4) == $null {
      %chan.t =  Restricted Kapat
      %chan.b = Kapat
      %chan.c = set
      %chan.c2 =  restricted  off
      dialog -ma chan4 chan4
  }  }
}
dialog  chan2 {
  title " ..: Kanal Kaydet :.."
  size 290 181 232 117
  button "Kaydet", 1, 36 92 75 20,ok flat
  text "Kanal:", 2, 29 11 31 13
  edit "", 3, 65 7 148 19, autohs
  text "Şifre:", 4, 26 31 35 14
  edit "", 5, 65 29 148 19, autohs
  text "Açıklama:", 6, 10 54 54 13
  edit "", 7, 65 52 147 19, autohs
  box "", 8, 8 75 217 11
  button "Vazgeç", 9, 122 92 75 20,cancel flat
}
on 1:dialog:chan2:sclick:1:{
  if $did(3) == $null { %erromsg = Kanal Bos Birakilmis | dialog -ma erro erro | halt }
  if $did(5) == $null { %erromsg = Sifre Bos Birakilmis | dialog -ma erro erro | halt }
  if $did(7) == $null { var %tmp = No }
  else   %tmp = $did(7)
  if $vrf($did(3))  { %msg chanserv register $did(3) $did(5) %tmp %url1 }
  else { %msg chanserv register $chr(35) $+ $did(3) $did(5) %tmp %url1 }
  unset %chan.*
}
on 1:dialog:chan3:init:0:{
  did -a chan3 3 %chana
}
on 1:dialog:chan3:sclick:1:{
  if $did(3) == $null { %erromsg = Kanal Bos Birakilmis | dialog -ma erro erro | halt }
  if $did(5) == $null { %erromsg = Sifre Bos Birakilmis | dialog -ma erro erro | halt }
  if $vrf($did(3))  { %msg chanserv identify $did(3) $did(5)  }
  else { %msg chanserv identify $chr(35) $+ $did(3) $did(5)   }
  unset %chan.*
}
on 1:dialog:chan4:init:0:{
  did -a chan4 3 %chana
}
on 1:dialog:chan4:sclick:1:{
  if $did(3) == $null { %erromsg = Kanal Bos Birakilmis | dialog -ma erro erro | halt }
  if $vrf($did(3))  { %msg chanserv %chan.c $did(3) %chan.c2 }
  else { %msg chanserv %chan.c $chr(35) $+ $did(3)  %chan.c2 }
  unset %chan.*
}
on 1:dialog:chan5:init:0:{
  did -a chan5 3 
}
on 1:dialog:chan5:sclick:1:{
  if $did(3) == $null { %erromsg = Kanal Bos Birakilmis | dialog -ma erro erro | halt }
  if $did(5) == $null { %erromsg = Nick Bos Birakilmis | dialog -ma erro erro | halt }
  if $vrf($did(3))  { %msg chanserv access $did(3) %chan.c $did(5) %chan.n }
  else { %msg chanserv access $chr(35) $+ $did(3)  %chan.c $did(5) %chan.n }
  unset %chan.*
}
on 1:dialog:chan6:init:0:{
  did -a chan6 3 %chana
}
on 1:dialog:chan6:sclick:1:{
  if $did(3) == $null { %erromsg = Kanal Bos Birakilmis | dialog -ma erro erro | halt }
  if $did(5) == $null { %erromsg = Nick Bos Birakilmis | dialog -ma erro erro | halt }
  if $did(7) == $null { %erromsg = Level Bos Birakilmis | dialog -ma erro erro | halt }
  if $vrf($did(3))  { %msg chanserv access $did(3) %chan.c $did(5) $did(7) }
  else { %msg chanserv access $chr(35) $+ $did(3) %chan.c $did(5) $did(7) }
  unset %chan.*
}
on 1:dialog:chan7:init:0:{
  did -a chan7 3 %chana
}
on 1:dialog:chan7:sclick:1:{
  if $did(3) == $null { %erromsg = Kanal Bos Birakilmis | dialog -ma erro erro | halt }
  if $did(5) == $null { %erromsg = Nick Bos Birakilmis | dialog -ma erro erro | halt }
  if $vrf($did(3))  { %msg chanserv %chan.c $did(3)  $did(5)   }
  else { %msg chanserv %chan.c $chr(35) $+ $did(3)  $did(5)  }
  unset %chan.*
}
on 1:dialog:chan8:init:0:{
  did -a chan8 3 %chana
}
on 1:dialog:chan8:sclick:1:{
  if $did(3) == $null { %erromsg = Kanal Bos Birakilmis | dialog -ma erro erro | halt }
  if $did(5) == $null { %erromsg = Nick Bos Birakilmis | dialog -ma erro erro | halt }
  if $did(7) == $null { var %tmp =  No! }
  else   %tmp = $did(7)
  if $vrf($did(3))  { %msg chanserv akick $did(3) %chan.c $did(5) %tmp %url1 }
  else { %msg chanserv akick $chr(35) $+ $did(3) %chan.c $did(5) %tmp %url1 }
  unset %chan.*
}
on 1:dialog:chan9:init:0:{
  did -a chan9 3 %chana
}
on 1:dialog:chan9:sclick:1:{
  if $did(3) == $null { %erromsg = Kanal ismini Girin | dialog -ma erro erro | halt }
  if $did(5) == $null { %erromsg = %chan.e Bos Birakilmis | dialog -ma erro erro | halt }
  if $vrf($did(3))  { %msg chanserv set $did(3) %chan.c $did(5) }
  else { %msg chanserv set  $chr(35) $+ $did(3) %chan.c $did(5) }
  unset %chan.*
}
on 1:dialog:chan31:sclick:1:{
  if $did(3) == $null { %erromsg = no Kanal İsmini Girin | dialog -ma erro erro | halt }
  if $did(5) == $null { %erromsg = %chan.e Tamamını Doldurun | dialog -ma erro erro | halt }
  if $vrf($did(3))  { %msg chanserv topic $did(3) $did(5)   }
  else { %msg chanserv topic $chr(35) $+ $did(3) $did(5)  }
  unset %chan.*
}
alias vrf {
  if ($left($1,1) == $chr(35)) { return $true }
  else { return $false  }
}
dialog chan3 {
  title ..: %chan.t :..
  size 290 181 229 101
  button %chan.b, 1, 34 73 75 20,ok flat
  text "Kanal:", 2, 29 11 31 13
  edit "", 3, 65 7 148 19, autohs
  text "Sifre:", 4, 26 31 35 14
  edit "", 5, 65 29 148 19, autohs
  box "", 8, 7 55 217 11
  button "Vazgeç", 9, 123 72 75 20,cancel flat
}
dialog chan4 {
  title ..: %chan.t :..
  size 290 181 228 75
  button %chan.b, 1, 34 48 75 20,ok flat
  text "Kanal:", 2, 29 11 31 13
  edit "", 3, 65 7 148 19, autohs
  box "", 8, 5 29 217 11
  button "Vazgeç", 9, 124 48 75 20,cancel flat
}
dialog chan5 {
  title ..: %chan.t :..
  size 290 181 229 101
  button %chan.b, 1, 34 73 75 20,ok flat
  text "Kanal:", 2, 29 11 31 13
  edit "", 3, 65 7 148 19, autohs
  text "Nick:", 4, 33 31 26 14
  edit "", 5, 65 29 148 19, autohs
  box "", 8, 7 55 217 11
  button "Vazgeç", 9, 123 72 75 20,cancel flat
}
dialog chan6 {
  title " ..: Access Ekle :.."
  size 290 181 232 117
  button "Ekle", 1, 36 92 75 20,ok flat
  text "Kanal:", 2, 29 11 31 13
  edit "", 3, 65 7 148 19, autohs
  text "Nick:", 4, 33 31 26 14
  edit "", 5, 65 29 148 19, autohs
  text "Level:", 6, 30 54 30 14
  edit "", 7, 65 52 32 19
  box "", 8, 8 75 217 11
  button "Vazgeç", 9, 122 92 75 20,cancel flat
}
dialog chan7 {
  title ..: %chan.t :..
  size 290 181 229 101
  button %chan.b, 1, 34 73 75 20,ok flat
  text "Kanal:", 2, 29 11 31 13
  edit "", 3, 65 7 148 19, autohs
  text "Nick:", 4, 33 31 26 14
  edit "", 5, 65 29 148 19, autohs
  box "", 8, 7 55 217 11
  button "Vazgeç", 9, 123 72 75 20,cancel flat
}
dialog chan8 {
  title ..: %chan.t :..
  size 290 181 232 117
  button %chan.b, 1, 36 92 75 20,ok flat
  text "Kanal:", 2, 36 11 31 13
  edit "", 3, 72 7 148 19, autohs
  text "Nick/Host->>:", 4, 2 31 67 15
  edit "", 5, 72 29 148 19, autohs
  text "Sebeb:", 6, 32 54 35 14
  edit "", 7, 73 53 145 19, autohs
  box "", 8, 6 75 217 11
  button "Vazgeç", 9, 122 92 75 20,cancel flat
}
dialog chan9 {
  title ..: %chan.t :..
  size 290 181 243 96
  button %chan.b, 1, 41 69 75 20,ok flat
  text "Kanal:", 2, 6 8 77 14,right
  edit "", 3, 87 6 148 19, autohs
  text %chan.e, 4, 6 31 77 16, right
  edit "", 5, 87 29 148 19, autohs
  box "", 8, 5 51 231 11
  button "Vazgeç", 9, 126 68 75 20,cancel flat
}
dialog chan31 {
  title ..: %chan.t :..
  size 290 181 243 96
  button %chan.b, 1, 41 69 75 20,ok flat
  text "Kanal:", 2, 6 8 77 14,right
  edit "", 3, 87 6 148 19, autohs
  text %chan.e, 4, 6 31 77 16, right
  edit "", 5, 87 29 148 19, autohs
  box "", 8, 5 51 231 11
  button "Vazgeç", 9, 126 68 75 20,cancel flat
}
dialog nick4 {
  title ..: %nick.t :..
  size 290 181 229 101
  button %nick.b, 1, 34 73 75 20,ok flat
  text "Sifre:", 2, 33 11 31 13
  edit "", 3, 65 7 148 19, autohs
  text "e-mail:", 4, 28 31 34 14,left
  edit "", 5, 65 29 148 19, autohs
  box "", 8, 7 55 217 11
  button "Vazgeç", 9, 123 72 75 20,cancel flat
}
on 1:dialog:nick4:sclick:1:{
  if $did(3) == $null { %erromsg = Sifre Bos Birakilmis | dialog -ma erro erro | halt }
  if $did(5) == $null { %erromsg = e-mail Bos Birakilmis | dialog -ma erro erro | halt }
  %msg nickserv %nick.c $did(3) $did(5)   
  unset %nick.*
}
on 1:dialog:chan31:init:0:{
  did -a chan31 3 %chana
}
