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

 Kayıt ol  Topluluk
Yeni Konu aç Cevapla
 
LinkBack Seçenekler Stil
Alt 19 Mart 2007, 22:57   #1
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Kick-Ban sayacını editlemek?




PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
##
# Record Kicks and Bans v1.0
# 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 keep tally on who kicks/bans and e`mails the stats to
# a setable e`mail address. This script is more to monitor who's abusing
# ops privlidges than some kinda "channel stat's" script that so many
# lamers like.
#.
# This script requires that sendmail is installed on the shell. The script
# will automatically search for sendmail on it's own, if it doesn't find it
# then it will not load. If you want to see if your shell has sendmail
# before loading this script, at the shell prompt type: which sendmail
##
##
# Version
#
# v1.0 (09.20.00)
# MC_8 - First release
##
# What channel(s) do you want it to watch?
# Seperate each channel with a space.
set mc_rkb(chan"#*****north"
# What e`mail address do you want to report to?
# If more than 1 e`mail address, split with a ,
set mc_rkb(email"
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
"
# Who do you want to say it's from?
set mc_rkb(from"*****north Abuse Monitor Bot"
# How often do you want to report?
# Use as many of these as you need.
# When the clock roles around, it trys to match what you have set.
# You set the things in the "", it goes:
# min hour day month year
# you can use a * to represent any.
bind time "00 00 * * *" mc:rkb:sendmail
##
# Coding
set mc_rkb(log".wnrkb.log"
set mc_rkb(versionv1.0
set mc_rkb
(chan) [string tolower $mc_rkb(chan)]
if {![
info exists mc_rkb(reset)]} {set mc_rkb(reset) [strftime "%l:%M %P %d %b %Y"]}
if {![
info exists mc_rkb(rr)]} {set mc_rkb(rr"Bot (re)start!"}
bind kick - * mc:rkb:kick
proc mc
:rkb:kick {nick uhost hand chan target reason} {
global 
mc_rkb
if {![string match "* [string tolower $chan] *" " $mc_rkb(chan) "]} {return 0}
if {![
info exists mc_rkb(!kick:$nick)]} {set mc_rkb(!kick:$nick0}
if {![
info exists mc_rkb(!kr:$nick)]} {set mc_rkb(!kr:$nick""}
incr mc_rkb(!kick:$nick) +1
set mc_rkb
(!kr:$nick"$mc_rkb(!kr:$nick) {[split $target][split $chan][split $reason]}"
}
bind mode "* +b" mc:rkb:ban
proc mc
:rkb:ban {nick uhost hand chan mc vic} {
global 
mc_rkb
if {![string match "* [string tolower $chan] *" " $mc_rkb(chan) "]} {return 0}
if {![
info exists mc_rkb(!ban:$nick)]} {set mc_rkb(!ban:$nick0}
if {![
info exists mc_rkb(!br:$nick)]} {set mc_rkb(!br:$nick""}
incr mc_rkb(!ban:$nick) +1
if {[set reason [mc:rkb:inter:banreason $vic $chan]] != "0"} {
set mc_rkb(!br:$nick"$mc_rkb(!br:$nick) {[split $vic][split $chan][split $reason]}"
} {set mc_rkb(!br:$nick"$mc_rkb(!br:$nick) {[split $vic][split $chan]Not a ban in bot, Reason Unknown}"}
}
proc mc:rkb:sendmail {a b c d e} {
global 
mc_rkb mc:rkb:inter:process
if {[file exists $mc_rkb(log)]} {
foreach 
[split $mc_rkb(email) ,] {mc:rkb:inter:email $i 1}
}
set mc_rkb(reset) [strftime "%l:%M %P %d %b %Y"]
set mc_rkb(rr"Sent Report (reset's upon every e`mail)"
}
proc mc:rkb:inter:email {addy arg} {
global 
mc_rkb
if {[catch {exec cat $mc_rkb(log) | $mc_rkb(sendmail:path) -F$mc_rkb(from$addyerror]} {
if {
$arg "4"} {
putlog "Record Kick/Bans, ERROR sending e`mail to $addy. Retry #$arg in 5 seconds."
utimer 5 "mc:rkb:inter:email $addy [expr $arg +1]"
} {
putlog "Record Kick/Bans, Error sending e`mail to $addy. I've tried 4 times...\n ERROR: $error"
}
} {
putlog "Record Kick/Bans, E`mailed $addy successfully!"}
}
proc mc:rkb:inter:banreason {ban chan} {
if {![
isban $ban $chan] && ![isban $ban]} {return 0}
set reason ""
foreach line [banlist] {
if {[
lindex [string tolower $line0] == [string tolower $ban]} {
set reason "[lindex $line 5]: [lindex $line 1]" ; break
}
}
if {
$reason == ""} {
foreach 
line [banlist $chan] {
if {[
lindex [string tolower $line0] == [string tolower $ban]} {
set reason "[lindex $line 5]: [lindex $line 1]" ; break
}
}
} ; if {
$reason == ""} {return 0} {return $reason}
}
proc mc:rkb:inter:process {} {
global 
mc_rkb
set io 
[open $mc_rkb(logw]
puts $io "Kick and Ban tally board. Last reset: $mc_rkb(reset) Due to: $mc_rkb(rr)"
puts $io " "
close $io
foreach var [array names mc_rkb] {
if {![
info exists mc_rkb($var)]} {continue}
set switch [string index $var 0]
set nick [lindex [split $var ":"1]
switch -- 
$switch {
! {
mc:rkb:inter:putlog $nick}
}
}
set io [open $mc_rkb(loga]
puts $io " "
puts $io "... Created by Record Kicks and Bans (tcl) $mc_rkb(version) by MC_8 - Carl M. Gregory"
close $io
}
proc mc:rkb:inter:putlog {nick} {
global 
mc_rkb
set io 
[open $mc_rkb(loga]
puts $io "$nick"
if {[info exists mc_rkb(!kick:$nick)]} {
puts $io " Kicked $mc_rkb(!kick:$nick) people"
unset mc_rkb(!kick:$nick)
if {[
info exists mc_rkb(!kr:$nick)]} {
foreach 
reason $mc_rkb(!kr:$nick) {
set vic [lindex [split $reason ""0]
set chan [lindex [split $reason ""1]
set reason [lrange [split $reason ""2 e]
puts $io " *** kicked [join $vic] from [join $chan] ([join [join $reason]])"
} ; unset mc_rkb(!kr:$nick)
}
}
if {[
info exists mc_rkb(!ban:$nick)]} {
puts $io " Banned $mc_rkb(!ban:$nick) people"
unset mc_rkb(!ban:$nick)
if {[
info exists mc_rkb(!br:$nick)]} {
foreach 
reason $mc_rkb(!br:$nick) {
set vic [lindex [split $reason ""0]
set chan [lindex [split $reason ""1]
set reason [lrange [split $reason ""2 e]
puts $io " *** ban'd [join $vic] on [join $chan] ([join [join $reason]])"
} ; unset mc_rkb(!br:$nick)
}
} ; 
puts $io " " close $io
}
set exists 0
foreach path [split $env(PATH) :] {
if {[
file exists $path/sendmail]} {set exists 1;break}
}
if {
$exists} {set mc_rkb(sendmail:path$path/sendmail} {
putlog "Record Kicks and Bans $mc_rkb(version) by MC_8 could not be loaded."
putlog " `- sendmail is not installed on this shell, please ask the admin to install it."
proc mc:rkb:sendmail {a b c d e} {}
} {
putlog "Record Kicks and Bans $mc_rkb(version) by MC_8 loaded."


bu şekilde bir kick-ban sayacı var burda ban sayacı için

bind mode -"*+b"mc:rkb:ban

bu şekilde bir bind belirtilmiş.Peki bunu +oahvq modeleri içinde yapabilirmiyiz.?Yapabilirsek nasıl?Yardımlarınız için şimdiden Teşekkürler..

 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları reklam ver Benimmekan Mobil Sohbet
Cevapla

Etiketler
editlemek, kickban, sayacini, sayacını


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
DEDAŞ Genel Müdürü'nün su sayacını mühürlediler AngeL Haber Arşivi 0 22 Ocak 2015 13:38
KişiseL Ban Koruması (deop - Kick - ban+kick Yapıyor ) LauReLL mIRC Scripting Hazır Kodlar 0 29 Haziran 2007 06:22
Tüm cL0ne'Ları ile Kick veya Kick+Ban... Cappystarjoe mIRC Scripting Hazır Kodlar 12 30 Ağustos 2005 13:13