15/07/2009, 00:30
(Modification du message : 15/07/2009, 00:31 par cestlemien.)
Re,
bon,j'ai test,mais pas concluant
il compte bien les joins,mais pas de mp envoyé. :/
bon,j'ai test,mais pas concluant
tcl
#----------------------
#nickregister SCAN SCRIPT -
#--------------------
# absolu [creation] 14/07/2009
# :raw311 : whois
# : raw307: nickregister
# : envois du message sur opchan avec le salon ou se trouve le nick detecté
# : mise en place un message en mp à l'user.
# commandes:
# !mpcount affiche total de mp sur nombre de whois
# !mpreset remet a zero le compteur
set count_whois 0
set count_mp 0
#------->> request registernick <<-----
set badr(list) {
"*n'est pas enregistré.*"
"*not reg*"
}
#----->> Info chan <<-----
set opchan "#log-chan"
#----->> Chan à Scanner, seperé par un espace <<-----
set badr(chan) "#channel1 #channel2"
#binds
bind join - "$badr(chan) *" brealname:join
bind raw - 311 brealname:check
bind PUB - !compte mp_count
bind PUB - !reset mp_reset
# join
proc brealname:join {nick host hand chan} {
global WhoisNick WhoisNickWarn
if {[strlwr $nick] == [strlwr $::botnick] || [matchattr $hand of|fo $chan]} {
return 0
}
if {([info exists WhoisNickWarn($host)] == 1)} {
return 0
}
set WhoisNickWarn($host) 1
timer 2 "unset WhoisNickWarn($host)"
if {([info exists WhoisNick] == 1)} {
if {$WhoisNick == 5} {
putlog "$WhoisNick Whois max"
return 0
}
incr WhoisNick
} else {
set WhoisNick 1
utimer 2 "unset WhoisNick"
}
putserv "WHOIS $nick"
}
# check
proc brealname:check {from key arg} {
global opchan count_whois count_mp
incr count_whois
set realname [ctrl:filter [string range $arg [expr [string first : $arg]+1] end] ]
foreach bla $::badr(list) {
if {![string match -nocase $bla $realname]} {
continue
}
putserv "PRIVMSG $opchan :ACTION 4 Info nickerv :4 [lindex [split $arg] 1] n'estpas enregistré sur $::badr(chan) 0 - PV informatif eFFectué - $count_whois "
putserv "PRIVMSG [lindex [split $arg] 1] : STP,pour une meilleure gestion du salon Mercid'enregistrer ton pseudo :lis ceci : http://XXXXXX.nickserv.htm "
incr count_mp
break
}
}
proc mp_count {nick host hand chan text} {
global opchan count_whois count_mp
if {[string match -nocase $chan $opchan] && ([isvoice $nick $chan] || [ishalfop $nick $chan] || [isop $nick $chan])} {
putserv "PRIVMSG $chan : Total de $count_mp MP pour $count_whois join "
}
}
proc mp_reset {nick host hand chan text} {
global opchan count_whois count_mp
if {[string match -nocase $chan $opchan] && [isop $nick $chan]} {
set count_mp 0
set count_whois 0
putserv "PRIVMSG $chan : Compteur de mp remis à zero :) merci de me soulager $nick"
}
}
#ppslim's filter
proc ctrl:filter {str} {
regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str
return $str
}
putlog " \0034Register tcl V1.1a chargé - Register tcl v1.1a -- scan sur: $badr(chan) / report: $opchan\003"
putserv " privmsg #chan-log : \0034 Register tcl V1.1a chargé\003 -- scan sur: $badr(chan) / report: $opchan\003 "
############################# fin du TCL ####################
il compte bien les joins,mais pas de mp envoyé. :/