04/12/2009, 09:51
Soit je suis aveugle, soit ...
Quelqu'un pourrais me dire se qui ne marche pas la dessus dans ce code :/
Quelqu'un pourrais me dire se qui ne marche pas la dessus dans ce code :/
tcl
bind join - {#ircb_eggs*} join:ageWarning
bind msgm - * msg:ageWarning
proc join:ageWarning {nick uhost hand chan text} {
global botnick
# Si c'est le bot, on ignore
if {$nick eq $botnick} {
putquick [concat PRIVMSG $chan :\[$chan\] Salut..]
}
proc msg:ageWarning {nick uhost hand text} {
# On verifie l'entré
if {![regexp -nocase {ai .+?([0-9+]).+? ans} -> age]} {
# On vérifie l'age
if {$age >= 18} {
# Invite de l,user sur #-18ans
putquick [concat INVITE $nick #-18ans]
# Envoie de notice au Op
putquick [concat NOTICE @#ircb_eggs :$nick déclare avoir - de 18 ans.]
}
}
}