####################################### ### Protection des nick des membres ### ####################################### ### Protection bind join - * protlesjoin proc protlesjoin {nick host hand chan} { protectiondesnick $chan $nick $host } bind nick - * protlesnick proc protlesnick {nick host hand chan newnick} { protectiondesnick $chan $newnick $host } proc protectiondesnick {chan nick host} { set hand [nick2hand $nick] set nick [string tolower $nick] if {$hand == "*"} { foreach user [split [userlist ACTOJRPM]] { if {($nick == [string tolower [getuser $user xtra vrainick]]) ||($nick == [string tolower [lindex [getuser $user xtra alias] 0]]) ||($nick == [string tolower [lindex [getuser $user xtra alias] 1]])} { newchanban $chan $nick!*[string range [getchanhost $nick $chan] [string first @ [getchanhost $nick $chan]] end] AideBot "Protection de l'alias de [getuser $user xtra vrainick], change de nick STP." 3 newignore *!*[string range [getchanhost $nick $chan] [string first @ [getchanhost $nick $chan]] end] AideBot "Protection de l'alias de [getuser $user xtra vrainick]" 3 putloglev 8 $chan "J'ai banni $nick!*[string range [getchanhost $nick $chan] [string first @ [getchanhost $nick $chan]] end] pour protéger le nick de [getuser $user xtra vrainick]" } } } } ### Identification set ident_encours 0 bind pub - !ident pub_ident proc pub_ident {nick host hand chan args} { global ident_encours set qui [lindex $args 0] if {$ident_encours | ![onchan $qui #Aide]} { set ident_encours 1 return 0 } set ident_encours 1 utimer 10 {set ident_encours 0} putbot Aide "verify $qui" return 1 } bind dcc - ident dcc_ident proc dcc_ident {hand idx args} { global ident_encours set qui [lindex $args 0] if {$ident_encours | ![onchan $qui #Aide]} { return 0 } set ident_encours 1 putbot Aide "verify $qui" putdcc $idx "J'ai envoyé la vérification d'identité de $qui sur #Aide" return 1 } bind bot - verify bot_verify proc bot_verify {bot command args} { global ident_encours set ident_encours 0 set args [lindex $args 0] set nick [lindex $args 0] set loginx [lindex $args 1] set acces [lindex $args 2] set hand [nick2hand $nick #Aide] set oki 1 if [matchattr $hand A] { set niv "un[mf $hand "" "e"] administrat[mf $hand "eur" "rice"]" } elseif [matchattr $hand OJRPME] { set niv "un[mf $hand "" "e"] membre officiel[mf $hand "" "le"]" } elseif [matchattr $hand N] { set niv "un[mf $hand "" "e"] nouve[mf $hand "au" "lle"] membre en évaluation" } elseif [matchattr $hand V] { set niv "un usager ayant déjà aidé sur le canal" } else { set oki 0 } set conf 1 if {[getuser $hand xtra acces] != $acces} {set conf 0} if {[string tolower [getuser $hand xtra loginx]] != [string tolower $loginx]} {set conf 0} if $oki { if $conf { set msg "$nick est $hand, $niv\." } else { set msg "$nick semble être $hand, $niv\, mais je ne peux le confirmer." } } else { set msg "$nick n'est pas une personne que je reconnais." } putbot Aide "msg #Aide \001ACTION identifie * $msg *\001" }