bind pub - !lire pub:!lire
proc pub:!lire { nick uhost hand channel args } {
global rep
if {$channel != "#abus"} { putserv "notice $nick :14Tu dois être sur 3#abus14 pour utiliser cette commande !"; return }
set rabus [open $rep/abus.txt "r"]
if {$rabus == ""} { putserv "privmsg $channel :14Aucune plainte 3$nick 14!"; return }
putserv "privmsg $channel :14Bonjour 3$nick14, il y a eu des plaintes pendant ton absence :"
while {![eof $rabus]} {
set liste [gets $rabus]
if { $liste != "" } {
putserv "PRIVMSG $channel :$liste"
}
unset liste
}
close $rabus
return 0
}