rendered paste body
# Channels où le bot répondra :
set aurevoir(chans) "#Chez-MF91.net"
# Editer les mots auxquels le bot doit répondre :
bind pub -|- ciao fun:pub:aurevoir
bind pub -|- bye fun:pub:aurevoir
bind pub -|- @+ fun:pub:aurevoir
bind pub -|- a+ fun:pub:aurevoir
bind pub -|- bonne nuit fun:pub:aurevoir
bind pub -|- bn fun:pub:aurevoir
bind pub -|- bonne nuit fun:pub:aurevoir
# Réponses à l'utilisateur :
set aurevoir(msgs) {
"Salut"
"A plus"
"Ciao"
"GoodBye"
"A Demain"
"A ++"
"Bye Bye"
"Bye"
"Moi aussi je vais y aller"
"Tu peux me déposer quelque part ?"
"Tchao"
"Tu pars déjà ? Bon bah a +"
"A Bientôt"
}
#####################################################################
proc fun:pub:aurevoir {nick uhost hand channel arg} {
global aurevoir fun botnick
if ![matchattr $nick $fun(ignflags) $channel] {
if {[fun:flood $nick $uhost]} {
return 0
}
}
if {(([lsearch -exact [string tolower $aurevoir(chans)] [string tolower $channel]] != -1) || ($aurevoir(chans) == "*")) && (![matchattr $hand b]) && ($nick != $botnick)} {
if ![string length $arg] {
puthelp "PRIVMSG $channel :[lindex $aurevoir(msgs) [rand [llength $aurevoir(msgs)]]] $nick"
return 1
}
}
}