01/04/2010, 23:08
apres chercher un peut partout j'ai réussi à faire fonctionner la version de ArtiX
il manquais " ] "
tcl
# Mieux vaut ne pas cumuler les noms génériques
bind pub n &status pub:flagsStatus
#Oué, mettre arg cay le mal
proc pub:flagsStatus {nick uhost hand chan text} {
# On initialise les variables pour Tcl 8.4
set anticloneChans {}
set protectChans {}
# On vérifie chaque canal...
foreach channel [channels] {
# Si le bot est pas dessus, osef
if [onchan $channel] continue
# On ajoute le chan si les flags sont bons
if [channel get $channel "SalonAntiClone"] { lappend anticloneChans $channel }
if [channel get $channel "SalonProtect"] { lappend protectChans $channel }
# Fin du foreach..
}
# On a plus qu'a afficher
if [llength $protectChans] { putserv [concat PRIVMSG $chan :Vip'S activé sur les canaux : [join $protectChans ", "]] }
if [llength $anticloneChans] { putserv [concat PRIVMSG $chan :Anti-clone activé sur les canaux : [join $anticloneChans ", "] ]}
# Cay fini !
return }
il manquais " ] "