#ici on configure la variable avec les choix differents de reponses
set test {
"mouah mouah $nick"
"pouet $arg"
}
bind pub - !test pub_test
proc pub_test {nick host hand chan arg} {
global test
putlog "depart du test"
set reply [lindex $test [rand [llength $test]]] <== ici je configure uen variable avec le choix aleatoire de la reponse pour pouvoir la parser
putlog "\$reply: $reply "
if {[string replace $reply "$nick" "$nick" $nick] != -1} { set arg $reply } <= je suis pas que ce soit obligatoire de mettre ca
if {[string replace $reply "$arg" "$arg" $arg] != -1 } { set arg $reply } <= sous forme de condition, j'ai essayer en strin replace normal
puthelp "privmsg $chan : $reply" <= la reponse
return 0
}