it suppose tu voice people who have specifics flags ( +p) as soon as they talk on a channel then remove that voice after a certain time .the problem is that it doesnt voice anybody
anyone ?
Code: Select all
# CONFIGURATION
# -------------
# Sur quel canal cette fonction prendra effet
set channel "#pitchat"
# Combien de temps avant de dévoice
set idletime 20
# Qui voicer? (* pour tout le monde)
set voiceflag p
#################################################
# Manipulation ...
if {![validchan $channel]} {
putlog "$channel n'est pas un canal couvert par $botnick!"
return 0
}
set channel [string tolower $channel]
# Déclanchement événementiel
bind pubm - $voiceflag pubm:revoice
bind time - "* % % % %" time:devoice
# Procédure redonnant le +v
proc pubm:revoice {nick host hand chan text} {
global channel
# Validation du canal
if {[string tolower $chan] != $channel || [isvoice $nick $chan]} {return 0}
putquick "MODE $chan +v $nick"
}
# Procédure enlevant le +v
proc time:devoice {m h d o y} {
global channel idletime
# Listage des usager du canal
foreach list [chanlist $channel] {
# Validation de la néssecité de dévoicer
if {[getchanidle $list $channel] > $idletime} {putserv "Mode $channel -v $list"}
}
return 0
}
Pitchat