IRCForumu.Net - Türkiye'nin IRC ve mIRC Kullanıcılarının Buluştuğu Forum

IRCForumu.Net - Türkiye'nin IRC ve mIRC Kullanıcılarının Buluştuğu Forum (https://www.ircforumu.net/)
-   Hazır Kodlar (https://www.ircforumu.net/hazir-kodlar/)
-   -   Proxy Host Koruması Dialog (https://www.ircforumu.net/hazir-kodlar/6782-proxy-host-korumasi-dialog.html)

immortaL 30 Aralık 2017 11:34

Proxy Host Koruması Dialog
 
Kod:

alias hosta { .$iif(!$dialog(hosta),dialog -m hosta hosta,dialog -c hosta hosta) }
dialog Hosta {
  title "Proxy Host Korumasi."
  size -1 -1 240 170
  option dbu
  box "", 1, 10 1 220 142
  edit "", 2, 17 32 64 10, return autohs
  list 3, 17 44 64 75, size
  button "Ekle", 4, 17 21 32 10
  button "SiL", 5, 49 21 32 10
  edit "", 6, 87 32 64 10, return autohs
  list 7, 87 44 64 75, size 
  button "Ekle", 8, 87 21 32 10
  button "SiL", 9, 119 21 32 10
  edit "", 10, 158 32 64 10, return autohs
  list 11, 158 44 64 75, size
  button "Ekle", 12, 158 21 32 10
  button "SiL", 13, 190 21 32 10
  Radio "", 14, 17 124 7 10
  Radio "", 15, 70 124 7 10
  Radio "", 16, 123 124 7 10
  Radio "", 17, 176 124 7 10
  Text "Oper K+b", 19, 23 124 40 10, Center
  Text "Op K+b", 20, 76 124 40 10, Center
  Text "Oper Gzline", 21, 129 124 40 10, Center
  Text "Host Kapat", 22, 182 124 40 10, Center
  Button "Tamam Kapat", 23, 10 150 220 14,ok
  Text "Host Listesi" 24, 17 8 64 10, Center
  Text "Muaf Host Listesi" 25, 87 8 64 10, Center
  Text "Muaf Kanal Listesi" 26, 158 8 64 10, Center
}
on 1:dialog:Hosta:init:0: {
  if ($isfile(scripts\host.txt) == $false) { write -c scripts\host.txt } | else { loadbuf -o $dname 3 scripts\host.txt }
  if ($isfile(scripts\muafhost.txt) == $false) { write -c scripts\muafhost.txt } | else { loadbuf -o $dname 7 scripts\muafhost.txt }
  if ($isfile(scripts\hmuafkanal.txt) == $false) { write -c scripts\hmuafkanal.txt } | else { loadbuf -o $dname 11 scripts\hmuafkanal.txt }
  if ($group(#hostadkb) == on) { did -c $dname 14 }
  if ($group(#hostopkb) == on) { did -c $dname 15 }
  if ($group(#hostgz) == on) { did -c $dname 16 }
  if ($group(#hostkapat) == on) { did -c $dname 17 }
}
#hostkapat on
#hostkapat end
on *:dialog:Hosta:sclick:*:{
  if ($did == 4) { if ($did(2) == $null) { echo -a  Lütfen Bosluk eklemeyiniz.  | return }
    elseif (#* iswm $did(2)) { echo -a  Lütfen kanal eklemeyiniz. Host listesidir. Örnek Host: *mchsi*  | return }
    else { write scripts\host.txt $did(2) | did -a $dname 3 $did(2) | did -r $dname 2 }
  }
  if ($did == 5) { if ($did(3).sel == 0) { echo -a  Silmek Için Bir Satir Seçiniz...  | return }
    else { write -dl $+ $did(3).sel scripts\host.txt | did -d $dname 3 $did(3).sel }
  }
  if ($did == 8) { if ($did(6) == $null) { echo -a  Lütfen Bosluk eklemeyiniz.  | return }
    elseif (#* iswm $did(6)) { echo -a  Lütfen kanal eklemeyiniz. Muaf Host listesidir. Örnek Host: *Oper*  | return }
    else { write scripts\muafhost.txt $did(6) | did -a $dname 7 $did(6) | did -r $dname 6 }
  }
  if ($did == 9) { if ($did(7).sel == 0) { echo -a  Silmek Için Bir Satir Seçiniz...  | return }
    else { write -dl $+ $did(7).sel scripts\muafhost.txt | did -d $dname 7 $did(7).sel }
  }
  if ($did == 12) { if ($did(10) == $null) { echo -a  Lütfen Bosluk eklemeyiniz.  | return }
    elseif (#* !iswm $did(10)) { echo -a  Muaf Kanal Listesidir Nick eklemeyiniz. örnek Kanal: #Aytac  | return }
    else { write scripts\hmuafkanal.txt $did(10) | did -a $dname 11 $did(10) | did -r $dname 10 }
  }
  if ($did == 13) { if ($did(11).sel == 0) { echo -a  Silmek Için Bir Satir Seçiniz...  | return }
    else {  write -dl $+ $did(11).sel scripts\hmuafkanal.txt | did -d $dname 11 $did(11).sel }
  }
  if ($did(14).state == 1) { .enable #hostadkb | .disable #hostgz | .disable #hostopkb | .disable #hostkapat }
  if ($did(15).state == 1) { .enable #hostopkb  | .disable #hostgz | .disable #hostkapat | .disable #hostadkb }
  if ($did(16).state == 1) { .enable #hostgz  | .disable #hostadkb | .disable #hostopkb | .disable #hostkapat }
  if ($did(17).state == 1) { .enable #hostkapat  | .disable #hostgz | .disable #hostopkb | .disable #hostadkb }
}
#hostkapat on
#hostkapat end
#hostadkb off
on !*:join:#:{
  if (o isin $usermode)  {
    var %a 1 |  while %a <= $numtok(%mhall,32) { if $gettok(%mhall,%a,32) iswm $address($nick,2)) { reteturn } | inc %a  }
    if $istok(%mnall,$nick,32) { return }
    if $istok(%mkall,$chan,32) { return }
    var %c 1
    while (%c <= $lines(scripts\hmuafkanal.txt)) {
      if ($read(scripts\hmuafkanal.txt,%c) iswm $chan) { return }
      inc %c
    }
    var %c 1
    while (%c <= $lines(scripts\muafhost.txt)) {
      if ($read(scripts\muafhost.txt,%c) iswm $address($nick,2)) { return }
      inc %c
    }
    var %hd $lines(scripts\host.txt)
    while (0 <= %hd) {
      if ($read(scripts\host.txt,%hd) iswm $address($nick,2)) {
        kick $chan $nick  Yasak Host! 
        mode # +b $+(*!*@,$v1)
        break
      }
      dec %hd
    }
  }
}
#hostadkb end
#hostopkb off
on !*:join:#:{
  if ($me isop $chan) || ($me ishelp $chan)  {
    var %a 1 |  while %a <= $numtok(%mhall,32) { if $gettok(%mhall,%a,32) iswm $address($nick,2)) { reteturn } | inc %a  }
    if $istok(%mnall,$nick,32) { return }
    if $istok(%mkall,$chan,32) { return }
    var %c 1
    while (%c <= $lines(scripts\hmuafkanal.txt)) {
      if ($read(scripts\hmuafkanal.txt,%c) iswm $chan) { return }
      inc %c
    }
    var %c 1
    while (%c <= $lines(scripts\muafhost.txt)) {
      if ($read(scripts\muafhost.txt,%c) iswm $address($nick,2)) { return }
      inc %c
    }
    var %hd $lines(scripts\host.txt)
    while (0 <= %hd) {
      if ($read(scripts\host.txt,%hd) iswm $address($nick,2)) {
        kick $chan $nick  Yasak Host! 
        mode # +b $+(*!*@,$v1)
        break
      }
      dec %hd
    }
  }
}
#hostopkb end
#hostgz off
on !*:join:#:{
  if (o isin $usermode)  {
    var %a 1 |  while %a <= $numtok(%mhall,32) { if $gettok(%mhall,%a,32) iswm $address($nick,2)) { reteturn } | inc %a  }
    if $istok(%mnall,$nick,32) { return }
    if $istok(%mkall,$chan,32) { return }
    var %c 1
    while (%c <= $lines(scripts\hmuafkanal.txt)) {
      if ($read(scripts\hmuafkanal.txt,%c) iswm $chan) { return }
      inc %c
    }
    var %c 1
    while (%c <= $lines(scripts\muafhost.txt)) {
      if ($read(scripts\muafhost.txt,%c) iswm $address($nick,2)) { return }
      inc %c
    }
    var %hd $lines(scripts\host.txt)
    while (0 <= %hd) {
      if ($read(scripts\host.txt,%hd) iswm $address($nick,2)) {
        .gzline $nick +30d  Yasak Host! 
        break
      }
      dec %hd
    }
  }
}
#hostgz end

ekteki host.txt dosyasını scripts klasoru içine bırakınız.


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 05:36.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0
Copyright ©2005 - 2023 IRCForumu.Net - Tüm Hakları Saklıdır.