bind join - *!*@* quelquunjoin bind part - *!*@* quelquunpart set dernierhostjoin "" proc quelquunjoin {nick host hand chan} { global dernierhostjoin passwdcs minimumdeproppourcent joursdepuispremiereprop minutesplusvminimum delaideprobation nombredevalmin coteminimale plusvminimumpourmo set joinstotal [getuser CService XTRA visites] set chan [strlwr $chan] if {[botisop $chan] && ($host != $dernierhostjoin)} { set dernierhostjoin $host if [matchattr $hand S] { putbot Aide "notice $nick Hum, il semble que ton accès soit suspendu, pour plus d'informations, utilise /msg AideBot !info" return 0 } if [matchattr $hand d|d $chan] { return 0 } # Avertir un admin ? # if [matchattr $hand L] { putlog " AVERTIR:  [lindex [getuser $hand xtra avertir] 1] (le [dire_date [lindex [getuser $hand xtra avertir] 0]]) a noté ceci sur $hand\ (canal): [lrange [getuser $hand xtra avertir] 2 end]" } # greet # if [matchattr $hand -&+v $chan] { if {[expr [unixtime] - [getuser $hand laston $chan]] > 180} { set msgacc [getchaninfo $hand $chan] if {[string index $msgacc 0] == "@"} { set msgacc [string range $msgacc 1 end] } puthelp "PRIVMSG $chan :\[$nick ([getuser $hand xtra vrainick])\] $msgacc" putbot Aide "notice $nick Bonjour! :-) Merci de venir aider, c'est toujours fort apprécié !" } pushmode $chan +v $nick } # # # if {$chan == "#aide"} { putbot Aide "msg x verify $nick" if {$hand == "*"} { incr joinstotal setuser CService XTRA visites $joinstotal set fc [open /aide/www/compteur.canal w] puts -nonewline $fc $joinstotal close $fc putbot Aide "notice $nick Bonjour $nick! Nous te souhaitons la bienvenue sur #Aide. Pose directement ta question sur le canal et attends la réponse patiemment. S'il n'y a personne pour te répondre, tu peux utiliser la commande !aide Merci! :¬)" } } if [matchattr $hand b] { if {$hand == "CService"} { putbot Aide "msg $chan \[$nick\] Ha!? Où étais tu passé toi ??" puthelp "PRIVMSG w@channels2.undernet.org :login $chan $passwdcs" } elseif {$hand == "Aide"} { putbot Aide "msg $chan \[$nick\] Ben oui, c'est moi que re-voilà ;-p" } else { } } if [matchattr $hand d|d #Aide] { putloglev 7 $chan "8À SURVEILLER: $nick ($hand) vient d'entrer sur $chan ." } if [matchattr $hand V] { if {[getuser $hand XTRA premiereprop] != ""} { set tdpp [expr [expr [unixtime] - [getuser $hand XTRA premiereprop]] / 86400] if {$tdpp >= $joursdepuispremiereprop} { set ndp [llength [getuser $hand xtra props]] set pcndp [expr $ndp * 100.0 / [llength [userlist AGCTORPJKM]]] if {$pcndp > $minimumdeproppourcent} { set tpv [getuser $hand XTRA statsplusoncanal] if {$tpv > $minutesplusvminimum} { foreach admin [userlist A] { putdccsi [hand2idx $admin] "3*** AJC -> Nouveau *** $nick ($hand) vient d'entrer sur $chan ." } } } } } } if [matchattr $hand N] { set delai [expr [expr [unixtime] - [getuser $hand xtra date]] / 86400] if {$delai >= $delaideprobation} { set evals [llength [getuser $hand xtra eval]] if {$evals >= $nombredevalmin} { set plusv [expr [getuser $hand xtra statsplusoncanal] /60] if {$plusv >= $plusvminimumpourmo} { set cote 0 foreach score [getuser $hand xtra eval] { set cote [expr $cote + [lindex $score 1]] } set cote [string range [expr 20.0 * $cote / $evals] 0 3] if {$cote >= $coteminimale} { foreach admin [userlist A] { putdccsi [hand2idx $admin] "3*** Nouveau -> Membre officiel *** $nick ($hand) vient d'entrer sur $chan ." } } } } } } } } proc quelquunpart {nick host hand chan partmsg} { set chan [strlwr $chan] if [botisop $chan] { if {($hand == "*") && ($chan == "#aide")} { putbot Aide "notice $nick Le service bénévole que nous offrons vous a plu? Venez signer le Livre des Heureux, sur la page de #Aide, au http://www.aide.igt.net ! Un petit bonjour nous fera tellement plaisir ! :¬)" } } } ################################ ### Membre de CService ou ircOp? bind bot - verify verify_join proc verify_join {bot command args} { set letype [lindex [lindex $args 0] 0] set nom [lindex [lindex $args 0] 1] set niveau [lindex [lindex $args 0] 2] set hand [nick2hand $nom] if {$hand == "*"} { adduser $nom [trouver_masque $nom #aide] setuser $nom XTRA vrainick $nom setuser $nom XTRA statsjoin 1 setuser $nom XTRA statschon 0 setuser $nom XTRA statspub 0 setuser $nom XTRA statsoncanal 0 setuser $nom XTRA statsplusoncanal 0 setuser $nom XTRA statsonbot 0 chattr $nom +Zf|+v #Aide } set hand [nick2hand $nom] if {$letype == "cservice"} { setuser $hand XTRA special "Membre de CService niveau $niveau" } if {$letype == "ircop"} { setuser $hand XTRA special "Opérateur général sur Undernet (IRCop)" } if ![matchattr $hand AGTCOJRPMNH] { if {$letype == "cservice"} { putbot Aide "notice $nom CService ---> +v !" putbot Aide "notice #Aide $nom ($hand) est un membre autentifié de CService et vient de joindre #Aide (Niveau: $niveau)" putloglev 7 #Aide "7$nom ($hand) est un membre autentifié de CService et vient de joindre #Aide (Niveau: $niveau)" } if {$letype == "ircop"} { putbot Aide "notice $nom IRCop ---> +v !" putbot Aide "notice #Aide $nom ($hand) est un opérateur général sur Undernet (IRCop)" putloglev 7 #Aide "7$nom ($hand) est un opérateur général sur Undernet (IRCop)" } } }