rendered paste bodyproc pot:liste { chan } {
set fichier "./scripts/pot/liste.txt"
if {[file exists $fichier]} {
set count 0
set infile [open $fichier r]
set tampon [read $infile]
close $infile
set tampon [split $tampon "\n"]
if {[expr [llength $tampon] - 1 ] != "-1"} {
putserv "privmsg $chan Liste des \002\037\00310Potentiels\037\002 ( [expr [llength $tampon] - 1 ] ) :\002\0033 [lrange $tampon 0 [expr [llength $tampon] - 2 ]]"
} else {
putserv "privmsg $chan \002\Il n'y a aucun \0033potentiel \0031actuellement"
}
incr count
if {!$count} { eval "exec rm -f $fichier" }
} else {
putserv "privmsg $chan \002\Il n'y a aucun \0033potentiel \0031actuellement"
}
}