Bonjour,
Je suis à la recherche d'un TCL qui compte les entrées sur un salon
J'ai bien trouvé un script mais il ne compte que les pseudo différent
et je voudrais qu'il compte toutes les entrées.
Avec un affichage en notice pour l'utilisateur qui entre sur le salon
et avec une commande !compteur a taper en salon
merci
Je pense que si tu avais un peu cherché sur le forum et le wiki, tu aurais trouvé comment faire ça.
Je viens de le mettre sur
http://tools.eggdrop.fr/pasteme/view/d182ebd6 :
tclcopier
set jc "#toto"
set jcpt 0
bind join - * joinc
proc joinc { nick uhost handle chan} {
if { [ string tolower $chan ] ! = [ string tolower $ ::jc ] } { return 0 }
if { [ string tolower $nick ] == [ string tolower $ ::botnick ] } { return 0 }
incr ::jcpt
putserv "NOTICE $nick :Tu es le N°$::jcpt"
return 1
}
bind pub - "!compteur" joindisp
proc joindisp { nick uhost handle chan args} {
if { [ string tolower $chan ] ! = [ string tolower $ ::jc ] } { return 0 }
putserv "PRIVMSG $chan :Il y a eu $::jcpt entrées sur $chan"
return 1
}
(21/09/2014, 11:10) CrazyCat a écrit : [ -> ] Je pense que si tu avais un peu cherché sur le forum et le wiki, tu aurais trouvé comment faire ça.
Je viens de le mettre sur http://tools.eggdrop.fr/pasteme/view/d182ebd6 :
tclcopier
set jc "#toto"
set jcpt 0
bind join - * joinc
proc joinc { nick uhost handle chan} {
if { [ string tolower $chan ] ! = [ string tolower $ ::jc ] } { return 0 }
if { [ string tolower $nick ] == [ string tolower $ ::botnick ] } { return 0 }
incr ::jcpt
putserv "NOTICE $nick :Tu es le N°$::jcpt"
return 1
}
bind pub - "!compteur" joindisp
proc joindisp { nick uhost handle chan args} {
if { [ string tolower $chan ] ! = [ string tolower $ ::jc ] } { return 0 }
putserv "PRIVMSG $chan :Il y a eu $::jcpt entrées sur $chan"
return 1
}
Bonjour,
J'ai chercher dans le forum mais avec le mot clé "compteur" et non "counter"
Désolé
Merci pour ta réponse.
(21/09/2014, 11:25) Yakka a écrit : [ -> ] (21/09/2014, 11:10) CrazyCat a écrit : [ -> ] Je pense que si tu avais un peu cherché sur le forum et le wiki, tu aurais trouvé comment faire ça.
Je viens de le mettre sur http://tools.eggdrop.fr/pasteme/view/d182ebd6 :
tclcopier
set jc "#toto"
set jcpt 0
bind join - * joinc
proc joinc { nick uhost handle chan} {
if { [ string tolower $chan ] ! = [ string tolower $ ::jc ] } { return 0 }
if { [ string tolower $nick ] == [ string tolower $ ::botnick ] } { return 0 }
incr ::jcpt
putserv "NOTICE $nick :Tu es le N°$::jcpt"
return 1
}
bind pub - "!compteur" joindisp
proc joindisp { nick uhost handle chan args} {
if { [ string tolower $chan ] ! = [ string tolower $ ::jc ] } { return 0 }
putserv "PRIVMSG $chan :Il y a eu $::jcpt entrées sur $chan"
return 1
}
Bonjour,
J'ai chercher dans le forum mais avec le mot clé "compteur" et non "counter"
Désolé
Merci pour ta réponse.
Sauf que quand je fais un rehash le compteur se remet à zéro
donc je pense avec une inscription dans une base de donnée serait le mieux
Merci
Si je veux remettre le compteur a zero je dois faire comment ?
Merci a toi
une dernière chose si je veux que ça fonctionne sur plusieurs salon
set jc "#toto #toto2"
set jc "#toto, #toto2"
ne fonctionne pas
Merci
Normal, tu as demandé "sur un canal".
Mets en commentaire les lignes suivantes pour que le script fonctionne sur tous les canaux.
tclcopier
if { [ string tolower $chan ] ! = [ string tolower $ ::jc ] } { return 0 }