Voici un script qui vous permet de retourner chaque jour à minuit, le maximum d'utilisateurs qu'il y a eu dans une journée, ainsi vous pourrez avoir un suivi sur vos statistiques et savoir les heures de pointe ou vous réunissez le plus d'utilisateurs.
Pour activer le script dans un channel : .chanset #channel +dstats
Modifier la variable "backlog" par votre channel de log.
Info: Le script est multi channel.
Un exemple de ce que vous retournera votre eggdrop chaque jour à minuit :
Pour activer le script dans un channel : .chanset #channel +dstats
Modifier la variable "backlog" par votre channel de log.
Info: Le script est multi channel.
tcl
namespace eval daily {
variable dcur
variable dmax
variable hmax
variable backlog "#votre-chan-de-log"
setudef flag dstats
proc join {nick uhost handle chan} {
if {![channel get $chan dstats]} { return }
::daily::init $chan 1
incr ::daily::dcur($chan)
if {$::daily::dcur($chan) > $::daily::dmax($chan)} {
set ::daily::dmax($chan) $::daily::dcur($chan)
set ::daily::hmax($chan) [clock seconds]
putlog "$chan :Nouveau record quotidien : $::daily::dcur($chan) (enregistré: $::daily::dmax($chan)) à [clock format $::daily::hmax($chan) -format "%T" -locale fr] "
}
}
proc part {nick uhost handle chan text} {
::daily::leave $chan $nick exited
}
proc quit {nick uhost handle chan text} {
::daily::leave $chan $nick quit
}
proc kick {nick uhost handle chan target text} {
::daily::leave $chan $target kicked
}
proc leave {chan nick mode} {
if {![channel get $chan dstats]} { return }
::daily::init $chan 0
incr ::daily::dcur($chan) -1
}
proc init {chan join} {
if {![info exists ::daily::dcur($chan)]} {
set ::daily::dcur($chan) [llength [chanlist $chan]]
if {$join == 1} {
incr ::daily::dcur($chan) -1
}
}
if {![info exists ::daily::dmax($chan)]} {
set ::daily::dmax($chan) $::daily::dcur($chan)
}
}
proc cron {mi ho da mo dw} {
putserv "PRIVMSG $::daily::backlog :Max utilisateurs le \002[clock format [clock scan "yesterday"] -format "%A %d %B %Y" -locale fr]\002:"
foreach chan [channels] {
if {![channel get $chan dstats]} { continue }
if {![info exists ::daily::dmax($chan)]} {
putserv "PRIVMSG $::daily::backlog :Pas de stats pour $chan aujourd'hui."
} else {
putserv "PRIVMSG $::daily::backlog :$chan :\002 $::daily::dmax($chan)\002 users à [clock format $::daily::hmax($chan) -format "%T" -locale fr]"
}
unset ::daily::dmax($chan)
unset ::daily::dcur($chan)
::daily::init $chan 0
}
}
bind join - * ::daily::join
bind part - * ::daily::part
bind sign - * ::daily::quit
bind kick - * ::daily::kick
bind cron - "00 00 * * *" ::daily::cron
}
Un exemple de ce que vous retournera votre eggdrop chaque jour à minuit :
Quote:<Eggdrop> Max utilisateurs le dimanche 02 avril 2023:
<Eggdrop> #Home : 19 users à 22:18:42