Création de fichier | écriture
#2
Je pense qu'utiliser un timer n'est pas une bonne idée... plutôt réagir à ce qui fait varier le nombre d'utilisateurs:
tcl
set canal "#canal"
bind join - "$canal *" log:join
proc log:join {nick uhost handle chan} { log:write }
 
bind part - "$canal *" log:part
proc log:part {nick uhost handle chan {msg ""}} { log:write }
 
bind kick - "$canal *" log:kick
proc log:kick {nick uhost handle chan target reason} { log:write }
 
bind sign - "$canal *" log:quit
proc log:quit {nick uhost handle chan reason} { log:write }
 
proc log:write {} {
   set fp [open "./usernb.$::canal" "w"]
   puts $fp [llength [chanlist $::canal]]
   close $fp
   return 1
}


Répondre


Messages dans ce sujet
RE: Création de fichier | écriture - par CrazyCat - 23/12/2008, 18:38

Atteindre :


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