Statistiques d'un canal dans une page HTML
#7
Peut être que le script suivant t'aidera:
tcl
set schan(jeuxfr.quizz) "quizz"
set schan(jeuxfr.motus) "motus"
set schan(jeuxfr.village) "village"
 
set template "/home/user/template.html"
set sfile "/home/user/%fname.count.html"
 
foreach chan [array names $schan] {
	bind join - "#$chan *" statcount
	bind part - "#$chan *" statpart
}
 
proc statpart { nick uhost handle chan {msg ""} } {
   statcount $nick $uhost $handle $chan
   return 0;
}
 
proc statcount { nick uhost handle chan } {
   set fi [open $::template r]
   set lines [read -nonewline $fi]
   close $fi
   set tot [llength [chanlist $chan]]
   regsub -all -- NB_USERS $lines $tot lines
   regsub -all %fname $::sfile $::schan([string range $chan 1 end]) cfile
   set fo [open $cfile w]
   puts $fo $lines
   close $fo
   return 0
}


Répondre


Messages dans ce sujet
RE: Statistiques d'un canal dans une page HTML - par CrazyCat - 12/02/2013, 12:38

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté