IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası
  sohbet

 Kayıt ol  Topluluk
1Beğeni(ler)

Yeni Konu aç Cevapla
 
LinkBack Seçenekler Stil
Alt 16 Aralık 2007, 21:41   #1
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Tcl Arşivi




Elimde Bulunan tcl dosyalarını sizinle paylaşmak istedim cogunuzun işini görür tabiki burda olanlarda vardır ama tek başlık altında coğu tcl dosyalarını bulacagınıza inanıyorum umarım bir faydamız dokunur.

Google Tcl

PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
package require http
bind pub 
- !ara pub:google
bind pub 
- !resim pub:image
bind pub 
- !dosya pub:file
set agent 
"Mozilla"
proc pub:google nick uhost handle channel arg } {
 global 
agent
 
if {[llength $arg]==0} {
  
putserv "PRIVMSG $channel :hey ! tappes des mots boulet !"
 
} else {
  
set query "
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #007700">for { 
set index 0 } { $index<[llength $arg] } { incr index } {
   
set query "$query[lindex $arg $index]"
   
if {$index<[llength $arg]-1then {
    
set query "$query+"
   
}
  }
  
#putserv "PRIVMSG $channel :$query"
                
set token [http::config -useragent $agent]
  
set token [http::geturl $query]
  
puts stderr ""
  
upvar #0 $token state
  
set max 0
  
foreach {name value$state(meta) {
   if {[
regexp -nocase ^location$name]} {
    
set newurl [string trim $value]
    
putserv "PRIVMSG $channel :$newurl"
   
}
  }
 }
}
proc pub:image nick uhost handle channel arg } {
 global 
agent
 
if {[llength $arg]==0} {
  
putserv "PRIVMSG $channel :hey ! tappes des mots boulet !"
 
} else {
  
set query "http://images.google.de/images?btnI=&q="
  
for { set index 0 } { $index<[llength $arg] } { incr index } {
   
set query "$query[lindex $arg $index]"
   
if {$index<[llength $arg]-1then {
    
set query "$query+"
   
}
  }
  
append query &imgsafe=off
 
# putserv "PRIVMSG $channel :$query"
                
set token [http::config -useragent $agent]
  
set token [http::geturl $query]
  
puts stderr ""
  
upvar #0 $token state
  
set max 0
  
foreach {name value$state(meta) {
   if {[
regexp -nocase ^location$name]} {
    
set starturl "http://"
    
set newurl [string trim $value]
    
set newurl [string range $newurl [expr [string first $newurl]+1] [expr [string first $newurl]-1]]
    
append starturl $newurl
    putserv 
"PRIVMSG $channel :$starturl"
   
}
  }
 }
}
proc pub:file nick uhost handle channel arg } {
 global 
agent
 
if {[llength $arg]==0} {
  
putserv "PRIVMSG $channel :hey ! tappes un nom de fichier boulet !"
 
} else {
  
set query "
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #0000BB">set query 
"$query[lindex $arg 0]"
 
# putserv "PRIVMSG $channel :$query"
                
set token [http::config -useragent $agent]
  
set token [http::geturl $query]
  
set html  [http::data $token]
  
puts stderr ""
  
upvar #0 $token state
  
set max 0
 
# foreach {name value} $state(meta) {
 #  putserv "PRIVMSG $channel :$value"
 # }
 # putserv "PRIVMSG $channel :$html"
  
set result "[lindex $html 1]"
  
set result [string range $result [expr [string first $result]+2] [expr [string first $result]-2]]
  
putserv "PRIVMSG $channel :$result"
 
}
}
putlog "Google v0.2.1 - LOADED!" 


 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları sohbet odaları Benimmekan Mobil Sohbet
Alt 16 Aralık 2007, 21:48   #2
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Tcl Arşivi




Radyo Tcl

PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
# config ##########################
 
 
 
set radiochans "#radyo" 
 
set adminchans "#radyo" 
 
set streamip "ip-adresiniz" 
 
set streamport "port" 
 
set streampass "şifreniz"
 
set scstatstrigger "!durum"
 
set scstreamtrigger "!adres"
 
set scplayingtrigger "!calan"
 
set sclistenertrigger "!dinleyici"
 
set scdjtrigger "!dj"
 
set scsetdjtrigger "!setdj"
 
set scunsetdjtrigger "!unsetdj"
 
set scwishtrigger "!istek"
 
set scgreettrigger "!karsılama"
 
set sclastsongstrigger "!son"
 
set schelptrigger "!yardım"
 
set alertadmin ""
 
set doalertadmin "1"
 
set announce "1"
 
set urltopic "1"
 
set ctodjc "1"
 
set tellsongs "1"
 
set tellusers "1"
 
set tellbitrate "0"
 
set advertise "1"
 
set advertiseonlyifonline "1"
 
set offlinetext "1Şu anda yayınımız kesilmiştir."
 
set offlinetopic "7-1Radyo şu anda radyo yayını aktif DEĞİLDİR! http://$streamip:$streamport/listen.pls"
 
set onlinetext "7-1Radyoda şu anda yayında Dj 12/sgenre/1 arkadaşımız var. Radyoyu dinlemek için 12http://$streamip:$streamport/listen.pls1 link adresine tıklayınız!"
 
set onlinetopic "7-1Radyo yayını şu anda 12AKTİF1. Radyoyu dinlemek için 12http://$streamip:$streamport/listen.pls1 link adresine tıklayınız!"
 
set streamtext "1Sizde Dinleyin! 2 /dj/ 4http://$streamip:$streamport/listen.pls"
 
set advertisetext "15-14- 1Radyo 12http://$streamip:$streamport/listen.pls 14-15-"
 
 
 
bind pub $scstatstrigger pub_scstat
 
bind msg 
$scstatstrigger msg_scstat
 
 
 
bind pub 
$scplayingtrigger pub_playing
 
bind msg 
$scplayingtrigger msg_playing
 
 
 
bind pub 
$scdjtrigger pub_dj
 
bind msg 
$scdjtrigger msg_dj
 
 
 
bind pub D $scsetdjtrigger pub_setdj
 
bind msg D $scsetdjtrigger msg_setdj
 
 
 
bind pub D $scunsetdjtrigger pub_unsetdj
 
bind msg D $scunsetdjtrigger msg_unsetdj
 
 
 
bind pub 
$scwishtrigger pub_wish
 
bind msg 
$scwishtrigger msg_wish
 
 
 
bind pub 
$scgreettrigger pub_greet
 
bind msg 
$scgreettrigger msg_greet
 
 
 
bind pub 
$scstreamtrigger pub_stream
 
bind msg 
$scstreamtrigger msg_stream
 
 
 
bind pub 
$sclastsongstrigger pub_lastsongs
 
bind msg 
$sclastsongstrigger msg_lastsongs
 
 
 
bind pub 
$sclistenertrigger pub_listener
 
bind msg 
$sclistenertrigger msg_listener
 
 
 
bind pub 
$schelptrigger pub_help
 
bind msg 
$schelptrigger msg_help
 
 
 
bind time 
"* * * * *" isonline
 
bind time 
"?0 * * * *" advertise
 
bind nick D 
djnickchange
 
 
 
set dj 
""
 
set surl "http://$streamip:$streamport/listen.pls"
 
set bitrate "48"
 
set stitle ""
 
 
 
if {[file exists dj]} {
 
set temp [open "dj" r]
 
set dj [gets $temp]
 
close $temp
 
}
 
 
 
proc shrink calc number string start bl} { return [expr [string first "$string$bl $start$calc $number] }
 
 
 
 
 
proc status { } {
 
global 
streamip streamport streampass
 
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
 
putlog "error: $sockerror"
 
return } else {
 
puts $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"
 
puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"
 
puts $sock "Host: $streamip"
 
puts $sock "Connection: close"
 
puts $sock ""
 
flush $sock
 
while {[eof $sock] != 1} {
 
set bl [gets $sock]
 
if { [
string first "standalone" $bl] != -} {
 
set streamstatus [string range $bl [shrink 14 "<STREAMSTATUS>" 0 $bl] [shrink "</STREAMSTATUS>" 0 $bl]]
 
}}
 
close $sock
 

 
if { 
$streamstatus == "1" } { return } else { return }
 
}
 
 
 
 
 
 
 
 
 
proc poststuff mode target targetname text } {
 
global 
radiochans dj
 
set curlist 
"0"
 
set curhigh "0"
 
set surl "http://$streamip:$streamport/listen.pls"
 
set cursong ""
 
set sgenre ""
 
set bitrate "48"
 
set stitle ""
 
 
 
set temp [open "isonline" r]
 
while {[
eof $temp] != 1} {
 
set zeile [gets $temp]
 
if {[
string first "curlist:" $zeile] != -} { set curlist $zeile }
 
if {[
string first "curhigh:" $zeile] != -} { set curhigh $zeile }
 
if {[
string first "cursong:" $zeile] != -} { set cursong [lrange $zeile 1 [llength $zeile]]] }
 
if {[
string first "sgenre:" $zeile] != -} { set sgenre [lrange $zeile 1 [llength $zeile]]}
 
if {[
string first "serverurl:" $zeile] != -} { set surl [lindex $zeile 1] }
 
if {[
string first "bitrate:" $zeile] != -} { set bitrate [lindex $zeile 1] }
 
if {[
string first "stitle:" $zeile] != -} { set stitle [lindex $zeile 1] }
 
}
 
close $temp
 
 
 
regsub 
-all "/stitle/" $text "$stitletext
 
regsub 
-all "/curlist/" $text "$curlisttext
 
regsub 
-all "/curhigh/" $text "$curhightext
 
regsub 
-all "/cursong/" $text "$cursongtext
 
regsub 
-all "/sgenre/" $text "$sgenretext
 
regsub 
-all "/surl/" $text "$surltext
 
regsub 
-all "/bitrate/" $text "$bitratetext
 
regsub 
-all "/dj/" $text "$djtext
 
 
 
if {$target == "chan"} {
 
foreach 
chan [channels] {
 
if {
$radiochans == "" } { putserv "$mode $chan :$text}
 
if {
$radiochans != "" } {
 
if {([
lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1)} {putserv "$mode $chan :$text"}
 
}}}
 
if {
$target == "nick"} { putserv "$mode $targetname :$text}
 
}
 
 
 
 
 
proc schelp target } {
 
global 
scstatstrigger scstreamtrigger scplayingtrigger scdjtrigger sclastsongstrigger scwishtrigger scgreettrigger sclistenertrigger
 
putserv 
"notice $target :Uygulayabileceginiz Komutlar Asagida listelenmistir:"
 
putserv "notice $target :$scstatstrigger - $scstreamtrigger - $scplayingtrigger - $sclastsongstrigger - $scwishtrigger - $sclistenertrigger"
 
putserv "notice $target :radyo"
 
}
 
 
 
proc pub_help {nick uhost hand chan arg} {
 
global 
radiochans
 
if {$radiochans == "" } { schelp $nick }
 
if {
$radiochans != "" } {
 
if {([
lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { schelp $nick}
 
}}
 
 
 
proc advertise nick uhost hand chan arg } {
 
global 
advertisetext advertise advertiseonlyifonline
 
if {$advertise == "1" && $advertiseonlyifonline == "0"} { poststuff privmsg chan none "$advertisetext}
 
if {
$advertise == "1" && $advertiseonlyifonline == "1" && [status] == 1} { poststuff privmsg chan none "$advertisetext}
 
}
 
 
 
 
 
proc setdj {nickname djnickname } {
 
global 
ctodjc onlinetopic
 
if {$djnickname == "" } { set djnickname $nickname }
 
global 
streamip streamport streampass dj 
 
putlog 
"shoutcast: new dj: $djnickname ($nickname)"
 
set temp [open "dj" w+]
 
puts $temp $djnickname
 
close $temp
 
set temp 
[open "djnick" w+]
 
puts $temp $nickname
 
close $temp
 
set dj $djnickname
 
if { [status] == "1" } { poststuff privmsg chan none "$djnickname is now rocking the turntables, enjoy."
 
if { $ctodjc == "1" } { poststuff topic chan none "$onlinetopic}
 
} else {
 
putserv "privmsg $nickname :Radyo şu anda kapalıdır." }
 
}
 
 
 
proc msg_setdj nick uhost hand arg } { setdj $nick $arg }
 
proc pub_setdj nick uhost hand chan arg } { global adminchans; if {([lsearch -exact [string tolower $adminchans] [string tolower $chan]] != -1) || ($adminchans == "")} { setdj $nick $arg }}
 
 
 
proc unsetdj nick } {
 
global 
dj onlinetopic ctodjc
 
file delete dj
 
set dj 
""
 
putserv "notice $nick :dj silindi."
 
if { [status] == "1" && $ctodjc == "1" } { poststuff topic chan none "$onlinetopic}
 
}
 
 
 
proc msg_unsetdj nick uhost hand arg } { unsetdj $nick }
 
proc pub_unsetdj nick uhost hand chan arg } { global adminchans; if {([lsearch -exact [string tolower $adminchans] [string tolower $chan]] != -1) || ($adminchans == "")} { unsetdj $nick }}
 
 
 
proc listener target } {
 
global 
streamip streamport streampass
 
putlog 
"shoutcast: $target requested listener count"
 
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
 
putlog "error: $sockerror"
 
return } else {
 
puts $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"
 
puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"
 
puts $sock "Host: $streamip"
 
puts $sock "Connection: close"
 
puts $sock ""
 
flush $sock
 
while {[eof $sock] != 1} {
 
set bl [gets $sock]
 
if { [
string first "standalone" $bl] != -} {
 
set repl [string range $bl [shrink 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink "</REPORTEDLISTENERS>" 0 $bl]]
 
set curhigh [string range $bl [shrink 15 "<PEAKLISTENERS>" 0 $bl] [shrink "</PEAKLISTENERS>" 0 $bl]]
 
set maxl [string range $bl [shrink 14 "<MAXLISTENERS>" 0 $bl] [shrink "</MAXLISTENERS>" 0 $bl]]
 
set avgtime [string range $bl [shrink 13 "<AVERAGETIME>" 0 $bl] [shrink "</AVERAGETIME>" 0 $bl]]
 
}}
 
close $sock
 
putserv 
"notice $target :1Şu anda radyo yayınımızı $repl kişi dinlemektedir. En fazla dinleyici sayısı $maxl rakamına ulaşmıştır."
 
}}
 
 
 
proc msg_listener nick uhost hand arg } { listener $nick }
 
proc pub_listener nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { listener $nick }}
 
 
 
proc wish nick arg } {
 
if {
$arg == ""} { putserv "notice $nick :you forgot to add your wish"; return 0}
 
if { [
status] == "1" } { 
 
set temp [open "djnick" r]
 
set djnick [gets $temp]
 
close $temp
 
putserv 
"privmsg $djnick WISH) - $nick - $arg"
 
} else {
 
putserv "notice $nick :Üzgünüm, şu anda radyo yayını aktif değil." }
 
}
 
 
 
 
 
proc msg_wish nick uhost hand arg } { wish $nick $arg }
 
proc pub_wish nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { wish $nick $arg }}
 
 
 
proc sclastsongs target } {
 
global 
streamip streamport streampass
 
putlog 
"shoutcast: $target requested songhistory"
 
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
 
putlog "error: $sockerror"
 
return } else {
 
puts $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"
 
puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"
 
puts $sock "Host: $streamip"
 
puts $sock "Connection: close"
 
puts $sock ""
 
flush $sock
 
while {[eof $sock] != 1} {
 
set bl [gets $sock]
 
if { [
string first "standalone" $bl] != -} {
 
set songs [string range $bl [string first "<TITLE>" $bl] [expr [string last "</TITLE>" $bl] + 7]]
 
 
 
regsub -all "&#x3C;" $songs "<" songs
 
regsub 
-all "&#x3E;" $songs ">" songs
 
regsub 
-all "&#x26;" $songs "+" songs
 
regsub 
-all "&#x22;" $songs "\"" songs
 
regsub 
-all "&#x27;" $songs "'" songs
 
regsub 
-all "&#xFF;" $songs "" songs
 
regsub 
-all "<TITLE>" $songs "(" songs
 
regsub 
-all "</TITLE>" $songs ")" songs
 
regsub 
-all "<SONG>" $songs "" songs
 
regsub 
-all "</SONG>" $songs " - " songs
 
regsub 
-all "<PLAYEDAT>" $songs "" songs
 
regsub 
-all "</PLAYEDAT>" $songs "" songs
 
regsub 
-all {\d$songs "" songs
 
 
 
regsub 
-all "&#xB4;" $songs "´" songs
 
regsub 
-all "&#x96;" $songs "-" songs
 
regsub 
-all "&#xF6;" $songs "ö" songs
 
regsub 
-all "&#xE4;" $songs "ä" songs
 
regsub 
-all "&#xFC;" $songs "ü" songs
 
regsub 
-all "&#xD6;" $songs "Ö" songs
 
regsub 
-all "&#xC4;" $songs "Ä" songs
 
regsub 
-all "&#xDC;" $songs "Ü" songs
 
regsub 
-all "&#xDF;" $songs "ß" songs
 
 
 
 
 
 
 
}}
 
close $sock
 
putserv 
"notice $target :$songs"
 
}}
 
 
 
 
 
proc msg_lastsongs nick uhost hand arg } { sclastsongs $nick }
 
proc pub_lastsongs nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { sclastsongs $nick }}
 
 
 
proc scstream target } {
 
global 
streamip streamport streamtext
 
putlog 
"shoutcast: streaminfo requested by $target"
 
poststuff notice nick $target $streamtext
 
}
 
 
 
proc msg_stream nick uhost hand arg } { scstream $nick }
 
proc pub_stream nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstream $nick }}
 
 
 
proc scgreet nick arg } {
 
if {
$arg == ""} { putserv "notice $nick :7-1Radyo yayını şu anda 12AKTİF1. Radyoyu dinlemek için 12http://$streamip:$streamport/listen.pls1 link adresine tıklayınız!"; return 0}
 
if { [
status] == "1" } { 
 
set temp [open "djnick" r]
 
set djnick [gets $temp]
 
close $temp
 
putserv 
"privmsg $djnick GREET) - $nick - $arg"
 
} else {
 
putserv "notice $nick :Üzgünüm, şu anda radyo yayını aktif değil." }
 
}
 
 
 
 
 
proc msg_greet nick uhost hand arg } { scgreet $nick $arg }
 
proc pub_greet nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scgreet $nick $arg }}
 
 
 
 
 
proc djnickchange oldnick uhost hand chan newnick } {
 
set temp [open "djnick" r]
 
set djnick [gets $temp]
 
close $temp
 
if {$oldnick == $djnick} {
 
putlog "shoutcast: dj nickchange $oldnick -> $newnick"
 
set temp [open "djnick" w+]
 
puts $temp $newnick
 
close $temp
 
}}
 
 
 
 
 
proc dj target } {
 
global 
streamip streamport streampass dj
 
putlog 
"shoutcast: $target asked for dj info" 
 
if {[status] == 1} {
 
if {[
file exists dj]} {
 
set temp [open "dj" r]
 
set dj [gets $temp]
 
close $temp
 
putserv 
"notice $target :$dj Şu anda Yayında!"
 
} else { putserv "notice $target :Dj Adı Bulunamadı." }
 
} else { 
putserv "notice $target :Şu anda radyo aktif değildir." }
 
}
 
 
 
 
 
 
 
proc msg_dj nick uhost hand arg } { dj $nick"}
 
proc pub_dj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower 
$radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { dj $nick }}
 
 
 
 
 
 
 
proc scstat {target} {
 
global streamip streamport streampass
 
putlog "
shoutcast$target asked for serverstats"
 
if {[catch {set sock [socket 
$streamip $streamport] } sockerror]} {
 
putlog "
error$sockerror"
 
return 0 } else {
 
puts 
$sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"
 
puts 
$sock "User-AgentMozilla/5.0 (X11ULinux i686en-USrv:0.9.9)"
 
puts 
$sock "Host$streamip"
 
puts 
$sock "Connectionclose"
 
puts 
$sock ""
 
flush 
$sock
 
while {[eof 
$sock] != 1} {
 
set bl [gets 
$sock]
 
if { [string first "
standalone$bl] != -1 } {
 
set streamstatus [string range 
$bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]
 
set repl [string range 
$bl [shrink + 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink - 1 "</REPORTEDLISTENERS>" 0 $bl]]
 
set curhigh [string range 
$bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]
 
set currentl [string range 
$bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]
 
set surl [string range 
$bl [shrink + 11 "<SERVERURL>" 0 $bl] [shrink - 1 "</SERVERURL>" 0 $bl]]
 
set maxl [string range 
$bl [shrink + 14 "<MAXLISTENERS>" 0 $bl] [shrink - 1 "</MAXLISTENERS>" 0 $bl]]
 
set bitrate [string range 
$bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]
 
set stitle [string range 
$bl [shrink + 13 "<SERVERTITLE>" 0 $bl] [shrink - 1 "</SERVERTITLE>" 0 $bl]]
 
set sgenre [string range 
$bl [shrink + 13 "<SERVERGENRE>" 0 $bl] [shrink - 1 "</SERVERGENRE>" 0 $bl]]
 
if 
{$sgenre != ""} {set sgenre " ($sgenre)"}
 
set avgtime [string range 
$bl [shrink + 13 "<AVERAGETIME>" 0 $bl] [shrink - 1 "</AVERAGETIME>" 0 $bl]]
 
set irc [string range 
$bl [shrink + 5 "<IRC>" 0 $bl] [shrink - 1 "</IRC>" 0 $bl]]
 
set icq [string range 
$bl [shrink + 5 "<ICQ>" 0 $bl] [shrink - 1 "</ICQ>" 0 $bl]]
 
if 
{$icq == 0} { set icq "N/A" }
 
set aim [string range 
$bl [shrink + 5 "<AIM>" 0 $bl] [shrink - 1 "</AIM>" 0 $bl]]
 
set webhits [string range 
$bl [shrink + 9 "<WEBHITS>" 0 $bl] [shrink - 1 "</WEBHITS>" 0 $bl]]
 
set streamhits [string range 
$bl [shrink + 12 "<STREAMHITS>" 0 $bl] [shrink - 1 "</STREAMHITS>" 0 $bl]]
 
set version [string range 
$bl [shrink + 9 "<VERSION>" 0 $bl] [shrink - 1 "</VERSION>" 0 $bl]]
 
if 
{$streamstatus == 1} {
 
if {[file exists dj]} {
 
set temp [open "
dj" r]
 
set dj [gets 
$temp]
 
close 
$temp
 
} else { set dj "
none" }
 
putserv "
notice $target :$stitle$sgenre yayındaVersion$version Yayın Kalitesi$bitrate kbps DJ$sgenre Yayını Dinlemek için tıklayınızhttp://$streamip:$streamport/listen.pls"
 
} else {
 
putserv "notice $target :$stitle$sgenre yayında değildir.. Version: $version Son Yayın Kalitesi: $bitrate kbps Son Yayın Adresi : $surl}
 
putserv "notice $target :1Şu anda radyo yayınımızı $repl kişi dinlemektedir. En fazla dinleyici sayısı $maxl rakamına ulaşmıştır."
 
putserv "notice $target :Ortalama Dinlenme Suresi : $avgtime sn, Web Hit : $webhits Dinlenme Hit : $streamhits "
 
putserv "notice $target :radyo rotasız, rotasız radyonuz!"
 
}}
 
close $sock
 
}}
 
 
 
 
 
proc msg_scstat nick uhost hand arg } { scstat $nick}
 
proc pub_scstat nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstat $nick }}
 
 
 
 
 
proc playing {target} {
 
global 
streamip streamport streampass dj
 
putlog 
"shoutcast: $target asked for current song"
 
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
 
putlog "error: $sockerror"
 
return } else {
 
puts $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"
 
puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"
 
puts $sock "Host: $streamip"
 
puts $sock "Connection: close"
 
puts $sock ""
 
flush $sock
 
while {[eof $sock] != 1} {
 
set bl [gets $sock]
 
if { [
string first "standalone" $bl] != -} {
 
set streamstatus [string range $bl [shrink 14 "<STREAMSTATUS>" 0 $bl] [shrink "</STREAMSTATUS>" 0 $bl]]
 
set songtitle [string range $bl [shrink 11 "<SONGTITLE" 0 $bl] [shrink "</SONGTITLE>" 0 $bl]]
 
set songurl [string range $bl [shrink "<SONGURL>" 0 $bl] [shrink "</SONGURL>" 0 $bl]]
 
if {
$songurl != ""} { set songurl " ($songurl)"}
 
regsub -all "&#x3C;" $songtitle "<" songtitle
 
regsub 
-all "&#x3E;" $songtitle ">" songtitle
 
regsub 
-all "&#x26;" $songtitle "+" songtitle 
 
regsub 
-all "&#x22;" $songtitle "\"" songtitle
 
regsub 
-all "&#x27;" $songtitle "'" songtitle
 
regsub 
-all "&#xFF;" $songtitle "" songtitle
 
regsub 
-all "&#xB4;" $songtitle "´" songtitle
 
regsub 
-all "&#x96;" $songtitle "-" songtitle
 
regsub 
-all "&#xF6;" $songtitle "ö" songtitle
 
regsub 
-all "&#xE4;" $songtitle "ä" songtitle
 
regsub 
-all "&#xFC;" $songtitle "ü" songtitle
 
regsub 
-all "&#xD6;" $songtitle "Ö" songtitle
 
regsub 
-all "&#xC4;" $songtitle "Ä" songtitle
 
regsub 
-all "&#xDC;" $songtitle "Ü" songtitle
 
regsub 
-all "&#xDF;" $songtitle "ß" songtitle
 
 
 
if {$streamstatus == 1} {
 
putserv "notice $target :1Şu anda çalan şarkı: $songtitle$songurl"
 
} else {
 
putserv "notice $target :1Şu anda yayında dj yok!"
 
}}}
 
close $sock
 
}}
 
 
 
proc msg_playing nick uhost hand arg } { playing $nick}
 
proc pub_playing nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { playing $nick }}
 
 
 
 
 
 
 
proc isonline nick uhost hand chan arg } {
 
global 
radiochans announce tellusers tellsongs tellbitrate urltopic dj
 
global offlinetext offlinetopic onlinetext onlinetopic
 
global streamip streampass streamport dj
 
global doalertadmin alertadmin
 
 
 
if {$announce == || $tellsongs == || $tellusers == || $tellbitrate == 1} {
 
set isonlinefile "isonline"
 
set oldisonline "isonline: 0"
 
set oldcurlist "curlist: 0"
 
set oldcurhigh "curhigh: 0"
 
set oldsong "cursong: 0"
 
set oldbitrate "bitrate: 0"
 
if {[file exists $isonlinefile]} {
 
putlog "shoutcast: checking if stream is online"
 
set temp [open "isonline" r]
 
while {[
eof $temp] != 1} {
 
set zeile [gets $temp]
 
if {[
string first "isonline:" $zeile] != -} { set oldisonline $zeile }
 
if {[
string first "curlist:" $zeile] != -} { set oldcurlist $zeile }
 
if {[
string first "curhigh:" $zeile] != -} { set oldcurhigh $zeile }
 
if {[
string first "cursong:" $zeile] != -} { set oldsong $zeile }
 
if {[
string first "bitrate:" $zeile] != -} { set oldbitrate $zeile }
 
}
 
close $temp
 
}
 
 
 
 
 
if {[catch {
set sock [socket $streamip $streamport] } sockerror]} {
 
putlog "error: $sockerror"
 
return 0} else {
 
puts $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"
 
puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"
 
puts $sock "Host: $streamip"
 
puts $sock "Connection: close"
 
puts $sock ""
 
flush $sock
 
while {[eof $sock] != 1} {
 
set bl [gets $sock]
 
if { [
string first "standalone" $bl] != -} {
 
set streamstatus "isonline: [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]"
 
set repl "curlist: [string range $bl [shrink + 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink - 1 "</REPORTEDLISTENERS>" 0 $bl]]"
 
set curhigh "curhigh: [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]"
 
set currentl [string range $bl [shrink 18 "<CURRENTLISTENERS>" 0 $bl] [shrink "</CURRENTLISTENERS>" 0 $bl]]
 
set surl "serverurl: [string range $bl [shrink + 11 "<SERVERURL>" 0 $bl] [shrink - 1 "</SERVERURL>" 0 $bl]]"
 
set cursong "cursong: [string range $bl [shrink + 11 "<SONGTITLE" 0 $bl] [shrink - 1 "</SONGTITLE>" 0 $bl]]"
 
set songurl [string range $bl [shrink "<SONGURL>" 0 $bl] [shrink "</SONGURL>" 0 $bl]]
 
set bitrate "bitrate: [string range $bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]"
 
set stitle "stitle: [string range $bl [shrink + 13 "<SERVERTITLE>" 0 $bl] [shrink - 1 "</SERVERTITLE>" 0 $bl]]"
 
set sgenre "sgenre: [string range $bl [shrink + 13 "<SERVERGENRE>" 0 $bl] [shrink - 1 "</SERVERGENRE>" 0 $bl]]"
 
}}
 
close $sock
 
}
 
 
 
set temp [open "isonline" w+]
 
puts $temp "$streamstatus\n$repl\n$curhigh\n$cursong\n$bitrate \n$stitle\n$sgenre\n$surl"
 
close $temp
 
if {$announce == } {
 
if {
$streamstatus == "isonline: 0" && $oldisonline == "isonline: 1"} {
 
poststuff privmsg chan none $offlinetext
 
if {$doalertadmin == "1"} { sendnote domsen $alertadmin "radio is now offline" }
 
if {
$urltopic == 1} { poststuff topic chan none $offlinetopic }
 
}
 
if {
$streamstatus == "isonline: 1" && $oldisonline == "isonline: 0" } {
 
if {
$sgenre != ""} {
 
set sgenre " ([lrange $sgenre 1 [llength $sgenre]] )"
 
}
 
poststuff privmsg chan none "$onlinetext"
 
if {$urltopic == 1} { poststuff topic chan none "$onlinetopic}
 
}}
 
if {(
$tellusers == 1) && ($streamstatus == "isonline: 1") && ($oldcurhigh != "curhigh: 0") } {
 
if {
$oldcurhigh != $curhigh} {
 
poststuff privmsg chan none "new listener peak: [lindex $curhigh 1]"
 
}
 
if {
$oldcurlist != $repl} {
 
poststuff privmsg chan none "1Şu anda radyo rotasızı ($currentl) kişi dinlemektedir."
 
}}
 
if {(
$tellsongs == 1) && ($oldsong != $cursong) && ($streamstatus == "isonline: 1") } {
 
if {
$songurl != ""} { set songurl " ($songurl)"}
 
regsub -all "&#x3C;" $cursong "<" cursong
 
regsub 
-all "&#x3E;" $cursong ">" cursong
 
regsub 
-all "&#x26;" $cursong "+" cursong 
 
regsub 
-all "&#x22;" $cursong "\"" cursong
 
regsub 
-all "&#x27;" $cursong "'" cursong
 
regsub 
-all "&#xFF;" $cursong "" cursong
 
regsub 
-all "&#xB4;" $cursong "´" cursong
 
regsub 
-all "&#x96;" $cursong "-" cursong
 
regsub 
-all "&#xF6;" $cursong "ö" cursong
 
regsub 
-all "&#xE4;" $cursong "ä" cursong
 
regsub 
-all "&#xFC;" $cursong "ü" cursong
 
regsub 
-all "&#xD6;" $cursong "Ö" cursong
 
regsub 
-all "&#xC4;" $cursong "Ä" cursong
 
regsub 
-all "&#xDC;" $cursong "Ü" cursong
 
regsub 
-all "&#xDF;" $cursong "ß" cursong
 
putlog $cursong
 
poststuff privmsg chan none 
"7-1Yayın Yapan DJ:12 /sgenre/ 1Sıradaki Parça:12  [lrange $cursong 1 [llength $cursong]]$songurl 1Radyoyu dinlemek için 12http://$streamip:$streamport/listen.pls 1 link adresine tıklayınız!"
 
}
 
 
 
if {(
$tellbitrate == 1) && ($oldbitrate != $bitrate) && ($streamstatus == "isonline: 1") && ($oldbitrate != "bitrate: 0")} {
 
poststuff privmsg chan none "7-1Radyo yayını şu anda 12AKTİF1. Radyoyu dinlemek için 12http://$streamip:$streamport/listen.pls1 link adresine tıklayınız!"
 
}}} 


 
Alıntı ile Cevapla

Alt 16 Aralık 2007, 21:51   #3
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Tcl Arşivi




Bad Nick

PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
###############################################################################
########### Bad nick Protection by Prince_of_the_net ############
###############################################################################
#While I am in my channel I have seen quite a few people joining with irrtating
#or offensive nicks.This script will teach thoes lamers a lesson by kicking and
#optionally banning them.Like my other scripts,you need to load my counter
#script (counter.tcl,available at 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #0000BB">set bnick 
{
"*fuck*" 
"*rape*" 
"*fuk*" 
"*badwa" 
"*phudi*" 
"*fudi" 
"*pussy*" 
"*boobs*" 
"*porn*" 
"*p0rn*"
}
#Set this to the time for which you would like to place a bad nick host on ban.
#0 makes the ban permanent.(Not recommended)
set bnick_bantime 30
#Set this to the time after which you would like to reset the timer for the
#bad nick.
set bnick_reset 60
#Set this to the number of times you want to warn before you would like to
#place ban.0 gives no warnings.
set bnick_warnings 1
#Set this to the reason to be given while kicking the offender the first time.
set bnick_kick "Your nick offends me.Change it and come back."
#Set this to the reason while banning the user after bnick_warnings have expired
set bnick_ban "I think I told you to change ur nick.Now we don't need you."
# How do you want it to mask a ban? Default == 2
# 0 - *!user@host.domain
# 1 - *!*user@host.domain
# 2 - *!*@host.domain
# 3 - *!*user@*.domain
# 4 - *!*@*.domain
# 5 - nick!user@host.domain
# 6 - nick!*user@host.domain
# 7 - nick!*@host.domain
# 8 - nick!*user@*.domain
# 9 - nick!*@*.domain
# You can also specify a type of 10 to 19 which correspond to masks 0 to 9, but
# instead of using a * wildcard to replace portions of the host.domain, it uses ?
# wildcards to replace the numbers in the address.
set bnick_ban_type 12
###############################################################################
## You can edit below this but dont mail me if things start acting weird :Ş ##
###############################################################################
bind join - * bnick:check
bind nick 
- * bnick:check
proc bnick
:check {nick uhost hand chan {newnick ""}} {
global 
logo bnicks bnick_bantime bnick bnick_reset bnick_warnings bnick_kick bnick_ban bnick_ban_type
if {$newnick == ""} {set newnick $nick}
foreach 
bword [split $bnick "\n"] { 
if {[
regexp -nocase $bword $newnick] && [botisop $chan]} {
if {![
info exists bnicks($uhost)]} {
set bnicks($uhost1
putkick $chan $newnick 
"$bnick_kick [count_update 0] $logo"
timer $bnick_reset "unset bnicks($uhost)"
putlog "Warned and kicked $newnick on $chan for using bad nicks."
puthelp "NOTICE $newnick :Change your nick before you come to $chan.The next time I catch you using bad nicks, I will ban you. $logo"
} {
if {
$bnicks($uhost) < $bnick_warnings} {
incr bnicks($uhost)
bnick:resettimer "bnicks($uhost)"
timer $bnick_reset "unset bnicks($uhost)"
putkick $chan $newnick "Warning $bnicks($uhost) for using bad nicks.Be careful I am watching you... [count_update 0] $logo"
puthelp "NOTICE $newnick :Join $chan with a bad nick for [expr $bnick_warnings - $bnick($uhost)] more time(s) and I will make sure you will join no more. $logo"
putlog "Warning $bnick($uhost) for $newnick on $chan for using bad nicks."
} {
unset 
bnicks($uhost)
bnick:resettimer "bnicks($uhost)"
newchanban $chan [bnick:masktype $nick!$uhost $bnick_ban_type"Bad Nick Protection" "$bnick_ban [count_update 1] $logo$$bnick_bantime
putkick $chan $newnick 
"$bnick_ban [count_update 1] $logo"
}
}
}
}
}
proc bnick:resettimer {reset} {
foreach 
time_check [string tolower [timers]] {
if {[
string match *$reset$time_check]} {killtimer [lindex [split $time_checkend]}
}
}
proc bnick:replace {string subs} {
if {[
llength $subs] == "1"} {set subs [lindex $subs 0]}
for {
set i 0} {[lindex $subs $i] != ""} {incr i 2} {
regsub -all -- [lindex $subs $i$string [lindex $subs [expr $i+1]] string
} ; return $string
}
proc bnick:masktype {uhost type} {
if {![
string match "*!*@*.*" $uhost]} {
set nick [lindex [split $uhost "!"0] ; set uhost "$nick![getchanhost $nick]"
if {$uhost == "$nick!"} {set type "return_nothing"}
}
switch -
exact $type {
{set ban "*[string range $uhost [string first ! $uhost] e]"}
{set ban "*!*[string trimleft [string range $uhost [expr [string first ! $uhost]+1] e] "~"]"}
{set ban "*!*[string range $uhost [string first @ $uhost] e]"}
{
set ident [string range $uhost [expr [string first $uhost]+1] [expr [string last $uhost]-1]]
set ban "*!*[string trimleft $ident "~"][string range [maskhost $uhost] [string first @ [maskhost $uhost]] e]"
}
{set ban "*!*[string range [maskhost $uhost] [string last "@" [maskhost $uhost]] e]"}
{set ban $uhost}
{
set nick [string range $uhost 0 [expr [string first "!" $uhost]-1]]
set ident [string range $uhost [expr [string first "!" $uhost]+1] [expr [string last "@" $uhost]-1]]
set ban "$nick!*[string trimleft $ident "~"][string range $uhost [string last "@$uhost] e]"
}
{
set nick [string range $uhost 0 [expr [string first "!" $uhost]-1]]
set ban "$nick!*[string range $uhost [string last "@$uhost] e]"
}
{
set nick [string range $uhost 0 [expr [string first "!" $uhost]-1]]
set ident [string range $uhost [expr [string first "!" $uhost]+1] [expr [string last "@" $uhost]-1]]
set ban "$nick!*[string trimleft $ident "~"][string range [maskhost $uhost] [string last "@" [maskhost $uhost]] e]"
}
{
set nick [string range $uhost 0 [expr [string first "!" $uhost]-1]]
set ban "$nick!*[string range [maskhost $uhost] [string last "@" [maskhost $uhost]] e]"
}
10 {
set host [string range $uhost [string last "@" $uhoste]
if {[
bnick:findip [string range $host 1 e]] == "0"} {
set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]
set ident [string range $uhost [expr [string first "!" $uhost]+1] [expr [string last "@" $uhost]-1]]
set ban "*!$ident$host"
} {set ban [bnick:masktype $uhost 0]}
}
11 {
set host [string range $uhost [string last "@" $uhoste]
if {[
bnick:findip [string range $host 1 e]] == "0"} {
set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]
set ident [string range $uhost [expr [string first "!" $uhost]+1] [expr [string last "@" $uhost]-1]]
set ban "*!*[string trimleft $ident "~"]$host"
} {set ban [bnick:masktype $uhost 1]}
}
12 {
set host [string range $uhost [string last "@" $uhoste]
if {[
bnick:findip [string range $host 1 e]] == "0"} {
set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]
set ban "*!*$host"
} {set ban [bnick:masktype $uhost 2]}
}
13 {
set host [string range $uhost [string last "@" $uhoste]
if {[
bnick:findip [string range $host 1 e]] == "0"} {set ban [bnick:masktype $uhost 11]} {set ban [bnick:masktype $uhost 3]}
}
14 {
set host [string range $uhost [string last "@" $uhoste]
if {[
bnick:findip [string range $host 1 e]] == "0"} {set ban [bnick:masktype $uhost 12]} {set ban [bnick:masktype $uhost 4]}
}
15 {
set host [string range $uhost [string last "@" $uhoste]
if {[
bnick:findip [string range $host 1 e]] == "0"} {
set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]
set rest [string range $uhost 0 [expr [string last "@" $uhost]-1]]
set ban $rest$host
} {set ban [bnick:masktype $uhost 5]}
}
16 {
set host [string range $uhost [string last "@" $uhoste]
if {[
bnick:findip [string range $host 1 e]] == "0"} {
set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]
set rest "[string range $uhost 0 [expr [string first "!$uhost]-1]]!*[string trimleft [string range $uhost [expr [string first "!$uhost]+1] [expr [string last "@$uhost]-1]] "~"]"
set ban $rest$host
} {set ban [bnick:masktype $uhost 6]}
}
17 {
set host [string range $uhost [string last "@" $uhoste]
if {[
bnick:findip [string range $host 1 e]] == "0"} {
set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]
set rest "[string range $uhost 0 [expr [string first "!$uhost]-1]]!*"
set ban $rest$host 
} {set ban [bnick:masktype $uhost 7]}
}
18 {
set host [string range $uhost [string last "@" $uhoste]
if {[
bnick:findip [string range $host 1 e]] == "0"} {set ban [bnick:masktype $uhost 16]} {set ban [bnick:masktype $uhost 8]}
}
19 {
set host [string range $uhost [string last "@" $uhoste]
if {[
bnick:findip [string range $host 1 e]] == "0"} {set ban [bnick:masktype $uhost 17]} {set ban [bnick:masktype $uhost 9]}
}
return_nothing {set ban ""}
default {
set ban "*!*[string range $uhost [string first "@$uhost] e]"}
}
set _nick [lindex [split $ban !] 0]
set _ident [string range $ban [expr [string first $ban]+1] [expr [string last $ban]-1]]
set _host [string range $ban [expr [string last $ban]+1e]
if {
$_ident != [set temp [string range $_ident [expr [string length $_ident]-9e]]} {
set _ident *[string trimleft $temp *]
}
if {
$_host != [set temp [string range $_host [expr [string length $_host]-63e]]} {
set _host *[string trimleft $temp *]
} ; return 
$_nick!$_ident@$_host
}
proc bnick:findip {args} {
catch {unset 
bnick_found_ip}
if {![
string match *.*.*.* $args]} {return 0}
foreach 
arg $args {
if {[
string match *.*.*.* $arg]} {
set bnick_testa [split $arg "."] ; set i 0
while {[llength $bnick_testa] != $i} {
set bnick_test [lrange $bnick_testa $i end]
if {[
string length [lindex $bnick_test 1]]<&& [string length [lindex $bnick_test 2]]<4} {
if {[
lindex $bnick_test 1] < 256 && [lindex $bnick_test 2] < 256 && [lindex $bnick_test 1] >= && [lindex $bnick_test 2] >= 0} {
set first "abcdefghi"
if {[string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 1]] <= && [string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 1]] >= 0} {
set first [string range [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 1end]
if {[
string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 2]] <= && [string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 2]] >= 0} {
set first [string range [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 2end]
if {[
string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 3]] <= && [string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 3]] >= 0} {
set first [string range [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 3end]
}
}
}
set second [lindex $bnick_test 1] ; set third [lindex $bnick_test 2] ; set fourth "abcdefghi"
if {[string index [lindex $bnick_test 30] <= && [string index [lindex $bnick_test 30] >= 0} {
set fourth [string index [lindex $bnick_test 30]
if {[
string index [lindex $bnick_test 31] <= && [string index [lindex $bnick_test 31] >= 0} {
set fourth $fourth[string index [lindex $bnick_test 31]
if {[
string index [lindex $bnick_test 32] <= && [string index [lindex $bnick_test 32] >= 0} {
set fourth $fourth[string index [lindex $bnick_test 32]
}
}
}
if {(
$first 256) && ($second 256) && ($third 256) &&
(
$fourth 256) && ($first 0) && ($second 0) &&
(
$third 0) && ($fourth 0) && ([string index $first 0] > 0) &&
([
string index $second 0] > 0) && ([string index $third 0] > 0) &&
([
string index $fourth 0] > 0)} {
if {[
info exists bnick_found_ip]} {
set bnick_found_ip "$bnick_found_ip $first.$second.$third.$fourth"
} {set bnick_found_ip $first.$second.$third.$fourth}
}
}
} ; 
incr i +1
}
}
} ; if {[
info exists bnick_found_ip]} {return $bnick_found_ip} {return 0}
}
putlog "Bad nick control v3.0 by \002Prince_of_the_net\002 \[Loaded\]"
###############################################################################
######################## END OF SCRIPT ##########################
############################################################################### 


 
Alıntı ile Cevapla

Alt 16 Aralık 2007, 21:52   #4
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Tcl Arşivi




Bad İdent

PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
# $Id: badident.tcl, eggdrop-1.6.x 2004/5 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
 Exp $
# Begin - Unacceptable User Ident, Bad Ident Kicker Script v1.65.b
# Script Version: 1.65.b
# Built Date: January 2004, Last Updated: 31st May 2004
# Copyright © 1999-2004 awyeah (
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
)
# TCL script was designed to use with eggdrop v1.5.x or higher
#########################################################################
#             Bad Ident Kicker Script v1.65.b               #
#                                # 
#                                  #
# Author: awyeah                     31st May 2004 #
# Email: 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
             Build version 1.65.b #
# Copyright © 2004 awyeah All Rights Reserved  
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #0000BB">set badidentchans 
"#mychannel"
#Set the *bad words* for the script to react on. 
#When users join a channel this script is activated 
#and their idents match this current world list, 
#they will be kicked/banned. (wildcards "*" are accepted)
#(Set/edit these words according to your needs)
#(I have already added some as examples)
set badidents {
"asshole"
"bitch"
"slut"
"cock"
"cunt"
"nigger"
"dickhead"
"hot*guy"
"faggot"
"prostitute"
"whore"
"lesbian"
"naked"
"xxx"
"horny"
"orgasm"
"bastard"
"hooker"
"rapist"
"orgy"
"penis"
"vagina"
"clit"
"cyber***"
"lesbian"
"prick"
"masturbate"
"masturbation"
"jackoff"
"blowjob"
"bigcock"
"bigdick"
"wetpussy"
"blow*job"
"superbitch"
"fuckwit"
"dumbfuck"
"fucknut"
"bi***ual"
"tran***ual"
"transvestite"
"homo***ual"
"lesbi"
"testicle"
"***ual"
"asswipe"
"jackass"
"dumbass"
"intercourse"
"clitoris"
"incest"
"nigga"
"nigger"
"molest"
"breast"
"boobs"
"fuck"
"fuckers"
"fucking"
"***ual"
"*****"
"condom"
"erect"
"erection"
"phuck"
"masturbating"
"motherfucker"
"oral***"
"anal***"
"wtf"
"orgy"
"stfu"
}

#Set the flags for bot owners, masters, ops
#and users which to exempt from the script.
#(Usage: m, n, o, or "mnf", "fbo" etc)
set badidentexempt "mnof|mnof"
#For how long you wish (in minutes) to ban the 
#user with the bad ident. (mins)
set badidbantime 30

###############################################################################
### Don't edit anything else from this point onwards, even if you know tcl! ###
###############################################################################
bind join - * join:badident
proc join
:badident {nick host hand chan} {
 global 
botnick badidents badidentchans badidentexempt badidbantime
  
if {(([lsearch -exact [string tolower $badidentchans] [string tolower $chan]] != -1) || ($badidentchans == "*")) && ($nick != $botnick)} {
    foreach 
badident [string tolower $badidents] {
     
set badidentban1 "*!*$badident*@*"
     
set badidentban2 "*!*@[lindex [split $host @] 1]"
     
set userident "[string trimleft [string tolower [lindex [split $host "@"] 0]] "~"]"
    
if {[string match *$badident* [string tolower $userident]]} {
      if {([
botisop $chan]) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && (![matchattr $hand $badidentexempt $chan]) && ([onchan $nick $chan])} {
   
putquick "MODE $chan -o+bb $nick $badidentban1 $badidentban2"
        
putquick "KICK $chan $nick :0,1 Bad User Ident Kick 2,0 - Unacceptable *User Ident* 12detected. Please change your 2'IDENT' 12to a suitable one and then 2rejoin back."
        
timer $badidbantime "pushmode $chan -b $badidentban2"
        
return 0
        
}
      }
    }
  }
}
# (ain't i an asskicker?...)

putlog "Bad Ident Kicker Script v1.65.ab by \002awyeah (
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
)\002 -=Loaded=-"
putlog "*ENABLED* Bad Ident Kicker Script on:\002 $badidentchans"
return 


 
Alıntı ile Cevapla

Alt 16 Aralık 2007, 21:54   #5
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Tcl Arşivi




Kanal Limit


PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Binds                                                               
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bind time "* * * * *" time:ChanLimit
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# time:ChanLimit start                                                   
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proc time:ChanLimit {min hour day month year} {
    foreach 
chan [channels] {
 
set newlimit [expr [llength [chanlist $chan]] + 15]
 
set currentlimit [currentlimit $chan]
 if {
$currentlimit < [expr $newlimit 1] || $currentlimit > [expr $newlimit 1]} {
     
putserv "mode $chan +l $newlimit"
 
}
    }    
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# time:ChanLimit end                                                     
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# currentlimit start                                                   
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proc currentlimit {chan} {
    
set currentmodes [getchanmode $chan]
    if {[
string match "*l*" [lindex $currentmodes 0]]} {
 return [
lindex $currentmodes end
    }
    return 
0
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# currentlimit end                                                    
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# putlog                                                              
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
putlog "mirchane.com chanlimit" 


 
Alıntı ile Cevapla

Alt 16 Aralık 2007, 21:57   #6
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Tcl Arşivi




Join / Part

PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
  bind part - * jpcheck
#------------------------------------------------------------------------------------------------------------
# This Proc kicks anyone who starts begging within 30 seconds of joining the channel
#------------------------------------------------------------------------------------------------------------
proc jpcheck {nick uhost hand chan rest} {
    global 
approved_chans jpmsg jpbantime jpwarnings nojpchannels
    set chan 
[string tolower $chan]
    
# If the request comes from an approved channel, continue on to fulfill the request
    
if {[string first $chan " $approved_chans] != -1} { 
        if {[
lsearch -exact $nojpchannels [string tolower $chan]] >= 0} {return 0}
 if {[
matchattr $hand o]} {return 0}
 if {[
matchattr $hand v]} {return 0}
 if {[
matchattr $hand f]} {return 0}
 if {[
matchattr $hand b]} {return 0}
 if {[
getchanjoin $nick $chan] == 0} {return 0}
 if [
expr [unixtime] - [getchanjoin $nick $chan] > 8] {return 0}
 
putlog "\0033 AutoBanning $nick - Revolving Door ban"
 
set mask [getmask $nick $chan]
 
warnban $nick $mask $chan $jpbantime $jpwarnings $jpmsg
    
}



 
Alıntı ile Cevapla

Alt 16 Aralık 2007, 21:59   #7
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Tcl Arşivi




Flood Koruma

PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
##
# Ban Flooders v2.1.3
#  by MC_8 - Carl M. Gregory <
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
>
#  This script will only run on eggdrop 1.5.5 or greater.
#
#    R.I.P. Mom, To always be remembered; Nancy Marie Gregory.
#
# My Website - http://mc.purehype.net/
# Have a bug?  http://mc.purehype.net/bugzilla/
##
##
# This script will automatically kick/ban a public/msg/ctcp flooder for x
# minute(s) from all channels there (if bot is op'd).  Flood settings are
# defined by `.chaninfo''s flood setting.  You set the flood settings via
# `.chanset'.
#
# This script excels in takeover (deop flood) prevention (especially if the
# script runs on more than 1 bot and the bot's are linked.
#
# For good flood protection, here are a few pointers:
#   - Tweak your flood settings via `.chanset' just right... if the flood
#     settings are to lenient, the script will do you no good.  The settings are
#     really up to you, different channels require different settings.  I.e.
#     This if my flood-deop, 3:10
#   - Use other scripts as well; mc.banflooders does excel in things like
#     takeover attempt (deop floods).  But other scripts do things this one
#     doesn't.
#     Recommended scripts, and why:
#       o sentinel (by slennox), this script is great for protecting the channel
#         from mass flood attacks.  As mc.banflooders (due to how it feeds from
#         eggdrop's flood-types) only watches floods on a per person basis.
#       o mc.limit (by MC_8), this script will further protection from large
#         floodnets.  It keeps a limit on the channel just above the number of
#         people in the channel and updates it slowly ... making it hard for a
#         large floodnet to join really fast.
#       o repeat (by slennox), this serves 2 purposes;
#         1) Removing those pesky people that repeat.
#         2) Stop large floodnets from doing a repeat floods.
#       o "+bitch", this isn't a script; it's a core function of eggdrop.  You
#         set it via `.chanset'.  This ensures that ONLY registered ops (users
#         added to the bot with +o) get ops, and no one else.
#       o superbitch (by slennox), this is pretty much the same as +bitch, but
#         instead of just deop'n the person that isn't a registered op, it will
#         also deop the person that op'd that non-registered person.  Some say
#         that this is excessive, but I use it and like it.
##
##
# Configuration
##
#
# What flagged users are exempt from this script?  Set to "" to exempt no-one.
# Flag syntax: <global>|<channel>
set mc_bf(exempt""
# [0=no/1=yes] Do you want to exempt op'd users?
set mc_bf(exempt:op0
# [0=no/1=yes] Do you want to exempt voice'd users?
set mc_bf(exempt:voice0
# If a user is found flooding, how long (in min.s) do you want to ban the user?
#   -2 = Permanent ban (no expiration in bot records).
#   -1 = Will not ban (no ban, disable banning).
#    0 = Performs a server ban, but doesn't store the ban in the bot's banlist.
#   Any number greater than 0 will be the time in which the ban will expire.
#   All ban's will be channel ban's, if you want it to be global then put a '@'
#   in front of the time.
#     Example: set mc_bf(bantime) @1400
#   Also, if you want the ban to be 'sticky' (read '.help stick' in the bot's
#   dcc console), then append the time with a '!'.
#     Example: set mc_bf(bantime) 1400!
#     Example: set mc_bf(bantime) @1400!
set mc_bf(bantime"@43200"

# What do you want the ban message to be?
# Replacment variables are:
#  %nick = IRC Nickname of the flooder.
#  %ident = Ident of the flooder.
#  %host  = Host of the flooder.
#  %hand  = Handle of the flooder.
#  %chan  = Channel where the flood happened (or "me" if personal flood).
#  %type  = What type of flood (ctcp/ pub/ msg/ join).
set mc_bf(banmsg"Not smart to %type flood %chan."
# [0=no/1=yes] If a deop flood is detected, do you want the bot to try and de
# synch it's self (-o+o self self)?  This is good to ensure that all the linked
# irc servers know that the bot is an op.  Please note that some IRC servers
# such as EfNet will not process this correctly and in doing so, the bot will
# loose it's ops.  This feature does work on Undernet.
set mc_bf(desynch1
# [0=no/1=yes] If a deop flood is detected, do you want to set the channel to
# +simk?  The key will be a random key.
set mc_bf(deop:enforce:chmod1
# How long do you want to limit the key to.  Before this was set to 24 and could
# not be changed, but I found that undernet has a bug that allows 24 but only
# lets you unset at 23 (so keys could not be removed).  If your on undernet, I
# suggest you set this to 23.  Any other network, I do not know -- do a long +k
# in your channel then remove it to see what your length limit is.
set mc_bf(key:limit23
# If a deop flood is detected and the above, deop:enforce:chmod, is enabled; how
# long (in sec.s) do you want to wait before unlocking the channel?  Assuming
# the bot has recovered ops by that time.  Set this to 0 if you want don't want
# the bot to unlock the channel.
set mc_bf(deop:enforce:time15
# [0=no/1=yes] If a deop flood is detected, do you want to have this script to
# deop all non registered ops (not +o in userfile)?
set mc_bf(bitch1
# [0=no/1=yes] If a deop flood is detected, do you want to utilize the botnet?
# If other bots using this script are op'd and are setup to receive these
# requests, it could greatly improve your possibility of recovering from a
# takeover attempt.  Ideal example, 2 bots, 1 is lagged by a couple of seconds
# therefor doesn't see the deop flood yet, so it can properly kick/ban/reop
# effectively.
set mc_bf(deop:bottx1
# [0=no/1=yes] Do you want to receive botnet help requests?  Read the above
# setting, deop:bottx, for a better explanation.
set mc_bf(deop:botrx1
# If a public flood is detected, what mode change do you want to perform on the
# channel?  Set this to "" to disable.
set mc_bf(pub:enforce:chmod"+mi"
# If a public flood is detected and the above, pub:enforce:chmod, is enabled;
# how long (in sec.s) do you want to wait before removing the mode change?  Set
# this to 0 if you want don't want the bot to remove the mode change.
set mc_bf(pub:enforce:time15
# [0=no/1=yes] If any flood is detected, do you want this script to 'boot' the
# user from the botnet's partyline (if found)?
set mc_bf(boot1
# How do you want to mask how the flooders get banned?
#      0 - *!user@host.domain
#      1 - *!*user@host.domain
#      2 - *!*@host.domain
#      3 - *!*user@*.domain
#      4 - *!*@*.domain
#      5 - nick!user@host.domain
#      6 - nick!*user@host.domain
#      7 - nick!*@host.domain
#      8 - nick!*user@*.domain
#      9 - nick!*@*.domain
#     You can also specify a type of 10 to 19 which correspond to masks 0 to 9.
#     But if the host.domain is a;
#       hostname = Instead of using a * wildcard to replace portions of the
#                  host.domain, it replaces the numbers in the host.domain with
#                  a '?' (question mark) wildcard.
#       ip       = It will mask as normal, with no '?' (question mark)
#                  replacements as does hostname.
set mc_bf(bantype2

## SVS Client (Script Version Service) v3.1.1 ##
# Once a day, the SVS Client will connect to MC_8's SVS Server to determine if
# there is a newer version of this script available.  This will only notify
# users of the new version via a note.  It's up to the owner of the bot to
# download, adjust settings then install the script.
# If a newer version is found, whom do you want to notify?  The notification is
# sent via a note.  Seperate each user with a space, or set this to "" to
# disable SVS notification.  For those whom know TCL; do not put this in list
# format, keep it in string format.
set mc_bf(svs:notify"MC_8"
# Would you like to restrict the concept of a new version to stable releases
# only?
#   0 = No, inform of both stable and beta release versions.
#   1 = Yes, inform of only stable release versions.
set mc_bf(svs:mode0
#
##
##
# Done with configurations, do not edit past here unless you know TCL.
##
#Script:mc_bf
set mc_bf(script)      "Ban Flooders"
set mc_bf(version)     "v2.1.3"
set mc_bf(svs:script)  "banflooders"
set mc_bf(svs:version"002001003000"
set mc_bf(svs:server)  "mc.svs.purehype.net"
set mc_bf(svs:port)    "81"
set mc_bf(svs:get)     "/index.tcl"
set mc_bf(svs:query)   "svs=$mc_bf(svs:script)&version=$mc_bf(svs:version)"
catch {unset temp}
if {![
info exists numversion] || ($numversion "1050500")} {
  
set temp(tag"$mc_bf(script) $mc_bf(version)"
  
putlog "$temp(tag) by MC_8 will only work on eggdrop 1.5.5 or greater."
  
putlog "$temp(tag)  will not work with eggdrop $version."
  
putlog "$temp(tag)  not loaded."
  
return 1
}

# Error system, v3.0
proc mc:bf:error {command error arg} {
  global 
mc_bf version lastbind errorInfo
  putlog 
"Error in script $mc_bf(script) $mc_bf(version)."
  
putlog "    Error System: v3.0"
  
putlog "       Last Bind: [expr {[info exists lastbind]?$lastbind:"-NULL-"}]"
  
putlog "         Command: $command"
  
putlog "       Arguments: $arg"
  
putlog "       Error Msg: $error"
  
putlog "    Egg. Version: [expr {[info exists version]?$version:"-NULL-"}]"
  
putlog "     TCL Version: [info tclversion]"
  
putlog "  TCL Patchlevel: [info patchlevel]"
  
putlog "*** Please submit this bug so MC_8 can fix it.  Visit"
  
putlog "*** http://mc.purehype.net:81/bugzilla/ to properly report the bug."
  
putlog \
    
"*** Please include ALL info. in the bug report, including the next(s)."
  
error $errorInfo
}
proc mc:bf:errchk {command arg} {
  if {![catch {eval 
$command $arg} return]} {return $return}
  
mc:bf:error $command $return $arg
  
return 0
}
# ^
bind flud - * mc:bf:flud
proc mc
:bf:flud {nick uhost hand type chan} {
  return [
mc:bf:errchk mc:bf:flud_[list $nick $uhost $hand $type $chan]]
}
proc mc:bf:flud_ {nick uhost hand type chan} {
  global 
mc_bf botnick use-silence ignore-time
  
if {$mc_bf(exempt) == ""} {set temp() 0} else {set temp() 1}
  if {
$chan == "*"} {
    
set chan me
    set exempt 
[expr ([matchattr $hand $mc_bf(exempt)] && $temp())]
  } else {
    
set exempt [expr ([matchattr $hand $mc_bf(exempt$chan] && $temp()) || \
                     ([
isop $nick $chan] && $mc_bf(exempt:op)) || \
                     ([
isvoice $nick $chan] && $mc_bf(exempt:voice))]
  }; if {
$exempt} {return 0}
  
putlog "$mc_bf(script):  Detected $nick ($uhost$type flooding $chan."
  
set banmask [mc:bf:maskhostbytype $nick!$uhost $mc_bf(bantype)]
  if {
$type == "deop"} {
# Xmit to botnet
    
if {$mc_bf(deop:bottx)} {
      
set buffer[list [string tolower $nickdeop [string tolower $chan]]
      if {![
info exists mc_bf(:buffer:$buffer)]} {
        
putallbots[list mc.banflooders $nick $uhost $hand $type $chan $botnick]
        
set mc_bf(:buffer:$buffer) [clock seconds]
        
# 10 seconds should be enough for botnet lag.
        
utimer 10[list unset mc_bf(:buffer:$buffer)]
      }
    }
# Resynch self
    
if {$mc_bf(desynch)} {putquick "MODE $chan -o+o $botnick $botnick-next}
# Ban and deop flooder
    
putquick "MODE $chan -o+b $nick $banmask-next
# Lock the channel
    
if {$mc_bf(deop:enforce:chmod)} {
      
set key [encrypt [rand 9999999999] [rand 9999999999]]
      
set key [string range $key 0 [expr $mc_bf(key:limit)-1]]
      
putquick "MODE $chan +ikms $key-next
      
if {$mc_bf(deop:enforce:time)} {
        
set temp() "[list pushmode $chan -i]\;[list pushmode $chan -k $key]\;"
        
append temp() "[list pushmode $chan -m];[list pushmode $chan -s]"
        
utimer $mc_bf(deop:enforce:time$temp()
      }
    }
# Do bitch on channel
    
if {$mc_bf(bitch)} {
      foreach 
user [chanlist $chan -o] {
        if {![
isbotnick $user]} {pushmode $chan -o $user}
      }
      
flushmode $chan
    
}
  } elseif {
$type == "pub"} {
    if {
$mc_bf(pub:enforce:chmod) != ""} {
      
putquick "MODE $chan $mc_bf(pub:enforce:chmod)" -next
      
if {$mc_bf(pub:enforce:time)} {
        
set temp() \
          [
scan "$mc_bf(pub:enforce:chmod)\015" "%s %\[^\015\]" mode end]
        if {
$temp() == "1"} {
          
set end ""
        
}
        if {[
regexp -- {\+([a-zA-Z0-9]*)[^a-zA-Z0-9]?} $mode temp() pmode]} {
          
set pmode -$pmode
        
} else {set pmode ""}
        if {[
regexp -- {\-([a-zA-Z0-9]*)[^a-zA-Z0-9]?} $mode temp() nmode]} {
          
set nmode +$nmode
        
} else {set nmode ""}
        
utimer $mc_bf(pub:enforce:time) \[list putserv "MODE $chan ${pmode}${nmode} $end"]
      }
    }
  }
  
scan $uhost {%[^@]@%sident host
  set time $mc_bf
(bantime)
  if {[
string match *! $time]} {
    
set option "sticky"
    
set time [string trimright $time !]
  } else {
set option "none"}
  if {[
string match @* $time]} {
    
set global 1
    set time 
[string trimleft $time @]
  } else {
set global 0}
  
set reason [mc:bf:replace $mc_bf(banmsg)[list %nick $nick \
                                                 %
ident $ident \
                                                 %
host $host \
                                                 %
hand $hand \
                                                 %
chan $chan \
                                                 %
type $type]]
  if {
$time != "-1"} {
    if {
$time == ""} {set time 0}
    if {
$chan == "me"} {
      
set temp(time$time
      
if {$temp(time) == "-2"} {set temp(time0} \
      elseif {
$temp(time) == "0"} {set temp(time) ${ignore-time}}
      if {![
isignore $banmask]} {
        if {!
$temp(time)} {set temp(duration"permanent"} \
        else {
          
# When wrighting, the maximum number [unixtime] can represent is
          # 1999999999.  This may need adjusting if eggdrop decides to go
          # higher.
          
set limit [expr (1999999999-[clock seconds])/60] ;# Minutes
          
if {$temp(time) > $limit} {
            
set temp(1"Timer number too high"
            
set temp(2"converting; $temp(time) -> $limit"
            
putloglev d "$mc_bf(script): $temp(1), $temp(2)"
            
set temp(time$limit
          
}
          
set temp(duration) [duration [expr $temp(time)*60]]
        }
        
putlog "$mc_bf(script):  Ignoring $nick via $banmask ($temp(duration))."
        
newignore $banmask BanFlood $reason $temp(time)
        
# Some bot version, forgot which, had a problem with removing the
        # silence after the ignore's time was up.  This is a fix.
        
if {([info exists {use-silence}]) &&
            (${use-
silence}) &&
            (
$temp(time))} {
          
timer $temp(time)[list putserv "SILENCE -$banmask"]
        }
      }
    } else {
      
set temp(time$time
      
if {$temp(time) == "0"} {
        if {
$global} {set temp(channels) [channels]} \
        else {
set temp(channels)[list $chan]}
        
set temp(lchannels""
        
foreach temp(channel$temp(channels) {
          if {[
botisop $temp(channel)]} {
            
set temp(found0
            set temp
(banmask) [string tolower $banmask]
            foreach 
temp(ban) [chanbans $temp(channel)] {
              if {[
string tolower $temp(ban)] == $temp(banmask)} {
                
set temp(found1
                
break
              }
            }
            if {!
temp(found)} {
              
pushmode $temp(channel) +b $banmask
              lappend temp
(lchannels$temp(channel)
            }
          }
        }
        if {[
llength $temp(lchannels)]} {
          
set temp() "[join $temp(lchannels) ""] (server ban)"
          
putlog "$mc_bf(script):  Banned $nick via $banmask on $temp()."
        
}
      } else {
        if {![
isban $banmask $chan]} {
          if {
$temp(time) == "-2"} {set temp(time0}
          if {!
$temp(time)} {set temp(duration"permanent"} \
          else {
            
# When wrighting, the maximum number [unixtime] can represent is
            # 1999999999.  This may need adjusting if eggdrop decides to go
            # higher.
            
set limit [expr (1999999999-[clock seconds])/60] ;# Minutes
            
if {$temp(time) > $limit} {
              
set temp(1"Timer number too high"
              
set temp(2"converting; $temp(time) -> $limit"
              
putloglev d "$mc_bf(script): $temp(1), $temp(2)"
              
set temp(time$limit
            
}
            
set temp(duration) [duration [expr $temp(time)*60]]
          }
          
set temp(1"Added internal ban to"
          
set temp(2"banlist; $nick via $banmask ($temp(duration))."
          
if {$global} {
            
newban $banmask BanFlood $reason $temp(time$option
            putlog 
"$mc_bf(script):  $temp(1) global $temp(2)"
          
} else {
            
newchanban $chan $banmask BanFlood $reason $time $option
            putlog 
"$mc_bf(script):  $temp(1) $chan's $temp(2)"
          
}
        }
      }
    }
  }
  if {
$mc_bf(boot)} {
    
set ban $host
    
foreach temp() [whom *] {
      
set fhand [lindex $temp() 0]
      
set fbot [lindex $temp() 1]
      
set fuhost [lindex $temp() 2]
      
set fnick [hand2nick $fhand]
      
scan $fuhost {%[^@]@%sfident fhost
      
if {[validuser $fhand]} {
        if {
$mc_bf(exempt) == ""} {set temp() 0} else {set temp() 1}
        if {
$chan == "me"} {
          
set exempt [expr ([matchattr $fhand $mc_bf(exempt)] && $temp())]
        } else {
          
set exempt [expr ([matchattr $fhand $mc_bf(exempt$chan] && \
                            
$temp()) || \
                           ([
isop $fnick $chan] && $mc_bf(exempt:op)) || \
                           ([
isvoice $fnick $chan] && $mc_bf(exempt:voice))]
        }
      } else {
set exempt 0}
      if {(
$exempt) ||
          ([
string tolower $host] != [string tolower $fhost])} {continue}
      
boot $fhand@$fbot $reason
    
}
  }; return 
1
}
bind bot mc.banflooders mc:bf:bot
proc mc
:bf:bot {from command arg} {
  return [
mc:bf:errchk mc:bf:bot_[list $from $command $arg]]
}
proc mc:bf:bot_ {from command arg} {
  global 
botnick mc_bf
  set nick 
[lindex $arg 0]; set uhost [lindex $arg 1]; set hand  [lindex $arg 2]
  
set type [lindex $arg 3]; set chan  [lindex $arg 4]; set ifrom [lindex $arg 5]
  
set buffer[list [string tolower $nick] [string tolower $type] \
    [
string tolower $chan]]
  if {(![
validchan $chan]) || (![onchan $botnick $chan]) ||
      ([
info exists mc_bf(:buffer:$buffer)])} {return 0}
  
set mc_bf(:buffer:$buffer) [clock seconds]
  
# 10 seconds should be enough for botnet lag.
  
utimer 10[list unset mc_bf(:buffer:$buffer)]
  if {([
onchan $ifrom $chan]) && ($type == "deop") && ($mc_bf(desynch))} {
    
putquick "MODE $chan -o+o $ifrom $ifrom-next
  
}
  
set temp() "$type flood detected!  Botnet relay"
  
append temp() " from $from ($ifrom).  Processing..."
  
putlog "$mc_bf(script):  $temp()"
  
mc:bf:flud $nick $uhost $hand $type $chan
}
## More Tools quick procs.
## -- http://mc.purehype.net:81/script_info.tcl?script=moretools
# mc:bf:badargs <args> <min_llength> <max_llength|end> <argNames>
#     version:
#       v1.0
proc mc:bf:badargs {{args ""}} {
  if {[
llength $args] < 4} {
    
error {
  
wrong # args: should be "mc:bf:badargs args min_llength max_llength argNames"
    
}
  }
  
set index 0
  
foreach varName[list args min max names] {
    
set check_$varName [lindex $args $index]
    
incr index
  
}
  if {[
regexp -- {([^0-9])} $check_min -> bad]} {
    
error "bad number \"$bad\" in: $check_min"
  
}
  if {[
regexp -- {([^0-9])} $check_max -> bad] && ($check_max != "end")} {
    
error "bad number \"$bad\" in: $check_max"
  
}
  
# Make sure $check_args is in list format, if not then make it so.
  # Were not going to use 2list here, don't want to evoke a 'too many nested
  # calls to Tcl_EvalObj' error since '2list' uses on this proc.
  
if {[catch {llength $check_argsllength]} {
    
set check_args [split $check_args]
    
set llength $check_args
  
}
  if {(
$llength $check_min) ||
      ((
$llength != "end") && ($llength $check_max))} {
    if {[
info level] == "1"} {return 1}
    
error "wrong # args: should be \"[lindex [info level -1] 0] $check_names\""
  
}; return 0
}
# mc:bf:unlist <argsList> [varName1] [varName2] ... [varNameN]
#     version:
#       v1.0
proc mc:bf:unlist {{args ""}} {
  
mc:bf:badargs $args 1 end "argsList ?varName varName ...?"
  
set argList [lindex $args 0]
  
set argList [expr {([catch {llength $argList}])?[split $argList]:$argList}]
  
set argNames [lrange $args 1 end]
  if {![
llength $argNames]} {
    return [
expr {(![catch {llength $argList}])?
      [
join $argList]:$argList}]
  }
  for {
set index 0} {$index < [llength $argNames]} {incr index 1} {
    
set argName     [lindex $argNames $index]
    
set argListItem [lindex $argList  $index]
    
set argName_ [expr {([catch {llength $argName}])?[split $argName]:$argName}]
    
set setTo   [lindex $argName_ 1]
    
set argName [lindex $argName_ 0]
    if {
$argName == ""} {continue}
    
upvar 1 $argName var
    if {[
expr $index+1] > [llength $argList]} {
      if {[
llength $argName_] == "2"} {set var $setTo}
    } else {
      if {
$argName == "args"} {
        
set var [lrange $argList $index end]
        
incr index [expr [llength $var]-1]
      } else {
set var $argListItem}
    }
  }; return 
$index
}
# 2list <text>
#     version:
#       v1.0
proc mc:bf:2list {{args ""}} {
  
mc:bf:badargs $args 1 1 "text"
  
mc:bf:unlist $args text
  
return [expr {([catch {llength $text}])?[split $text]:$text}]
}
# findnicks <nick!ident@host.domain> [channel]
#     version:
#       v2.0
proc mc:bf:findnicks {{args ""}} {
  
mc:bf:badargs $args 1 2 "nick!ident@host.domain ?channel?"
  
mc:bf:unlist $args hostmask channel
  set hostmask 
[string tolower $hostmask]
  if {
$channel == ""} {set channels [channels]} \
  elseif {![
validchan $channel]} {error "no such channel record"} \
  else {
set channels[list $channel]}
  
set origional_channel $channel
  set 
list ""
  
foreach channel $channels {
    foreach 
user [chanlist $channel] {
      
set nuhost [string tolower $user![getchanhost $user $channel]]
      if {[
string match $hostmask $nuhost]} {
        
lappend list $user[expr {($origional_channel != "")?"":"@$channel"}]
      }
    }
  }; return 
$list
}
# maskhostbytype <nick!ident@host.domain> [type]
#     version:
#       v2.1
proc mc:bf:maskhostbytype {{args ""}} {
  
mc:bf:badargs $args 1 2 "nick!ident@host.domain ?type?"
  
mc:bf:unlist $args nuhost type
  set type 
[expr {($type == "")?5:$type}]
  if {![
regexp -- {^1?[0-9]$} $type]} {
    
set valid "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 {or 19}"
    
error "bad type \"$type\": must be [join $valid ""]"
  
}
  
# Define the maximum length the ircd allows for an ident.  Standard is 9,
  # however I made it to a variable incase someone wants to change it up.
  
set ident_max-length 9
  
# Define the maximum length the ircd allows for a hostname/ ip.  Standard is
  # 63, however I made it to a variable incase someone wants to change it up.
  
set host_max-length 63
  
if {![regexp -- {^(.*[^!])!((.*)@(.*))$} $nuhost -> nick uhost ident host]} {
    
error "invalid nick!ident@host.domain: $nuhost"
  
}
  
set maskhost 1
  
if {[string length $type] == "2"} {
    
# Type must be 10-19.
    
if {[info tclversion] < "8.1"} {
      
set re_syntax_1 {([12][0-9][0-9]|[1-9][0-9]|[1-9])}
      
set re_syntax_2 {([12][0-9][0-9]|[1-9][0-9]|[0-9])}
    } else {
      
set re_syntax_1 {([12]\d{2}|[1-9][0-9]|[1-9])}
      
set re_syntax_2 {([12]\d{2}|[1-9][0-9]|[0-9])}
    }
    
set re_syntax ^$re_syntax_1\\.$re_syntax_2\\.$re_syntax_2\\.$re_syntax_2\$
    if {![
regexp -- $re_syntax $host]} {
      
regsub -all -- {[0-9]} $host host
      set maskhost 0
    
}; set type [string index $type 1]
  }
  
# Previous version used regexp instead of these string matches.  String match
  # in this case is ~3 microseconds faster.
  
if {[string match {[0-4]} $type]} {set nick *}
  if {[
string match {[2479]} $type]} {set ident *}
  if {[
string match {[1368]} $type]} {regsub -- {^~?(.*)$} $ident *\\1 ident}
  if {[
string match {[3489]} $type] && $maskhost} {
    
set host [lindex [split [maskhost $host] @] end]
  }
  if {[
set length [string length $ident]] > ${ident_max-length}} {
    
set ident *[string range $ident [expr $length-${ident_max-length}] end]
  }
  if {[
set length [string length $host]] > ${host_max-length}} {
    
set host *[string range $host [expr $length-${host_max-length}] end]
  }
  return 
$nick!$ident@$host
}
# replace [switches] <text> <substitutions>
#     version:
#       v1.3
proc mc:bf:replace {{args ""}} {
  
mc:bf:badargs $args 2 4 "?switches? text substitutions"
  
set switches ""
  
for {set i 0} {[string match -* [set arg [lindex $args $i]]]} {incr i} {
    if {![
regexp -- {^-(nocase|-)$} $arg -> switch]} {
      
error "bad switch \"$arg\": must be -nocase, or --"
    
}
    if {
$switch == "-"} {
      
incr i
      
break
    }; 
lappend switches $switch
  
}
  
set nocase [expr {([lsearch -exact $switches "nocase"] >= "0") ? 0}]
  
set text [lindex $args $i]
  
set substitutions [lindex $args [expr $i+1]]
  
mc:bf:badargs [lrange $args $i end2 2 "?switches? text substitutions"
  
# Check to see if $substitutions is in list format, if not make it so.
  
set substitutions [mc:bf:2list $substitutions]
  if {[
info tclversion] >= "8.1"} {
    return [
expr {($nocase)?
      [
string map -nocase $substitutions $text]:
      [
string map $substitutions $text]}]
  }
  
set re_syntax {([][\\\*\+\?\{\}\,\(\)\:\.\^\$\=\!\|])}
  foreach {
a b$substitutions {
    
regsub -all -- $re_syntax $a {\\\1a
    
if {$nocase} {regsub -all -nocase -- $a $text $b text} \
    else {
regsub -all -- $a $text $b text}
  }; return 
$text
}
## End of More Tools quick procs.

## SVS v3.1.1
set mc_bf(svs:client_version"v3.1.1"
if {![info exists mc_bf(svs:mode)] ||
    ![
regexp -- {^(1|0)$} $mc_bf(svs:mode)]} {
  
set mc_bf(svs:mode0
}
if {![
info exists mc_bf(svs:notify)]} {
  if {![
info exists owner]} {set owner ""}
  
set mc_bf(svs:notify$owner
}
bind time "00 00 *" mc:bf:do_svs
proc mc
:bf:do_svs {{args ""}} {
  global 
mc_bf
  mc
:bf:do_svs_ $mc_bf(svs:server$mc_bf(svs:port$mc_bf(svs:get)
}
proc mc:bf:do_svs_ {svs_server svs_port svs_get} {
  global 
mc_bf tcl_platform
  
if {[catch {
          
socket -async $svs_server $svs_port
             
sid]} {
    
putloglev d "$mc_bf(script): SVS socket error: $sid"
    
return 1
  
}
  
# This block of code is to get a standard User-Agent line of information, as
  # proposed in 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #007700">foreach 
array_name[list platform os osVersion machine] {
    
set temp($array_name) [lindex [array get tcl_platform $array_name1]
  }
  switch -- 
$temp(platform) {
    
windows {
      switch -- 
$temp(os) {
        
Windows {set temp(2Win$temp(osVersion)}
        
"Windows 95" {
          if {
$temp(osVersion) < "4.10"} {
            
set temp(2Win95
          
} else {
            
set temp(2Win98
          
}
        }
        
"Windows 98" {set temp(2Win98}
        
"Windows NT" {
          if {
$temp(osVersion) >= "5.0"} {
            
set temp(2"Windows NT $temp(osVersion)"
          
} else {
            
set temp(2WinNT$temp(osVersion)
          }
        }
        default {
          
set temp(2"$temp(os) $temp(osVersion)"
        
}
      }
    }
    
unix {
      
set temp(2"unix $temp(machine)"
    
}
    
macintosh {
      
set temp(2$temp(machine)
    }
    default {
      
set temp(2"$temp(os) $temp(osVersion) $temp(machine)"
    
}
  }
  
set temp(user_agent"Mozilla/5.001 ($temp(platform); U; $temp(2); en) "
  
append temp(user_agent"Gecko/25250101 $mc_bf(svs:script)/"
  
append temp(user_agent"$mc_bf(svs:version) SVS_Client/"
  
append temp(user_agent"$mc_bf(svs:client_version)"
  
# ^
  
fconfigure $sid -blocking 0 -buffering line
  set tout 
[after 60000 "mc:bf:svs_talk $sid timeout $svs_server $svs_port"]
  
fileevent $sid readable "mc:bf:svs_talk $sid $tout"
  
puts $sid "GET $svs_get?$mc_bf(svs:query) HTTP/1.0\
           \nHost: 
$svs_server:$svs_port\
           \nUser-Agent: 
$temp(user_agent)\n"
  
flush $sid
}
proc mc:bf:svs_talk {sid tout {svs_server ""} {svs_port ""}} {
  global 
mc_bf
  set 
array[list svs temp $sid]
  if {
$tout == "timeout"} {
    
set temp(1"$svs_server:$svs_port"
    
putloglev d * \
      
"$mc_bf(script): SVS Warning: Timed out connecting to $temp(1)."
    
catch {unset mc_bf($array)}
    
close $sid
    
return 0
  
}
  if {[
eof $sid]} {
    catch {unset 
mc_bf($array)}
    
close $sid
    
return 1
  
}
  
gets $sid get
  after cancel $tout
  
if {![info exist mc_bf($array)]} {
    if {
$get == ""} {set mc_bf($array1}
    return -
1
  
}
  if {(
$get == "") || [catch {llength $get}]} {
    return -
2
  
}
  switch -- [
lindex $get 0] {
    
200 {
      
set temp(host) [lindex $get 1]
      
set temp(port) [lindex $get 2]
      
set temp(get) [lindex $get 3]
      
set temp(cache"$temp(host) at $temp(port)"
      
putloglev d "$mc_bf(script): SVS is being redirected to $temp(cache)."
      
mc:bf:do_svs_ $temp(host$temp(port$temp(get)
      
close $sid
      
return 200
    
}
    
003 {
      
set temp(reply) [lrange $get 1 end]
      for {
set number 0} {$number <= 5} {incr number} {
        
set temp(reply:$number) [lindex $temp(reply$number]
      }
      if {
$temp(reply:0) != $mc_bf(svs:script)} {
        
set temp(1"wanted $mc_bf(svs:script), got $temp(reply:0)"
        
putloglev d "$mc_bf(script): SVS Error: $temp(1)"
        
unset mc_bf($array)
        
close $sid
        
return -3
      
}
      if {
$mc_bf(svs:mode)} {
        
set temp(svs:version) [string range $mc_bf(svs:version0 8]999
      
} else {
        
set temp(svs:version) [string range $mc_bf(svs:version0 11]
      }
      if {
$temp(reply:1) > $temp(svs:version)} {
        
set temp(note$temp(reply:5)
        
regsub -all -- %0 $temp(note$temp(reply:0temp(note)
        
regsub -all -- %1 $temp(note$temp(reply:1temp(note)
        
regsub -all -- %2 $temp(note$temp(reply:2temp(note)
        
regsub -all -- %3 $temp(note$temp(reply:3temp(note)
        
regsub -all -- %4 $temp(note$temp(reply:4temp(note)
        
regsub -all -- %version $temp(note$mc_bf(versiontemp(note)
        foreach 
temp(to) [split $mc_bf(svs:notify",; "] {
          if {[
string trim $temp(to)] == ""} {continue}
          
regsub -- %nick $temp(note$temp(totemp(note2)
          
set temp(lunotes) [notes $temp(to) -[notes $temp(to)]]]
          if {[
string match *$temp(note2)* $temp(lunotes)]} {
            
set temp(found_note0
            
foreach temp(unote$temp(lunotes) {
              if {
$temp(note2) == [lindex $temp(unote2]} {
                
set temp(found_note1
                
break
              }
            }
            if {
$temp(found_note)} {continue}
          }
          
set temp(error"sending note to $temp(to) -> "
          
switch -- [sendnote SVS $temp(to$temp(note2)] {
            
{
              if {![
validuser $temp(to)]} {
                
append temp(error"invalid user"
              
} else {append temp(error"unknown error"}
              
putloglev d * \
                
"$mc_bf(script): SVS sendnote error: $temp(error)"
            
}
            
{
              
append temp(error"notebox too full"
              
putloglev d * \
                
"$mc_bf(script): SVS sendnote error: $temp(error)"
            
}
          }
        }
      }
      unset 
mc_bf($array)
      
close $sid
      
return 2
    
}
  }
}
## ^

putlog "$mc_bf(script) $mc_bf(version) by MC_8 loaded."
##
# HISTORY  ( <Fixed by> - [Found by] - <Info> )
##
# v2.1.3 (07.06.03)
#  MC_8 - W0lF - Fixed 'integer value too large to represent'.
#                Bugzilla Bug 294 
#
# v2.1.2 (07.02.03)
#  MC_8 - W0lF - Fixed 'couldn't compile regular expression pattern: nested
#                *?+'.  Updated maskhostbytype.  v2.0 -> v2.1
#                Bugzilla Bug 293
#
# v2.1.1 (05.26.03)
#  MC_8      / - Farrago - If bantime number is too high, the ban will expire in
#  MaSsKilla               1 minute.  This is caused by the limit eggdrop puts 
#                          on the length unix time is to be.  I setup some code
#                          to detect if the bantime number will put it over
#                          eggdrop's unix time limit, and if so, auto adjust it
#                          down.
#                          Bugzilla Bug 225
#
# v2.1 (11.01.02)
#  MC_8 - - Added `key:limit` to compensate for a bug found in undernet's ircd
#           coding.  Plus, to better adjust the limit for different networks.
#  MC_8 - - Upgraded SVS Client.  v3.1 -> v3.1.1
#
# v2.0.2 (10.09.02)
#  MC_8 -         - Upgraded SVS.  v2.0 -> v3.1
#  MC_8 - Cocaine - Wasn't banning.
#  MC_8 - Alex    - Added more options on how to ban via the `bantime` variable.
#                   [bug 68]
#  MC_8 - blood_x - Fixed 'can't set "temp()": variable isn't array'.
#                   [bug 162]
#  MC_8 - Dmitry  - Fixed 'invalid command name "mc:fb:2list"', supposed to be
#                   :bf: not :fb:.  [bug 158]
#  MC_8 - Dmitry  - Fixed 'invalid command name "2list"'; Added `2list` tcl
#                   command.  none -> v1.0  [bug 157]
#  MC_8 -         - Fixed many spelling errors.
#  MC_8 -         - Reformat'd script.  The width and tabulation.
#  MC_8 -         - Moved history to bottom.
#  MC_8 -         - Upgraded Error Catching System.  v2.0 -> v3.0
#  MC_8 - blood_x - Fixed 'invalid command name "mc:bf:mc:bf:maskhostbytype"'.
#                   [bug 131]
#  MC_8 -         - Added `badargs`.  none -> v1.0
#  MC_8 -         - Added `unlist`. none -> v1.0
#  MC_8 -         - Upgraded `findnick`, change to `findnicks`.  v1.0 -> v2.0
#  MC_8 -         - Upgraded `masktype`, change to `maskhostbytype`.
#                   v1.0 -> v2.0
#  MC_8 -         - Upgraded `replace` proc, v1.1 -> v1.3
#  MC_8 - Severum - Botnet deop flood relay was doing a continuos loop.
#
# v2.0.1 (02.19.02)
#  MC_8 - - Forgot to set the SVS version correctly.  The SVS was sending notes
#           to me saying 'The version of Ban Flooders you are using is old.  The
#           current version is v2.0, and your using v2.0.'.  If you don't use
#           the SVS feature, don't worry about upgrading to v2.0.1 from v2.0.
#
# v2.0 (02.12.02)
#  MC_8 -              - Upgraded replace proc from v1.0 to v1.1.
#  MC_8 -              - Bugzilla id #38.
#  MC_8 - naba         - Fixed 'TCL error [mc:bf:flud]: invalid channel: me'.
#  MC_8 - molazem20    - Added 'mc_bf(exempt:op)' and 'mc_bf(exempt:voice)'
#                        configuration variables.
#  MC_8 - naba         - Fixed cosmetic error, was saying the ban duration in
#                        seconds rather than min's, although it was banning in
#                        mins.
#  MC_8 - naba         - Fixed cosmetic error, said 'for for' when it only needs
#                        one 'for' in the english language.
#  MC_8 - naba         - Fixed 'TCL error [mc:bf:flud]: can't use non-numeric
#                        string as operand of "!"'.
#  MC_8 - naba         - Fixed 'TCL error [mc:bf:flud]: can't read "end": no
#                        such variable'.
#  MC_8 - Ilxam Nabiev - Fixed 'TCL error [mc:bf:flud]: can't read "nmode": no
#                        such variable'.
#  MC_8 - Abraham      - Fixed 'TCL error [mc:bf:bot]: can't read "chana": no
#                        such variable'.
#  MC_8 - hyper        - Fixed 'TCL error: can't read "text": no such variable'.
#  MC_8 -              - SVS was updating of a newer version even though there
#                        wasn't... fixed.
#  MC_8 -              - Added a better error output system, for debugging
#                        purposes.
#  MC_8 -              - Fixed 'Tcl error [mc:bf:flud]: can't read "hostmask":
#                        no such variable'.
#  MC_8 -              - Added global and sticking options to ban time.
#  MC_8 -              - Added 'banmsg' setting.
#  MC_8 -              - Rewrote all settings and procs (basically the whole
#                        script).
#  MC_8 -              - Upgraded SVS v1.3 to v2.0.
#  MC_8 -              - Removed mass CTCP ignoring.  I recommend sentinel for
#                        that aspect of flood control.  Mass flooding isn't what
#                        this script is for.
#  MC_8 -              - Removed setting 'maxfluds' and 'maxfludstime', I don't
#                        see the use in them.
#
# v1.10.2 (11.02.01)
#  MC_8 - - Added a more detailed header describing this script, and also some
#           pointers on ensuring good flood protection.
#  MC_8 - - Added filtering to timer's (could cause a bug without it).
#  MC_8 - - Removed unused procs findip, lremove.
#  MC_8 - - Removed debug log coding.
#  MC_8 - - Made minor changes to the SVS client section -- to give proper error
#           if an invalid user is specified to receive a notification of a newer
#           version.
#  MC_8 - - Replaced proc mcbf:inter:findchanuser with mc:bf:findnicks.
#  MC_8 - - Rewrote the ban masking proc - much smaller, quicker and efficient.
#  MC_8 - - Added '-next' to putquick queues, making it faster to react to such
#           things as a takeover attempt (deop flood).  You must run eggdrop
#           1.5.0 to utilize the faster method, although you don't have to run
#           1.5.0 or greater if you don't want to.
#
# v1.10.1 (06.27.01)
#  Malik - - Fixed `Tcl error [mc:tw:all]: can't read "ld": no such variable`.
#  MC_8  - - Ajusted mc_bf(pub:enforce:mc) to support limit and key set's.
#  MC_8  - - The bot was removing all the modes except for the key.  Fixed.
#
# v1.10 (03.04.01)
#  MC_8  - Makik     - Was performing kicks before bans, should be the other way
#                      around.
#  Makik -           - Fixed 'Tcl error [mc:tw:all]: extra characters after
#                      close-quote'.
#  MC_8  -           - Added mc_bf(desynch) variable, I figure some people using
#                      this script REALLY don't want this feature turned on, as
#                      it was core coded to be on before.
#  MC_8  -           - Added enforce (channel lock down) for deop floods for
#                      botnet's as well.  If a bot out there is lagged, I want'
#                      him to -o+o self self, -o+b $nick $ban and lock the
#                      channel down if the bot has enough time before the lag
#                      catches up.
#  MC_8  -           - Fixed coding for deop floods, it was doing the - o+b
#                      $nick $ban correctly but it was also supposed to op self.
#                      I changed that to de synch self considering the irc
#                      server probably is going to think the bot is op'd in it's
#                      own lil lagged world.
#  MC_8  - Rami blah - If mc_bf(pub:enforce:t) was greater than 1, it still
#                      wouldn't unset mc_bf(pub:enforce:mc), rather just enforce
#                      it again.  I forgot to reverse the mode, change - to +
#                      and + to - of mc_bf(pub:enforce:mc).
#  MC_8  - Malik     - Fixed `can't unset "mc_bf(*!*@hostname)": no such element
#                      in array`.
#  MC_8  -           - Fixed an incr (increase) bug for the max floods scenario.
#  MC_8  -           - Added SVS
#  MC_8  -           - Added ability for deop floods' enforce feature to yield a
#                      timer to unset the lock-down on the channel.
#  MC_8  - Rami blah - Added ability to set a mode change upon a public flood
#                      (and a timer so it can unset it's self).
#
# v1.9.1 (08.14.00)
#  MC_8 - - Removed moretools dependency.
#  MC_8 - - eggdrop1.5.3, 1.4.4+RC1 and up changed up a lil bit of tcl, adapted.
#
# v1.9  (12-23-99)
#  MC_8 - - Fixed, on deop flood the whole script will NOT work, just error out
#           due to too many "&" signs in my IF statements.
#  MC_8 - - Fixed, was deoping damn near everyone... bot was looking to see if
#           $nick had o|o #channel witch it should be looking at $hand instead.
#  MC_8 - - Fixed, hand, no such nick error on echo'n the bitch across the
#           botnet.
#  MC_8 - - Fixed, was filling up the mode queue that was causing "OVER MAXIMUM
#           QUE!!!"
#
# v1.8  (12-20-99)
#  MC_8 - - Added mc_bf(bitch) variable set.
#  MC_8 - - Can echo and activate the mc_bf(bitch) function across the botnet
#           for extended support, snd & rcv veritable for this can be set.
#
# v1.7  (10-22-99)
#  MC_8 - - Added, If flooder is on party line, will boot (can turn it off,
#           optional).
#  MC_8 - - Fixed "mc_bf(kickbantime)" error.
#
# v1.6  (10-09-99)
#  MC_8 - - Fixed, banning <host> on me .. error no such channel me, on personal
#           floods (msg/ctcp) ... again.
#
# v1.5  (10-08-99)
#  MC_8 - - Fixed, was adding a ban even though bot wasn't op'd... I don't like
#           that.
#  MC_8 - - Fixed, banning <host> on me .. error no such channel me, on personal
#           floods (msg/ctcp).
#  MC_8 - - Added deop flood => utilize botnet for possible de sync abuse to
#           regain ops.
#  MC_8 - - Added; Search botnet for flooder also, boot if possible.
#  MC_8 - - Added ban type variable, some people like to ban in different
#           formats.
#  MC_8 - - Adjusted the way it searched other channels for the flooder, was
#           search by nick, now by (ban type).
#
# v1.4  (10-06-99)
#  MC_8 - - Fixed bots now ban on flood, even know the user isn't on the channel
#           (in between rejoin).
#
# v1.3
#  MC_8 - - Fixed a Major security risk bug, bot's deoped self on deop flood!
#
# v1.2 - v1.0
#  MC_8 - - initial release
## 


 
Alıntı ile Cevapla

Alt 16 Aralık 2007, 22:01   #8
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Tcl Arşivi




Clone Koruma Pro

PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
######################################################################
#                    clonepro.tcl by Algol, v.1.1
#                    
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
 (Jun 2001)
######################################################################
# ClonePro will attempt to stop join/part floods by individual users
# as well as clones mass-joining, on the specified channels. The bans
# will always be in the *!*@full.host.name format.
# Tested on a 1.6.4 eggdrop
######################################################################

# The channels you want this active on
set cp_chans "#papatya"
# Number of *@host joins in how many seconds, joins:seconds
set cp_j_flood 4:10
# Number of *user@host join/part cycles in how many seconds, j/p_cycles:seconds
set cp_jp_flood 4:10
# Period in minutes to ban *!*@host for multiple joins or join/part floods
set cp_btime 3
# Handle of the bot user that shoud be sent a note
set cp_notify "1Join/Part flood tespit edildi."
##### DON'T edit anything below this line unless you know what you're doing #####
bind join - * clone_pro_join
bind rejn 
- * clone_pro_join
bind part 
- * clone_pro_leave
bind sign 
- * clone_pro_leave
bind splt 
- * clone_pro_leave
proc clone_pro_join 
{nick uhost handl chan} {
 global 
cp_chans cp_j_flood cp_jp_flood cp_btime cp_host_count cp_uh_count cp_notify
 set uhost 
[string tolower $uhost]
 
set host [lindex [split $uhost @] 1]
 
set chan [string tolower $chan]
 if {[
lsearch -exact $cp_chans $chan] == -1} {return 0}
 if {![
info exists cp_host_count($host:$chan)]} {
  
set cp_host_count($host:$chan1
 
} else {
  
incr cp_host_count($host:$chan)
 }
 
utimer [lindex $cp_j_flood 1"cp_expire cp_host_count($host:$chan)"
 
if {$cp_host_count($host:$chan) > [lindex $cp_j_flood 0]} {
  
newchanban $chan *!*@$host ClonePro "Not so fast" $cp_btime
          sendnote ClonePro $cp_notify 
"÷ banned *!*@$host (massjoin) on $chan, [ctime [unixtime]] ÷"
  
if {[botisop $chan] && [onchan $nick $chan]} {
   
putserv "KICK $chan $nick :1Join/Part flood tespit edildi."
  
}
    }
 if {![
info exists cp_uh_count($uhost:$chan)]} {
  
set cp_uh_count($uhost:$chan1
 
} else {
  
incr cp_uh_count($uhost:$chan)
 }
 
utimer [lindex $cp_jp_flood 1"cp_expire cp_uh_count($uhost:$chan)"
 
if {$cp_uh_count($uhost:$chan) >= [expr [lindex $cp_jp_flood 0]*2]} {
  
newchanban $chan *!*@$host ClonePro "1Join/Part flood tespit edildi." $cp_btime
          sendnote ClonePro $cp_notify 
"÷ banned *!*@$host (join/part flood) on $chan, [ctime [unixtime]] ÷"
  
if {[botisop $chan] && [onchan $nick $chan]} {
   
putserv "KICK $chan $nick :1Join/Part flood tespit edildi."
  
}
    }
}
proc clone_pro_leave {nick uhost handl chan {reason "Left channel"}} {
 global 
cp_chans cp_jp_flood cp_btime cp_uh_count cp_notify
 set uhost 
[string tolower $uhost]
 
set host [lindex [split $uhost @] 1]
 
set chan [string tolower $chan]
 if {[
lsearch -exact $cp_chans $chan] == -1} {return 0}
 if {![
info exists cp_uh_count($uhost:$chan)]} {
  
set cp_uh_count($uhost:$chan1
 
} else {
  
incr cp_uh_count($uhost:$chan)
 }
 
utimer [lindex $cp_jp_flood 1"cp_expire cp_uh_count($uhost:$chan)"
 
if {$cp_uh_count($uhost:$chan) >= [expr [lindex $cp_jp_flood 0]*2]} {
  
newchanban $chan *!*@$host ClonePro "1Join/Part flood tespit edildi." $cp_btime
          sendnote ClonePro $cp_notify 
"÷ banned *!*@$host (join/part flood) on $chan, [ctime [unixtime]] ÷"
  
if {[botisop $chan] && [onchan $nick $chan]} {
   
putserv "KICK $chan $nick :1Join/Part flood tespit edildi."
  
}
    }
}
proc cp_expire var_exp {
 
upvar $var_exp var_pointer
  
 
if {$var_pointer 1} {
  
incr var_pointer -1
 
} else {
  unset 
var_pointer
 
}
}
set cp_chans [string tolower $cp_chans]
set cp_j_flood [split $cp_j_flood :]
set cp_jp_flood [split $cp_jp_flood :]

# clear variables and timers on rehash
if {[array exists cp_host_count]} {unset cp_host_count}
if {[array 
exists cp_uh_count]} {unset cp_uh_count}
foreach 
check_utimer [utimers] {
 if {[
string match cp_*_count* [lindex $check_utimer 1]]} {
  
killutimer [lindex $check_utimer 2]
 }



 
Alıntı ile Cevapla

Alt 16 Aralık 2007, 22:06   #9
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Tcl Arşivi




Küfür Koruma

PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
##################################################################
## Kufur.tcl v2.0 - Bu .tcl IRCturk Network Team Tarafindan ##
## hazirlanmistir. Eger herhangi bir problemle karsilasirsaniz ##
## yada bir oneriniz varsa 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #0000BB">set bansebebi 
"Kufur Ettiginiz icin Banlandiniz..! - 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #FF8000"># Eger bot oper olup reklam yapanlara gline aticaksa
# bu ayari 1 yapin, aksi takdirde dokunmayin..
set botoper "0"
## Bot oper olucaksa oper username ve sifre
## Dikkat, conf dosyanizda baska bir init-server olmadigindan emin olun
set onick "opernick"
set opass "operpass"
# Kufurler - Eklemek istediginiz kufur varsa asagidan
# ekliyebilirsiniz..
set kufurler 
"salak"
"mal"
"kufur"
}
 
# Bu kadar..!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
#
 
 
 
 
 
 
 
 
 
 
 
 
#
 
 
 
 
 
 
 
 
 
 
 
 
 
 
#
 
 
 
bind pubm - * kufurban
 
 
 
 
 
 
 
#
 
 
 
 
 
 
 
 
 
 
 
 
#
 
 
 
 
 
 
 
 
 
 
 
 
 
 
# DOKUNMAYIN..!
# Dokunmak delikanliyi bozar ;P
 
 
bind evnt init-server botoper_yap

proc botoper_yap 
{type} {
global 
onick opass
if {$botoper == 1} {
putquick "OPER $onick $opass"
}
}
proc kufurban {nick uhost hand chan rest} {
global 
kufurler botoper bansebebi
foreach w $kufurler {
if {[
string match -nocase "* $w *" " $rest "]} { 
if {
$botoper == 1} {
putquick "GLINE +*[string range $uhost [string first @ $uhost] e] 1d :$bansebebi-next
putquick 
"KILL $nick :$bansebebi-next
return 1
} else { 
putquick "MODE $chan +b *!*[string range $uhost [string first @ $uhost] e]" -next
putkick $chan $nick $bansebebi
return 1

}
}
}
#
 
 
 
 
 
 
#
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
#
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
putlog "Kufur.tcl 2.0 by Stonkeep Yuklendi..." 


 
Alıntı ile Cevapla

Alt 16 Aralık 2007, 22:11   #10
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Tcl Arşivi




Koruma 2

PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
# $Id: advertisekick.tcl, eggdrop-1.6.x 2004/5 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
 Exp $
# Begin - Channel Advertise/Spam Kicker Script v3.92.b (advertisekick.tcl)
# Script Version: v3.92.b
# Built Date: March 2004, Last Updated: 4th July 2004
# Copyright © 1999-2004 awyeah (
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
)
# TCL script was designed to work with eggdrop v1.5.x or higher
#########################################################################
#           Channel Advertise/Spam Kicker Script v3.92.b              #
#                                # 
#                                  #
# Author: awyeah                     4th July 2004 #
# Email: 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
             Build version 3.92.b #
# Copyright © 2004 awyeah All Rights Reserved  
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #0000BB">set advertisetype 
"1"
#Set this if you have set the previous setting to '1' for user defined channels, if not then please
#leave this as it is or leave this as empty/blank. (Set the channels on which this script would work)
#USAGE: set advertisechans "#channel1 #channel2 #channel3 #mychannel #yourchannel"
set advertisechans "#eleet #lcas #india #italy #wiredpatrol"

#---------------------------------------#
#    SETUP CHANNEL INTERFACE OPTIONS    #
#---------------------------------------#
#Set the type of channel interface to enable. (MESSAGE, ACTION, NOTICE)
#USAGE: [1/2/3/4] (1=CHANNEL TEXTS, 2=CHANNEL ACTIONS, 3=CHANNEL NOTICES, 4=ALL)
#Use '1' for detecting advertisments from CHANNEL TEXTS. (Will only detect channel texts: /msg #channel)
#Use '2' for detecting advertisments from CHANNEL ACTIONS. (Will only detect channel actions: /me #channel)
#Use '3' for detecting advertisments from CHANNEL NOTICES. (Will only detect channel notices: /notice #channel)
#Use '4' for detecting advertisements from CHANNEL TEXTS, ACTIONS and NOTICES (ALL). (Will detect all channel texts, actions and notices)
set advertiseactivate "4"

#----------------------------------------------#
#    SETUP ADVERTISEMENT DETECTION WORDLIST    #
#----------------------------------------------#
#Set the *advertise words* for the script to react on. (wildcards such as "*" are accepted)
#Already have pre-added all kinds of combinations, normally you would'nt need to edit these. 
#People only edit would need to edit if their language or channel not english.
set advertisewords {
"#*#*"
"*#*#*"
"#*#*#*"
"*#*#*#*"
"#* #*"
"*#* #*"
"#* #* #*"
"*#* #* #*"
"#* *#*"
"*#* *#*"
"#* *#* *#*"
"*#* *#* *#*"
"#* * #*"
"#* * *#*"
"*#* * #*"
"*#* * *#*"
"#* * #* * #*"
"#* * *#* *#*"
"*#* * #* * #*"
"*#* * *#* *#*"
"*/join #*"
"*join #*"
"*join* #*"
"*/join"
"*/join*"
"*/j0in #*"
"*j0in #*"
"*/j0in"
"*/j0in*"
"*/j #*"
"*/j* #*"
"*/j* * #*"
"*join#*"
"*join*#*"
"*j0|n#*"
"*j0|n*#*"
"*j0in#*"
"*j0in*#*"
"*jo|n#*"
"*jo|n*#*"
"*join to * * #*"
"*join to your #*"
"*join to your * #*"
"*go * #*"
"*to #*"
"*come *#*"
"*come to #*"
"*come to* #*"
"*come #*"
"*come /j"
"*come /join"
"*come to /j"
"*come to /join"
"*come /join #*"
"*come *join #*"
"*cometo #*"
"*cometo* #*"
"*cometo /j"
"*cometo /join"
"*cometo /j"
"*cometo /join"
"*come join* http://"
"*come join* #*"
"*come * join* http://"
"*come * join* #*"
"*come join my* http://"
"*come join my* #*"
"*come * join my* http://"
"*come * join my* #*"
"*visit http://*"
"*visit 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #007700">}

#------------------------------------#
#    SETUP USER PUNISHMENT METHOD    #
#------------------------------------#
#Set the type of punishment to declare for the user.
#USAGE: [1/2/3/4] (1=KICK, 2=KICK/BAN, 3=STICKY KICK/BAN, 4=GLOBAL KICK/BAN)
#Use '1' to 'kick' that user from the channel. (Minimal punishment)
#Use '2' to 'kick and ban' that user from the channel. (Moderate punishment)
#Use '3' to 'kick ban' that user using a sticky ban from the bots ban list. (Extreme punishment)
#Use '4' to 'kick ban' that user from all channels the user is found on matching with the bot. (Maximum punishment)
set advertisepunish "2"

#-------------------------#
#    SETUP BAN OPTIONS    #
#-------------------------#
#Select the type of banmask to use when banning the advertiser. 
# 1 - *!*@some.host.com
# 2 - *!*@*.host.com
# 3 - *!*
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.

# 4 - *!*ident@*.host.com
# 5 - *!*ident*@*.host.com
# 6 - *!*ident*@some.host.com
# 7 - nick*!*@*.host.com
# 8 - *nick*!*@*.host.com
# 9 - nick*!*@some.host.com
# 10 - *nick*!*@some.host.com
# 11 - nick!
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
.com
# 12 - nick!ident@*.host.com
# 13 - *nick*!*
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
.com
# 14 - nick*!*ident*@some.host.com
# 15 - *nick*!*ident*@some.host.com
# 16 - nick!*ident*@some.host.com
# 17 - nick*!*ident@*.host.com
# 18 - nick*!*ident*@*.host.com
# 19 - *nick*!*ident@*.host.com
# 20 - *nick*!*ident*@*.host.com
set advbanmask "1"
#Set the amount of time in minutes to ban the user for. (in mins)
#(By default if you don't set a value the script will assume it to be 60 minutes)
set advertisebantime "30"

#-------------------------------#
#    SETUP KICK MESSAGE TYPE    #
#-------------------------------#
#Set this if you would like to use your own KICK message for kicking the advertiser.
#If you set this OFF then the scripts default kick message will be used.
#USAGE: [0/1] (O=OFF, 1=ON)
set advkickswitch "1"
#Set this if to your customizable KICK message if you have enabled to use your own custom KICK message.
#By Default this is set to the scripts default kick message. (You will need to change this)
set advkickmsg "2Advertise/Invite 12word 2detected. 12Mass 2Advertising/Inviting/Spamming 12in 12is not tolerated on this 2channel. 12Failing to 2comply 12with 2these rules 12will result into a 2permanent ban."

#-----------------------------------#
#    SETUP USER EXEMPTION OPTIONS   #
#-----------------------------------#
### IMPORTANT NOTE ###
#For all of the exemption settings below please *DO NOT* use wildcards
#such as: (*, !, *!*, *@*, *!*@*, @*.host.com, *@127.0.0.* etc as they maybe risky)
#(If you do not have any ident, userhost, or ip to enter then please leave the field "")

#### EXEMPT CHANNEL OPERATORS ####
#Set this if you want the bot to exempt all channel operators - ops (@'s) even though if the
#bot has detected an advertise matching word from them. (This is a useful setting for not punishing ops)
#USAGE: [0/1] (0=OFF, 1=ON) - (0=WILL NOT EXEMPT OPS, 1=WILL EXEMPT OPS)
#If set to '0' channel ops will be punished if the bot detects an advertise word from them
#If set to '1' channel ops will be exempted even if the bot detects an advertise word from them
set advexopswitch "1"
#### EXEMPT CHANNEL VOICES ####
#Set this if you want the bot to exempt all channel voices (+v's) even though if the bot has 
#detected an advertise matching word from them. (This is a useful setting for not punishing voices)
#USAGE: [0/1] (0=OFF, 1=ON) - (0=WILL NOT EXEMPT VOICES, 1=WILL EXEMPT VOICES)
#If set to '0' channel voices will be punished if the bot detects an advertise word from them
#If set to '1' channel voices will be exempted even if the bot detects an advertise word from them
set advexvoiceswitch "1"

#### EXEMPT SPECIFIC USER FLAGS ####
#Set this if you want the bot to exempt user flags on the bots user list. Users with certain specific or all 
#flags would be exempted by the bot and will not be punished, even if the bot detects an advertise word from them.
#USAGE: [0/1] (0=OFF, 1=ON) - (0=WILL NOT EXEMPT USERFLAGS, 1=WILL EXEMPT USERFLAGS)
#If set to '0' users/owners on the bots userlist will be punished if the bot detects an advertise word from them
#If set to '1' users/owners on the bots userlist will be exempted even if the bot detects an advertise word from them
set advexflagswitch "1"
#If you have enabled to exempt userflags on the bots userlist and not to punish them, set the 'user flags' 
#for bot owners, masters, ops, voices, users etc which will be exempted from this script.
#(Try not to leave this field empty, atleast fill it with "n" to exempt the bot owner if possible)
#Example: n=owner, m=master, o=op, v=voice, f=friend, b=bot etc
#USAGE: m, n, o, v, f or "mnf", "bfv" etc
set advexflags "mnof|mnof"

#### EXEMPT SPECIFIC NICKS ####
#Set this if you want to enable 'exemption of specific nicks' from this script. (Users with such nicks will be 
#ignored by the script even if they are found to be advertising)
#USAGE: [0/1] (0=OFF, 1=ON)
set advnickswitch "0"
#Set this if you have selected/enabled to 'exempt certain nicks' (if you have set the previous setting to '1'). 
#Set this to the list of 'exempted nicks', which you would like the bot to ignore and wouldn't want to check that 
#user for advertisement words. (If you do not have any 'nick' to exempt then, please leave this as "")
#USAGE: "nick1, bot3, user5, robot7"
set advexnicks "spamcheckerbot"

#### EXEMPT SPECIFIC IDENTS ####
#Set this if you want to enable 'exemption of specific idents' from this script. (Users with such idents will be 
#ignored by the script even if they are found to be advertising)
#USAGE: [0/1] (0=OFF, 1=ON)
set advidentswitch "0"
#Set this if you have selected/enabled to 'exempt certain idents' (if you have set the previous setting to '1').
#Set this to the list of exempted 'user idents' which you would like the bot to ignore when checking users for 
#advertisement words. (If you do not have any 'user ident' to exempt then, please leave this as "")
#(Whois example: awyeah is 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
.com ===> cooldude)
#USAGE: "cooldude, myident, user, script, sweet"
set advexidents "a-user-ident"

#### EXEMPT SPECIFIC HOSTS ####
#Set this if you want to enable 'exemption of your hosts' from this script. (Users with such hosts will be ignored
#by the script even if they are found to be advertising)
#USAGE: [0/1] (0=OFF, 1=ON)
set advhostswitch "0"
#Set this if you have selected/enabled to 'exempt certain hosts' (if you have set the previous setting to '1').
#Set this to the list of 'exempted domains' (user ip addresses) which you would like the bot to ignore 
#when checking for advertisement words. (If you do not have any 'ip addresses' to exempt then, please leave this as "")
#(Whois example: awyeah is 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
 ===> cable.myisp.com)
#USAGE: "cable.myisp.com, name.myuniversity.edu, mindspring.com, cpe.net.cable.rogers.com"
set advexhosts "an-isp-name"

#### EXEMPT SPECIFIC USER HOSTS ####
#Set this if you want to enable 'exemption certain user@hosts' from this script. (Users with such user@host's will be
#ignored by the script even if they are found to be advertising)
#USAGE: [0/1] (0=OFF, 1=ON)
set advuserhostswitch "0"
#Set this if you have selected/enabled to 'exempt certain hosts' (if you have set the previous setting to '1').
#Set this to the list of 'user hosts' (user@host) which you would like the bot to ignore when checking for 
#advertisement words. (If you do not have any 'user@host' to exempt then, please leave this as "")
#USAGE: "rules@127.0.0.1, 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.

Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
.net"
set advexuserhosts "
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
.com"

#### EXEMPT NON-DYNAMIC IDENTS ####
### NOTE: I recommend you keep this setting *OFF*. (Meaning keep this setting to '0') ###
#Set this to ignore users without dynamic idents (idents without ~). Users without a "~" sign infront of their 
#ident will be exempted and ignore by the bot if this setting is enabled and will not be detected for advertisement words.
#USAGE: [0/1] (0=OFF, 1=ON) - (0=DO NOT EXEMPT ANY IDENT, 1=EXEMPT ONLY NON-DYNAMIC IDENTS)
#If set to '0' the script will not ignore any ident and will work as a regular script.
#If set to '1' the script will ignore normal idents (idents without "~" ) and will only detect adverisement 
#words from dynamic idents (idents which have a "~" sign in the beginning of their ident)
#(When enabled: awyeah is 
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
 ===> awesome ==> Will make the user exempted)
#(When enabled: awyeah is ~
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
 ===> ~awesome ===> Will *NOT* make the user exempted)
set advdynamicident "0"

#---------------------------#
#    SETUP KICK COUNTER     #
#---------------------------#
#Set the filename in which you want the user kick record numbers to be stored in. This file would be 
#created in your main *eggdrop* dir, where your bot's .CONF, .CHAN, and .USER files are stored. 
#(You can leave this as it is, if you want)
set advertisekicks "advertisekicks.dat" 

###############################################################################
### Don't edit anything else from this point onwards, even if you know tcl! ###
###############################################################################

bind pubm - * pub:advertise
bind ctcp 
ACTION act:advertise
bind notc 
- * notc:advertise
bind kick 
- * advertise:kick:counter
proc pub
:advertise {nick uhost hand chan text} {
 global 
botnick advertisetype advertisechans
  
if {($nick != $botnick) && ($chan != $botnick)} {; set type "TEXT"
   
if {($advertisetype == 1) && ($advertisechans != "") && ([string match "#*" $advertisechans])} { pub:specific:chans $nick $uhost $hand $chan $type $text }
   if {(
$advertisetype == 2)} { advertise:all:chans $nick $uhost $hand $chan $type $text }
   if {((
$advertisetype != 1) && ($advertisetype != 2)) || ($advertisetype == "0") || ($advertisetype == "")} { return }
   }
}
proc pub:specific:chans {nick uhost hand chan type text} {
 global 
botnick advertiseactivate advertisechans
  
if {($advertiseactivate == 1) || ($advertiseactivate == 4)} {
  if {([
lsearch -exact [split [string tolower $advertisechans]] [string tolower $chan]] != -1)} { advertise:all:chans $nick $uhost $hand $chan $type $text }
  if {([
lsearch -exact [split [string tolower $advertisechans]] [string tolower $chan]] == -1)} { return }
  }
}

proc act:advertise {nick uhost hand chan key text} {
 global 
botnick advertisetype advertisechans
  
if {($nick != $botnick) && ($chan != $botnick)} {; set type "ACTION"
   
if {($advertisetype == 1) && ($advertisechans != "") && ([string match "#*" $advertisechans])} { act:specific:chans $nick $uhost $hand $chan $type $text }
   if {(
$advertisetype == 2)} { advertise:all:chans $nick $uhost $hand $chan $type $text }
   if {((
$advertisetype != 1) && ($advertisetype != 2)) || ($advertisetype == "0") || ($advertisetype == "")} { return }
   }
}
proc act:specific:chans {nick uhost hand chan type text} {
 global 
botnick advertiseactivate advertisechans
  
if {($advertiseactivate == 2) || ($advertiseactivate == 4)} {
  if {([
lsearch -exact [split [string tolower $advertisechans]] [string tolower $chan]] != -1)} { advertise:all:chans $nick $uhost $hand $chan $type $text }
  if {([
lsearch -exact [split [string tolower $advertisechans]] [string tolower $chan]] == -1)} { return }
  }
}

proc notc:advertise {nick uhost hand text {chan ""}} {
 global 
botnick advertisetype advertisechans
  
if {($nick != $botnick) && ($chan != $botnick) && (![string equal $nick "ChanServ"])} {; set type "NOTICE"
   
if {($advertisetype == 1) && ($advertisechans != "") && ([string match "#*" $advertisechans])} { notc:specific:chans $nick $uhost $hand $chan $type $text }
   if {(
$advertisetype == 2)} { advertise:all:chans $nick $uhost $hand $chan $type $text }
   if {((
$advertisetype != 1) && ($advertisetype != 2)) || ($advertisetype == "0") || ($advertisetype == "")} { return }
   }
}
proc notc:specific:chans {nick uhost hand chan type text} {
 global 
botnick advertiseactivate advertisechans
  
if {($advertiseactivate == 3) || ($advertiseactivate == 4)} {
  if {([
lsearch -exact [split [string tolower $advertisechans]] [string tolower $chan]] != -1)} { advertise:all:chans $nick $uhost $hand $chan $type $text }
  if {([
lsearch -exact [split [string tolower $advertisechans]] [string tolower $chan]] == -1)} { return }
  }
}

proc advertise:all:chans {nick uhost hand chan type text} {
 global 
botnick advertisewords advexflags advkickswitch advkickmsg advdynamicident advexnicks advexidents advexhosts advexuserhosts 
 
global advertisekicks advexopswitch advexvoiceswitch advexflagswitch advnickswitch advidentswitch advhostswitch advuserhostswitch 
  set text 
[advertise:filter $text]; set userident [lindex [split $uhost "@"0]; set ipaddress [lindex [split $uhost "@"1]
  if {![
file exists $advertisekicks]} { set file [open $advertisekicks "w"]; puts $file 1close $file }
  if {(
$advdynamicident == "1") && (![string match "*~*" $userident])} { return }
  if {((
$advnickswitch == 1) && ($advexnicks != "") && ([string match -nocase *$advexnicks$nick])) || (($advidentswitch == 1) && ($advexidents != "") && ([string match -nocase *$advexidents$userident])) || (($advhostswitch == 1) && ($advexhosts != "") && ([string match -nocase *$advexhosts$ipaddress])) || (($advuserhostswitch == 1) && ($advexuserhosts != "") && ([string match -nocase *$advexuserhosts$uhost])) } { return }
  if {([
string match -nocase *$chan$text])} { return }
  foreach 
advertiseword [string tolower $advertisewords] {
   if {[
string match -nocase *$advertiseword$text]} {
   if {((
$advexopswitch == 1) && ([isop $nick $chan])) || (($advexvoiceswitch == 1) && ([isvoice $nick $chan])) || (($advexflagswitch == 1) && ([matchattr $hand $advexflags $chan]))} { return }
    if {(
$nick != $botnick) && ($chan != $botnick) && ([botisop $chan]) && ([validchan $chan]) && (![string match -nocase *$chan$text]) && ([onchan $nick $chan])} {
     
set advertiseban [advertise:banmask $uhost $nick]; set advertisetype $type;
     if {(
$advkickswitch == 1) && ($advkickmsg != "")} { advertise:kick:user $nick $chan $advertiseword $advertiseban; return }
     if {(
$advkickswitch == 0)} { advertise:kick:script $nick $chan $advertiseword $advertisetype $advertiseban; return }
      if {((
$advkickswitch != 1) && ($advkickswitch != 0)) || ($advkickswitch == "")} { putlog "ADVERTISE KICK MESSAGE: No kick-message type selected."; return }
      }
    }
  }
}

proc advertise:kick:user {nick chan advertiseword advertiseban} {
 global 
botnick advertisepunish advertisekicks advertisebantime advkickmsg
  set file 
[open $advertisekicks "r"]; set currentkicks [gets $file]; close $fileset totalkicks [expr $currentkicks]; set banmask $advertiseban
  
if {($advkickmsg == "")} { set advkickmsg "0,1 Channel Advertise Kick 12,0 - 2Advertise/Invite 12word 6\"$advertiseword\" 12detected. Mass 2Advertising/Inviting/Spamming 12in 12is not tolerated on this 2channel. 12Failing to 2comply 12with 2these rules 12will result into a 2permanent ban." }
  if {(
$advertisebantime == 0) || ($advertisebantime == "") || ($advertisebantime 1)} { set advertisebantime 60 }
  if {(
$advertisepunish == 1)} { putserv "KICK $chan $nick :$advkickmsg2 - (Kick #$totalkicks)" }
  if {(
$advertisepunish == 2)} { putserv "MODE $chan +b $banmask"putserv "KICK $chan $nick :$advkickmsg2 - (Kick #$totalkicks)"timer $advertisebantime[list advertise:unban $banmask $chan] }
  if {(
$advertisepunish == 3)} { newchanban $chan $banmask advertise $advkickmsg $advertisebantimeputserv "KICK $chan $nick :$advkickmsg2 - (Kick #$totalkicks)" }
  if {(
$advertisepunish == 4)} { newban $banmask advertise $advkickmsg $advertisebantimeputserv "KICK $chan $nick :$advkickmsg2 - (Kick #$totalkicks)" }
  if {(
$advertisepunish != 1) && ($advertisepunish != 2) && ($advertisepunish != 3) && ($advertisepunish != 4)} { putlog "ADVERTISE PUNISHMENT: No punishment type selected."; return }
}
proc advertise:kick:script {nick chan advertiseword advertisetype advertiseban} {
 global 
botnick advertisepunish advertisekicks advertisebantime
  set file 
[open $advertisekicks "r"]; set currentkicks [gets $file]; close $fileset totalkicks [expr $currentkicks]; set banmask $advertiseban
  set advertisemsg 
"2Advertise/Invite 12word 6\"$advertiseword\" 12detected. Mass 2Advertising/Inviting/Spamming 12in 12is not tolerated on this 2channel. 12Failing to 2comply 12with 2these rules 12will result into a 2permanent ban."
  
if {($advertisebantime == 0) || ($advertisebantime == "") || ($advertisebantime 1)} { set advertisebantime 60 }
  if {(
$advertisetype == "TEXT")} { set advertisescriptmsg "0,1 Channel Text Advertise Kick 12,0 - $advertisemsg}; if {($advertisetype == "ACTION")} { set advertisescriptmsg "0,1 Channel Action Advertise Kick 12,0 - $advertisemsg}; if {($advertisetype == "NOTICE")} { set advertisescriptmsg "0,1 Channel Notice Advertise Kick 12,0 - $advertisemsg}
  if {(
$advertisepunish == 1)} { putserv "KICK $chan $nick :$advertisescriptmsg2 - (Kick #$totalkicks)" }
  if {(
$advertisepunish == 2)} { putserv "MODE $chan +b $banmask"putserv "KICK $chan $nick :$advertisescriptmsg2 - (Kick #$totalkicks)"timer $advertisebantime[list advertise:unban $banmask $chan] }
  if {(
$advertisepunish == 3)} { newchanban $chan $banmask advertise $advertisescriptmsg $advertisebantimeputserv "KICK $chan $nick :$advertisescriptmsg2 - (Kick #$totalkicks)" }
  if {(
$advertisepunish == 4)} { newban $banmask advertise $advkickmsg $advertisebantimeputserv "KICK $chan $nick :$advkickmsg2 - (Kick #$totalkicks)" }
  if {(
$advertisepunish != 1) && ($advertisepunish != 2) && ($advertisepunish != 3) && ($advertisepunish != 4)} { putlog "ADVERTISE PUNISHMENT: No punishment type selected."; return }
}

proc advertise:banmask {uhost nick} {
 global 
advbanmask
   
switch -- $advbanmask {
    
set banmask "*!*@[lindex [split $uhost @] 1]" }
    
set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
    
set banmask "*!*$uhost}
    
set banmask "*!*[lindex [split [maskhost $uhost] "!"] 1]" }
    
set banmask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split [maskhost $uhost] "@"] 1]" }
    
set banmask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }
    
set banmask "$nick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
    
set banmask "*$nick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
    
set banmask "$nick*!*@[lindex [split $uhost "@"] 1]" }
    
10 set banmask "*$nick*!*@[lindex [split $uhost "@"] 1]" }
    
11 set banmask "$nick*!*[lindex [split $uhost "@"] 0]@[lindex [split $uhost @] 1]" }
    
12 set banmask "$nick*!*[lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }
    
13 set banmask "*$nick*!*$uhost}
    
14 set banmask "$nick*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }
    
15 set banmask "*$nick*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" 
    
16 set banmask "$nick!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" 
    
17 set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }
    
18 set banmask "$nick!*[lindex [split $uhost "@"] 0]*@[lindex [split [maskhost $uhost] "@"] 1]" 
    
19 set banmask "*$nick*!*[lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }
    
20 set banmask "*$nick*!*[lindex [split $uhost "@"] 0]*@[lindex [split [maskhost $uhost] "@"] 1]" 
    default { 
set banmask "*!*@[lindex [split $uhost @] 1]" }
    return 
$banmask
   
}
}
proc advertise:unban {banmask chan} {
 global 
botnick
  
if {([botisop $chan])} {
   if {([
ischanban $banmask $chan])} {
    
pushmode $chan -b $banmask; return 0
     
}
     if {(![
ischanban $banmask $chan])} {
      return 
0
      
}
   }
}

if {![
file exists $advertisekicks]} {
 
putlog "ADVERTISE KICK COUNTER: The \002advertise kick counter file\002 does not exist. Creating file \002$advertisekicks\002."
 
set file [open $advertisekicks "w"]
 
puts $file 1
 close $file
}
### Thanks to NeOmAtRiX for this kick counter ###
proc advertise:kick:counter {nick uhost handle chan target arg} {
 global 
botnick advertisekicks
  
if {[string tolower $target] == [string tolower $botnick]} { return }
  if {[
string tolower $nick] == [string tolower $botnick]} {
   if {![
file exists $advertisekicks]} {
    
putlog "ADVERTISE KICK COUNTER: The advertise kick counter file does not exist. Creating file $advertisekicks."
    
set file [open $advertisekicks "w"]
    
puts $file 1close $file 
    
}
    
set file [open $advertisekicks "r"]
    
set currentkicks [gets $file]; close $file
    set file 
[open $advertisekicks "w"]
    
puts $file [expr $currentkicks 1]; close $file
    
}
}

### Thanks to ppslim for this filter ###
proc advertise:filter {str} {
  
regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007$str "" str
  
return $str
}

putlog "\[LOADED\] Channel Advertise/Spam Kicker v3.92.b by \002awyeah (
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
)\002"
if {($advertisetype == 1)} { putlog "Advertise/Spam Kicker is \002*ACTIVE*\002 on: \002$advertisechans\002" }
if {(
$advertisetype == 2)} { putlog "Advertise/Spam Kicker IS \002*ACTIVE*\002 on: \002All channels\002" }
if {((
$advertiseactivate == 1) || ($advertiseactivate == 2) || ($advertiseactivate == 3) || ($advertiseactivate == 4)) && (($advertisetype != 1) && ($advertisetype != 2))} { putlog "Advertise/Spam Kicker is \002*NOT ACTIVE*\002 because: \002No *channel activation type* has been seletected\002" }
if {((
$advertisetype == 1) || ($advertisetype == 2)) && (($advertiseactivate != 1) && ($advertiseactivate != 2) && ($advertiseactivate != 3) && ($advertiseactivate != 4))} { putlog "Advertise/Spam Kicker is \002*NOT ACTIVE*\002 because: \002No *channel interface* has been seletected\002" }
if {(
$advertisetype != 1) && ($advertisetype != 2) && ($advertiseactivate != 1) && ($advertiseactivate != 2) && ($advertiseactivate != 3) && ($advertiseactivate != 4)} { putlog "Advertise/Spam Kicker is \002*NOT ACTIVE*\002 because: \002No *channel activation type* and *channel interface* has been seletected\002" }
return 


 
Alıntı ile Cevapla

Cevapla

Etiketler
arsivi, arşivi, tcl


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Açık
Refbacks are Açık


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
V i d e o Gif Arşivi Zen Avatar ve Smiley 9 29 Ağustos 2013 15:42
IRC Bot Arşivi.. PhoeniX61 IRCd Botlar 1 03 Mart 2012 00:12
BMW Arşivi Hasan Otomobil Haberleri 0 26 Temmuz 2006 11:32