Kod: Kodu kopyalamak için üzerine çift tıklayın!
menu status,menubar,channel {
.-
$iif($group(#nickidents) == on, • Nick/Idents [Acik], • Nick/Idents [Kapali]): if $group(#nickidents) == on { .disable #nickidents | echo -a 4 Nick/Ident Korumasi Kapatildi } | else { .enable #nickidents | echo -a 12 Nick/Ident Korumasi Acildi }
.• Nick/Idents Ayarlar:BanEkleNick
.-
}
dialog BanEkle.n_ {
title "Ban Ekleme (Nick)"
size -1 -1 100 110
option dbu
box "Nickler", 1, 2 0 96 93
list 2, 5 8 90 70, disable size sort extsel
edit "", 3, 5 80 90 10
box "Muaf Kanal Listesi", 4, 100 0 96 93
list 5, 103 8 90 70, vsbar size sort
edit "", 6, 102 80 80 10, autohs return
button "+", 7, 184 80 9 10, flat
button "Ban", 97, 2 97 30 10, flat
button "İptal", 98, 34 97 30 10, cancel flat
button "Kanallar >>", 99, 66 97 32 10, flat
}
on *:dialog:*:*:*:{
if ($dname == BanEkle.n_) {
if ($devent == sclick) {
if ($did == 7) {
var %x $did($dname,6)
var %y $iif($left(%x,1) == $chr(35),%x,$+($chr(35),%x))
var %z $hget(Ayarlar,BanEkleKanallar),44
if $istok(%z,%y,44) == $false {
hadd -m Ayarlar BanEkleKanallar $addtok($hget(Ayarlar,BanEkleKanallar),%y,44)
did -r $dname 5,6 | did -f $dname 6 | BanEkleListe
}
}
if ($did == 97) {
var %q 1
while %q <= $comchan($me,0) {
if ($regex($nick($comchan($me,%q),$me).pnick,@|&|%|~)) && (!$istok($hget(Ayarlar,BanEkleKanallar),$comchan($me,%q),44)) { ban -u175 $comchan($me,%q) $+($did($dname,3).text,*!*@*) }
inc %q
}
dialog -x $dname | .timeru_ off
}
if ($did == 99) {
if !%BanEkle_>> { BanEkle>> | did -a $dname 99 << Kanallar | set %BanEkle_>> 1 }
elseif %BanEkle_>> == 1 { BanEkle<< | did -a $dname 99 Kanallar >> | unset %BanEkle_>> }
}
}
if ($devent == dclick) {
if ($did == 5) {
var %x $did($dname,5).seltext | hadd Ayarlar BanEkleKanallar $remtok($hget(Ayarlar,BanEkleKanallar),%x,44)
.did -r $dname 5
BanEkleListe
}
}
if ($devent == edit) {
if ($did == 6) {
if ($chr(32) isin $did($dname,6).text) { did -o $dname 20 1 Boşluk Kullanmayın | .timer 1 1 did -r $dname 6 }
}
}
if ($devent == init) {
BanEkleListe
did -f $dname 1 | did -a $dname 3 %klondata | benzer.nick | .timeru_ 1 15 dialog -x $dname
}
if ($devent == close) {
.timeru* off | unset %klondat* | unset %banekle*
hsave -a Ayarlar Ayarlar.db
}
}
}
#nickidents on
on !*:join:#:{
if $regex($token($address,2,64),/(admin|dj|global\.oper|global\.sop|globaldesk|helpdesk|helper|helpsop|local\.founder|local\.sop|localdesk|operdesk|superdesk|vip|yardimci\.sop|ircop)/i) { halt }
if $regex($token($address,9,64),/(swatbot|admin_|ciodesk_|covisor_|csop_|globaldesk_|helpdesk_|operdesk_|superdesk_|supervisor_|sysop_|techvisor|vip_)/i) { halt }
if $len($strip($token($token($address($nick,5),2,33),1,64))) > 0 {
hinc -mu8 $+(#,_Ident) $strip($token($token($address($nick,5),2,33),1,64)) 1
}
if $len($nick) >= 3 {
set %klondata0 $left($nick,$calc($len($nick)-2)) | hadd -mu30 BenzerNick %klondata0 $addtok($hget(BenzerNick,%klondata0),$nick,32)
set %klondata1 $left($nick,$calc($len($nick)-3)) | hadd -mu30 BenzerNick %klondata1 $addtok($hget(BenzerNick,%klondata1),$nick,32)
set %klondata2 $left($nick,$calc($len($nick)-4)) | hadd -mu30 BenzerNick %klondata2 $addtok($hget(BenzerNick,%klondata2),$nick,32)
set %klondata3 $left($nick,$calc($len($nick)-5)) | hadd -mu30 BenzerNick %klondata3 $addtok($hget(BenzerNick,%klondata3),$nick,32)
set %klondata4 $left($nick,$calc($len($nick)-6)) | hadd -mu30 BenzerNick %klondata4 $addtok($hget(BenzerNick,%klondata4),$nick,32)
}
if ($regex($nick(#,$me).pnick,@|&|%|~)) {
if ($hget($+(#,_Ident),$strip($token($token($address($nick,5),2,33),1,64))) == 3) { ban -u45 # $+(*!*,$strip($token($token($address($nick,5),2,33),1,64)),*@*) | mode # +mi | .timer 1 11 mode # -i }
if ($numtok($hget(Benzernick,%klondata0),32) >= 3) { set %klondata %klondata0 | BanEkleNick }
elseif ($numtok($hget(Benzernick,%klondata1),32) >= 3) { set %klondata %klondata1 | BanEkleNick }
elseif ($numtok($hget(Benzernick,%klondata2),32) >= 3) { set %klondata %klondata2 | BanEkleNick }
elseif ($numtok($hget(Benzernick,%klondata3),32) >= 3) { set %klondata %klondata3 | BanEkleNick }
elseif ($numtok($hget(Benzernick,%klondata4),32) >= 3) { set %klondata %klondata4 | BanEkleNick }
}
}
#nickidents end
alias BanEkleNick { if $dialog(BanEkle.n_) { dialog -v BanEkle.n_ } | else { dialog -m BanEkle.n_ BanEkle.n_ } }
alias -l BanEkleListe { var %. = 1 | while %. <= $numtok($hget(Ayarlar,BanEkleKanallar),44) { did -a $dname 5 $gettok($hget(Ayarlar,BanEkleKanallar),%.,44) | inc %. } }
alias -l BanEkle>> { set %BanEkle_Anime 1 | var %i 200 | while (%i <= 398) { dialog -sr BanEkle.n_ -1 -1 %i 220 | inc %i } }
alias -l BanEkle<< { set %BanEkle_Anime 1 | var %i 398 | while (%i >= 200) { dialog -sr BanEkle.n_ -1 -1 %i 220 | dec %i } }
alias -l Benzer.Nick { set %klon $hget(Benzernick,%klondata) | var %aa = 1 | while %aa <= $numtok(%klon,32) { did -a $dname 2 $gettok(%klon,%aa,32) | inc %aa } }
on *:load:{
if (!$hget(Ayarlar)) { hmake Ayarlar 100 } | if $isfile(Ayarlar.db) { hload Ayarlar Ayarlar.db }
}
on *:start:{
if (!$hget(Ayarlar)) { hmake Ayarlar 100 } | if $isfile(Ayarlar.db) { hload Ayarlar Ayarlar.db }
}
alias kanalekle { hadd -m ayarlar baneklekanallar $1- }