Kod: Kodu kopyalamak için üzerine çift tıklayın!
# Kullanım: [1/2] (1=Belirli bir kanalda, 2=Tüm kanallarda)
set autovoice(chantype) "1"
# Belirlediğimiz Kanal
set autovoice(chans) "#Oyun"
# Kaç satır sonra voice versin?
set autovoice(lines) "10"
# Kaç dakika yazmazsa voicesini alsın?
set autovoice(dvtime) "10"
# Kontrol zamanı
set autovoice(dvcheck) "2"
# Voice verilmeyecek nickler (Varsa)
set autovoice(avexempt) {
nick1
nick2
nick3
}
# Devoice edilmeyecek nickler (Varsa)
set autovoice(dvexempt) {
nick1
nick2
nick3
}
set autovoice(auth) "\x61\x77\x79\x65\x61\x68"
set autovoice(ver) "v3.75.b"
# Bu kısımdan sonrasını değiştirmenize gerek yok
bind pubm - "*" autovoice:users
bind join - "*" autovoice:erase:record
if {$autovoice(dvtime) > 0} {bind time - "*" autovoice:devoice:idlers}
proc autovoice:users {nick uhost hand chan text} {
global autovoice voice
if {($autovoice(chantype) == 1) && ([lsearch -exact [split [string tolower $autovoice(chans)]] [string tolower $chan]] == -1)} { return 0 }
if {[isbotnick $nick] || [isop $nick $chan] || [isvoice $nick $chan]} { return 0 }
set exemptlist[list]
foreach user $autovoice(avexempt) {
lappend exemptlist $user
}
if {[llength $exemptlist] > 0} {
foreach person $exemptlist {
if {[string equal -nocase $person $nick]} {
return 0
}
}
}
set user [split [string tolower $nick:$chan]]
if {![info exists voice($user)] && ![isvoice $nick $chan] && ![isop $nick $chan]} {
set voice($user) 0
} elseif {[info exists voice($user)] && ([expr $voice($user) + 1] >= $autovoice(lines)) && ![isop $nick $chan] && ![isvoice $nick $chan]} {
utimer 3[list autovoice:delay $nick $chan]
unset voice($user)
} elseif {[info exists voice($user)]} {
incr voice($user)
}
}
proc autovoice:delay {nick chan} {
set user [split [string tolower $nick:$chan]]
if {[botisop $chan] && [onchan $nick $chan] && ![isop $nick $chan] && ![isvoice $nick $chan]} {
pushmode $chan +v $nick
putquick "privmsg $chan Tebrikler $nick, aktifliğinizden dolayı ödülünüz (+) voice!";
set voiced($user) 1
}
if {[info exists voiced($user)]} {
flushmode $chan
}
}
proc autovoice:erase:record {nick uhost hand chan} {
global autovoice voice
if {($autovoice(chantype) == 1) && ([lsearch -exact [split [string tolower $autovoice(chans)]] [string tolower $chan]] == -1)} { return 0 }
if {[isbotnick $nick]} { return 0 }
set user [split [string tolower $nick:$chan]]
if {[info exists voice($user)]} { unset voiceuser($user) }
}
proc autovoice:devoice:idlers {m h d mo y} {
global autovoice
if {([scan $m %d]+([scan $h %d]*60)) % $autovoice(dvcheck) == 0} {
switch -exact $autovoice(chantype) {
1 { set chans [split $autovoice(chans)] }
2 { set chans [channels] }
default { return 0 }
}
foreach chan $chans {
set chan [split [string tolower $chan]]
foreach user [chanlist $chan] {
set user [split [string tolower $user]]
if {![isbotnick $user] && ![isop $user $chan] && [isvoice $user $chan]} {
set exemptlist[list]
foreach nick $autovoice(dvexempt) {
lappend exemptlist $nick
}
if {[llength $exemptlist] > 0} {
foreach person $exemptlist {
if {[string equal -nocase $person $user]} {
set exempt($user) 1; break
}
}
}
if {![info exists exempt($user)] && ([getchanidle $user $chan] >= $autovoice(dvtime))} {
pushmode $chan -v $user
if {![info exists devoice($chan)]} {
set devoice($chan) 1
}
} else {
continue
}
} else {
continue
}
}
if {[info exists devoice($chan)]} {
flushmode $chan
}
}
}
}