Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Gestion.Bot v2.0 Final Par alias_angelius.
- #
- # Projet réalisé dans le but que le TCL soit possible pour un débutant tel que moi même si j'ai obtenu des aides et explications.
- #
- # Certaines Idées venant de certaines commandes du script sont de diverses personnes telles que :
- # CrazyCat,Artix,MenzAgitat,Xem,BeussAy,Pain,OpTiXPrO.
- #
- # Et certaines aides venant de ces personnes la aussi, je tien tout particulièrement
- # À remercier l'équipes de Modération de eggdrop.fr pour leur aides/explications sur diverses
- # Commandes et explications sur le fonctionnement de certaines commandes.
- #
- # Idée de passer le TCL en namespace : MenzAgitat.
- # Idée de faire un système d’array pour divers message : Artix.
- # Idée de passer par une double procédure par exemple comme dans le cas du kickban : MenzAgitat.
- # Idée de faire un système de forcing join lors de la diffusion d'un message (infoline) : CrazyCat.
- # Idée de faire passer les binds pub/msg en namespace current : BeussAy.
- # Idée de faire un level op qui et accès sur tout les salons du Robot avec le tcl : OpTiXPrO.
- # Idée de faire un système de authlist : Pain.
- #
- # Et d'autres personnes m'ont suggéré de faire certaines choses dans le TCL si je ne l'ai pas fait c'est
- # Qu'il existe déjà un script TCL correspondant à ceci ou alors que l'utilité de ce qui m'a été demandé
- # N'était pas en rapport avec le but de la fonction de mon TCL.
- #
- # Donc je tiens à signaler que le TCL Gestion.Bot v2.0 Final a été testé sur deux réseaux irc différents :
- #
- # Réseaux Orange : type ircu (TCL tester sur le salon #Trip sans aucun soucis tout fonctionne).
- # Réseaux Zeolia : type unreal (TCL tester sur le salon #Trip sans aucun soucis tout fonctionne).
- #
- # Donc maintenant il ne vous reste plus qu'à remplir la partie variable log commande préfixe et admin.
- #
- # Donc pour ce qui concerne le lancement du TCL c'est assez simple il vous suffira de taper deux commandes :
- #
- # .gbon "commandes à taper sur salon pour activer le TCL sinon certaines commandes ne seront et ne pourront pas être exécutées".
- # Ensuite tapez /msg <pseudo-de-votre-bot> help "ceci vous donnera une aide détaillée sur les commandes diverses de votre
- # Eggdrop ce qu'il pourra exécuter en commande avec le TCL selon votre level bien sûr".
- # NB : à savoir il faut vous authentifier avant de faire cela donc : /msg <pseudo-de-votre-bot> auth <votre-pseudo> <pass> .
- #
- # À partir de là il ne vous reste plus qu'à tester les commandes.
- #
- # Le but du TCL lorsque j'ai codé avec l'aide que l'on m'a apportée :
- # 1 : Permettre aux personnes ne sachant pas coder de prendre exemple dessus s’ils le désirent.
- # 2 : Pouvoir modifier le TCL à votre guise mais en laissant le nom de l'auteur dans le putlog tout de même.
- # 3 : Le TCL peux aider selon les fonctions pour un salon pour se op/deop etc.
- # Voici l'un des buts principaux du TCL en espérant que cela vous conviendra.
- #
- # alias_angelius.
- #
- # Good Fun.
- # Conditions Générales d'Utilisations Du TCL.
- #
- # Maintenant petite explication sur les conditions général d'utilisation du TCL Gestion.Bot.
- #
- # Donc comme je l'ai dit au dessus ils vous et possible de modifier le script TCL et même de pouvoir l'améliorer ou autre.
- # Mais ce que je voudrai ne pas voir c'est que le putlog soit changer en remplaçant le pseudonyme de l'auteur du TCL donc "alias_angelius"
- # Ceci ne vous apportera rien.. Et je ne ferais aucunes aides si j’apprends ceci.
- #
- # Autre information si jamais il vous viendrez à l'idée de ripper vous gêner pas surtout mais si ça fonctionne pas
- # Ne venez pas demander de l'aide.
- #
- # Information il faut accepter les conditions que je viens de donner et de mettre "oui" au niveau de
- # Conditions Générales d'Utilisations ci dessous.
- #
- # Fin de l'explication.
- namespace eval GB {
- # Pseudo Admin du Bot #
- variable admin "alias_angelius"
- # Salon de log #
- variable log "#ops-accueil"
- # Commande Prefix Permet de choisir la commande par défault soit "." ou "!" #
- set commande(choix) "."
- # Conditions Général d'Utilisations #
- set CGU "oui"
- # Array Message #
- array set msg {
- "pvmsg" "Bonjour Je suis le Robot de Gestion\nOn vient de te créer un Access dans ma base de données\nDonc je te conseille de taper la commande qui suit\n/msg Pseudo-Du-Bot conf\nCeci t'aidera pour les premiers pas pour configurer ton mot de passe par exemple\nSi vous ne l'avez pas encore effectué sinon ceci ne vous servira à rien de le tapez\nFin de l'aide.\nPS: Pseudo-Du-Bot (à remplacer par mon pseudo)."
- "bl" "\0034Tu es banni du salon. \00314( \0031Blackliste\00314 )"
- "kick" "Vous venez d'être kické par $nick sur $chan !"
- "kickban" "Exclu(e) de $chan !"
- "nc" "~ Exp/Notice-Chan ~ Pas de notice salon svp"
- "level" "Vous n'avez pas le level suffisant dans $::botnick pour utiliser cette commande $nick !"
- "salon" "Désolé $nick mais le salon que tu demandes est inconnu !"
- "auth" "Avant d'utiliser la commande veuillez vous authentifier au préalable merci : ( /msg $::botnick auth <pseudo> <pass> )"
- "access" "Désolé $nick mais je ne trouve pas ton accès dans ma base de données !"
- "botdeop" "Désolé je ne peux pas exécuter la commande je suis déop sur $chan !"
- "nosalon" "Désolé $nick mais je suis absent du salon $chan !"
- "pseudo" "Désolé mais le pseudonyme demandé n'est pas sur $chan !"
- "nochan" "Désolé $nick mais je ne te vois pas sur $chan !"
- "nopseudo" "Désolé mais vous n'êtes pas présent sur le salon $chan !"
- "iso" "Désolé $nick mais tu me demandes quelque chose alors que tu l'es déjà sur $chan !"
- }
- # Setudef #
- setudef flag GB
- # Retour de Procédure Idée et aide venant de MenzAgitat #
- # Retour Proc Kickban #
- proc ban_user {nick host chan} {
- putquick "MODE $chan +b [::GB::hostmask_process $nick $host 2]"
- putquick "KICK $chan $nick [subst -nocommands -nobackslashes $::GB::msg(kickban)]"
- }
- # Procédure inspiré du Anti-Frenzy de MenzAgitat #
- proc ::GB::hostmask_process {nick host type} {
- set fullhost "$nick!$host"
- set nick "*" ; set ident "*" ; set host "*"
- scan $fullhost "%\[^!\]!%\[^@\]@%s" nick ident host
- set nick [join [string trimleft $nick "@+"]]
- set ident [join [string trimleft $ident "~"]]
- set hostmask $host
- if { [regexp {([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)} $host] } {
- set host [lreplace [split $host .] end end *]
- } else {
- set host [split $host .]
- if { [llength $host] == 3 } { set host [lreplace $host 0 0 *] }
- if { [llength $host] > 3 } { set host [lreplace $host 0 1 *] }
- }
- set domain [join $host .]
- switch "$type" {
- "0" { return "*!$ident@$hostmask" }
- "1" { return "*!*$ident@$hostmask" }
- "2" { return "*!*@$hostmask" }
- "3" { return "*!*$ident@$domain" }
- "4" { return "*!*@$domain" }
- "5" { return "$nick!*$ident@$hostmask" }
- "6" { return "$nick!*$ident@$hostmask" }
- "7" { return "$nick!*@$hostmask" }
- "8" { return "$nick!*$ident@$domain" }
- "9" { return "$nick!*@$domain" }
- "10" { return "*!$ident@$domain" }
- "11" { return "*!$ident@*.IP" }
- "12" { return "*!$ident@*.EpiK" }
- }
- if {[set resultmask $nick!$ident@$fullhost] eq "*!*@*"} { return "invalid!host@mask" }
- return $resultmask
- }
- # PL #
- proc opco {hand idx} {
- putquick "privmsg $::GB::log :\0031\[\00312Connection\0031\] \0034$hand \0033vien de se connecter a la \0036Party-Line.\0036"
- dccbroadcast "\00312Connection PL Autorisé pour \0034$hand\0034"
- }
- proc opdeco {hand idx} {
- putquick "privmsg $::GB::log :\0031\[\00312Déconection\0031\] \0034$hand \0033vien de se déconecter de la \0036Part-Line.\0036"
- dccbroadcast "\00312Déconnection PL pour \0034$hand\0034"
- }
- # Auth #
- proc auth { nick host hand arg } {
- set arg [gbfilter $arg]
- set args [split $arg]
- set chan [lindex $arg 0]
- set pseudo [lindex $arg 0]
- if {[llength $args] != 2} {
- puthelp "notice $nick :\002Erreur :\002 ( /msg $::botnick auth <pseudo> <pass> )"
- return 0
- }
- set password [lindex $args 1]
- if { [nick2hand $pseudo] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![passwdok $pseudo $password]} {
- puthelp "notice $nick :\002Erreur :\002 Votre mot de pass ou/et votre pseudo est/sont incorrect(s) !"
- return 0
- }
- if {![string match -nocase [lindex [getuser $pseudo HOSTS] 0] $host]} {
- puthelp "notice $nick :\002Erreur :\002 Votre host ne correspond pas avec votre access !"
- return 0
- }
- if {[getuser $pseudo XTRA AUTH] eq "ON"} {
- puthelp "notice $nick :\002Erreur :\002 Vous êtes déjà authentifier !"
- return 0
- }
- if {[getuser $hand XTRA SUSPEND] eq "ON"} {
- puthelp "notice $nick :\002Erreur :\002 Vous êtes suspendu !"
- return 0
- }
- puthelp "notice $nick :\0031\[AUTHENTIFICATION REUSSIE\]\0031 Vous êtes maintenant authentifié !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Auth\0036\] \0031par : \0034$hand"
- putquick "invite $nick $::GB::log"
- setuser $pseudo XTRA AUTH ON;
- setuser $hand XTRA SEEN [clock format [clock seconds] -format "le %d/%m/%Y à %Hh%M"]
- save
- return
- }
- # Deauth #
- proc deauth { nick host hand arg } {
- set arg [gbfilter $arg]
- set chan [lindex $arg 0]
- if {[getuser $hand XTRA auth] eq "ON"} {
- puthelp "notice $nick :\0031\[DEAUTHENTIFICATION REUSSIE\]\0031 Vous êtes maintenant deauthentifié !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Deauth\0036\] \0031par : \0034$hand"
- setuser $hand XTRA AUTH OFF;
- save
- return
- }
- }
- # Isauth #
- proc [namespace current]::isauth {hand} {
- if {[getuser $hand XTRA AUTH] eq "OFF"} {return 0}
- if {[getuser $hand XTRA AUTH] eq "ON"} {return 1}
- }
- # Addsuspend #
- proc addsuspend {nick host hand arg} {
- set arg [gbfilter $arg]
- if {![matchattr $hand o]} {
- putserv "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- set arg [split $arg]
- set login [lindex $arg 0]
- if {$login==""} {
- puthelp "notice $nick :\002/msg $::botnick addsuspend\002<login>"
- puthelp "notice $nick :\002Exemple :\002/msg $botnick addsuspend $::GB::admin"
- return 0
- }
- if { [nick2hand $login] eq "*" } {
- puthelp "notice $nick :\002ADDSUSPEND\002: Le login \002$login\002 a aucun accès."
- return 0
- }
- if {[getuser $login XTRA suspend]=="ON"} {
- puthelp "notice $nick :\002ADDSUSPEND\002: Le login \002$login\002 est déjà suspendu."
- return 0
- }
- setuser $login XTRA SUSPEND ON
- puthelp "notice $nick :\002ADDSUSPEND\002: \002$login\002 a été suspendu."
- putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Addsuspend\0036\] \0031ajouté par : \0034$hand pour $login"
- return
- }
- # Delsuspend #
- proc delsuspend {nick host hand arg} {
- set arg [gbfilter $arg]
- if {![matchattr $hand o|]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- set arg [split $arg]
- set login [lindex $arg 0]
- if {$login==""} {
- puthelp "notice $nick :\002/msg $botnick delsuspend\002<login>"
- puthelp "notice $nick :\002Exemple :\002/msg $botnick delsuspend $::GB::admin"
- return 0
- }
- if { [nick2hand $login] eq "*" } {
- puthelp "notice $nick :\002DELSUSPEND\002 : Le login \002$login\002 a aucun accès."
- return 0
- }
- if {[getuser $login XTRA suspend]=="OFF"} {
- puthelp "notice $nick :\002DELSUSPEND\002 : Le login \002$login\002 n'est pas suspendu."
- return 0
- }
- setuser $login XTRA SUSPEND OFF
- puthelp "notice $nick :\002DELSUSPEND\002 : \002$login\002 n'est plus suspendu."
- putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Delsuspend\0036\] \0031retiré par : \0034$hand pour $login"
- return
- }
- # Deauth Part #
- proc partdeauth { nick uhost hand chan {msg ""}} {
- if {[matchattr $hand |o $chan] && [isauth $hand]} {
- setuser $hand XTRA AUTH OFF
- puthelp "notice $nick :Déauthentification suite à votre part du salon.."
- putserv "privmsg $::GB::log :\00314Déauthentification \0036suite au part de \0031: \0034$hand"
- }
- }
- # Deauth Quit #
- proc quitdeauth { nick uhost hand chan {msg ""}} {
- if {[matchattr $hand |o $chan] && [isauth $hand]} {
- setuser $hand XTRA AUTH OFF
- putserv "privmsg $::GB::log :\00314Déauthentification \0036suit au quit de \0031: \0034$hand"
- }
- }
- # Deauth Join #
- proc joindeauth {nick host hand chan} {
- if {$nick=="$::botnick"} {
- putserv "privmsg $::GB::log :\0034Réinitialisation des accès, tous les authentifiés ont été deauth par sécurité.\0034"
- foreach user [userlist * $chan] {
- setuser $user XTRA AUTH OFF
- }
- }
- }
- # Blacklist #
- # Création et Gestion Db #
- if {![file exist database/blacklist.db]} {
- set load [open database/blacklist.db w+]
- close $load
- putlog "\2Je crée le fichier blacklist.db\2"
- }
- if {![file exist database/exempt.db]} {
- set load [open database/exempt.db w+]
- close $load
- putlog "\2Je crée le fichier exempt.db\2"
- }
- proc progfile {file action arg} {
- set arg [gbfilter $arg]
- set return 0
- set dbr [open database/$file.db r+]
- set dbw [open tmp.tmp w+]
- while {![eof $dbr]} {
- set r [gets $dbr]
- if {$r!=""} {puts $dbw $r}
- }
- close $dbr
- close $dbw
- set dbr [open tmp.tmp r+]
- set dbw [open database/$file.db w+]
- while {![eof $dbr]} {
- set r [gets $dbr]
- if {$action=="add"} {
- if {$r!=""} {
- puts $dbw $r
- } else {
- puts $dbw $arg
- }
- set return 1
- }
- if {$action=="del"} {
- if {$r!=""} {
- if {![string match -nocase $arg [lindex $r 0]] && ![string match -nocase $arg [lindex $r 1]]} {
- puts $dbw $r
- } else {
- set return 1
- }
- }
- }
- if {$action=="chk"} {
- if {$r!=""} {
- puts $dbw $r
- if [string match -nocase [lindex $arg 0] [lindex $r 1]] {
- set return [lindex $r 0]
- if ![string match -nocase [lindex $arg 1] [lindex $r 2]] {set return 2}
- if ![string match [lindex $arg 2] [lindex $r 3]] {set return 3}
- }
- }
- }
- if {$action=="icr"} {
- if {$r!=""} {
- puts $dbw $r
- if [string match -nocase $arg [lindex $r 0]] {
- set return 1
- }
- }
- }
- if {$action=="cf"} {
- if {$r!=""} {
- puts $dbw $r
- if [string match -nocase [lindex $r 0] $arg] {
- set return 1
- }
- }
- }
- if {$action=="ibr"} {
- if {$r!=""} {
- puts $dbw $r
- if [string match -nocase $arg [lindex $r 1]] {
- set return 1
- }
- }
- }
- }
- close $dbr
- close $dbw
- return $return
- }
- # Add blacklist #
- proc +blacklist {nick uhost hand chan arg} {
- set arg [gbfilter $arg]
- set verifexempt "[split [lindex $arg 0] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if {[lindex $arg 0]!=""} {
- if {[progfile blacklist icr $nickverife]!="0"} {
- puthelp "notice $nick :Attention le Nick: \2$nickverife\2 est déjà dans la Blacklist ou ne peux etre Blackliste."
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- puthelp "notice $nick :Attention le Nick: \2$nickverife\2 Ne peux être ajouter a la Blackliste."
- return 0
- }
- progfile blacklist add $nickverife
- puthelp "notice $nick :Le Nick: \2$nickverife\2 a bien été ajouté à la blacklist."
- putquick "privmsg $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était ajouter au pseudo des (\0034Blackliste\00314)"
- putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Blacklist\0036\] \0031ajouté par : \0034$hand"
- return 0
- } else {
- puthelp "privmsg $chan :Il faut une victime"
- return 0
- }
- }
- # Del Blacklist #
- proc -blacklist {nick uhost hand chan arg} {
- set arg [gbfilter $arg]
- set verifexempt "[split [lindex $arg 0] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if {[lindex $arg 0]!=""} {
- if {[progfile blacklist del $nickverife]!="1"} {
- puthelp "notice $nick :Attention le Nick: \2$nickverife\2 n'est pas dans la Blacklist."
- return 0
- }
- progfile blacklist del $nickverife
- puthelp "notice $nick :Le Nick: \2$nickverife\2 a bien été supprimé de la blacklist."
- putquick "privmsg $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était retiré au pseudo des (\0034Blackliste\00314)"
- putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Blacklist\0036\] \0031retiré par : \0034$hand"
- return 0
- } else {
- puthelp "privmsg $chan :Il faut une victime"
- return
- }
- }
- # List Blacklist #
- proc .blacklist {nick uhost hand chan arg} {
- set arg [gbfilter $arg]
- set nickb [lindex $arg 0]
- set blusers [open database/blacklist.db r]
- if {[channel get $chan GB]==0} { return; }
- putserv "notice $nick :\2Voici la Blacklist:\2"
- putserv "notice $nick :\2\2"
- while {![eof $blusers]} {
- set bluser [gets $blusers]
- if {$bluser!="" && $nickb==""} {
- putserv "notice $nick :\2Nick:\2 $bluser"
- } elseif [string match -nocase $nickb $bluser] {
- putserv "notice $nick :\2Nick:\2 $bluser."
- }
- }
- putserv "notice $nick :\2Fin de la Blacklist\2."
- putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Blacklist\0036\] \0031par : \0034$hand"
- close $blusers
- putserv "notice $nick :\2\2"
- }
- # Add Exempt #
- proc +exempt {nick uhost hand chan arg} {
- set arg [gbfilter $arg]
- set verifexempt "[split [lindex $arg 0] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if {[lindex $arg 0]!=""} {
- if {[progfile exempt icr $nickverife]!="0"} {
- putserv "notice $nick :Attention le Nick: \2$nickverife\2 est déjà dans la liste des protégés."
- return 0
- }
- progfile exempt add $nickverife
- puthelp "notice $nick :Le Nick: \2$nickverife\2 a bien été ajouté à la liste des protégés."
- putquick "privmsg $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était ajouter au pseudo des (\0034Protégés\00314)"
- putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Exempt\0036\] \0031ajouté par : \0034$hand"
- return 0
- } else {
- puthelp "privmsg $chan :Il faut une victime"
- return 0
- }
- }
- # Del Exempt #
- proc -exempt {nick uhost hand chan arg} {
- set arg [gbfilter $arg]
- set verifexempt "[split [lindex $arg 0] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if {[lindex $arg 0]!=""} {
- if {[progfile exempt del $nickverife]!="1"} {
- putserv "notice $nick :Attention le Nick: \2$nickverife\2 n'est pas dans la liste des protégés."
- return 0
- }
- progfile exempt del $nickverife
- puthelp "notice $nick :Le Nick: \2$nickverife\2 a bien été supprimé de la listes des protégés."
- putquick "privmsg $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était retiré au pseudo des (\0034Protégés\00314)"
- putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Exempt\0036\] \0031retiré par : \0034$hand"
- return 0
- } else {
- puthelp "privmsg $chan :Il faut une victime"
- return
- }
- }
- # List Exempt #
- proc .exempt {nick uhost hand chan arg} {
- set arg [gbfilter $arg]
- set nickb [lindex $arg 0]
- set blusers [open database/exempt.db r]
- if {[channel get $chan GB]==0} { return; }
- putserv "notice $nick :\2Voici la ExemptList:\2"
- putserv "notice $nick :\2\2"
- while {![eof $blusers]} {
- set bluser [gets $blusers]
- if {$bluser!="" && $nickb==""} {
- putserv "notice $nick :\2Nick:\2 $bluser"
- } elseif [string match -nocase $nickb $bluser] {
- putserv "notice $nick :\2Nick:\2 $bluser."
- }
- }
- putserv "notice $nick :\2Fin de la ExemptList\2."
- putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Exempt\0036\] \0031par : \0034$hand"
- close $blusers
- putserv "notice $nick :\2\2"
- }
- # Join #
- proc xbl {n u h c} {
- set k [lindex [split $n |] 0]
- if {[progfile blacklist cf $k]=="1"} {
- set vnick $n
- set hostmask "[split [getchanhost $vnick $c] @]"
- set hostmask "!*@*[lindex $hostmask 1]"
- pushmode $c +b $hostmask
- pushmode $c +b $k!*@*
- pushmode $c +b $k|*!*@*
- puthelp "kick $c $vnick :[subst -nocommands -nobackslashes $::GB::msg(bl)]"
- }
- }
- # AddChan/DelChan/ListChan Msg #
- proc addchan { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- set channel [lindex $text 1]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {$text==""} {
- puthelp "notice $nick :Addchan incorrect ! Veuillez respecter la syntaxe suivante : ( /msg $::botnick addchan <#salon> ) !"
- }
- if ![matchattr $hand o [lindex $text 0]] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if ![string match -nocase $chan] {
- putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Add-Chan\0036\] \0031par : \0034$hand"
- putserv "notice $nick :$chan Rajouter au Addchan !"
- channel add $chan
- savechannels
- return
- }
- }
- # Delchan #
- proc delchan { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- set channel [lindex $text 1]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {$text==""} {
- puthelp "notice $nick :Addchan incorrect ! Veuillez respecter la syntaxe suivante : ( /msg $::botnick delchan <#salon> ) !"
- }
- if ![matchattr $hand o [lindex $text 0]] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if ![string match -nocase $chan] {
- putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Del-Chan\0036\] \0031par : \0034$hand"
- putserv "notice $nick :$chan Retiré des Addchan !"
- channel remove $chan
- savechannels
- return
- }
- }
- # ListChan #
- proc listchan { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- set chans [join [lrange [split $text] 0 0]]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if ![matchattr $hand o| [lindex $text 0]] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if [string match -nocase $chans $chan] {
- set voir 1
- putquick "privmsg $nick :\0034\[Liste Salons\]"
- foreach liste [channels] {
- putquick "privmsg $nick :\0037=>\0032 $voir \0037<= \0033 $liste"
- incr voir 1
- }
- putquick "privmsg $nick :\0036\[Fin De Liste\]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033List-Chan\0036\] \0031par : \0034$hand"
- return 0
- }
- if {[lsearch [channels] $chans $chan]==-1} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return
- }
- }
- # Access/Newpass #
- proc access { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- set mask [lindex $text 1]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if ![string match #* $chan] {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick access <#salon> <mask> )"
- return 0
- }
- if {$mask==""} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick access <#salon> <mask> )"
- return 0
- }
- if ![validchan $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if ![matchattr $hand o|o [lindex $text 0]] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- putserv "privmsg $nick :Liste des access de $chan correspondant à \0031\[ \0034$mask \0031\] :"
- foreach user [userlist |n $chan] {
- if [string match -nocase $mask $user] {
- putserv "privmsg $nick :Owner $user"
- }
- }
- foreach user [userlist |m $chan] {
- if ![matchattr $user |n $chan]&&[string match -nocase $mask $user] {
- putserv "privmsg $nick :Master $user"
- }
- }
- foreach user [userlist |o $chan] {
- if ![matchattr $user |m $chan]&&[string match -nocase $mask $user] {
- putserv "privmsg $nick :Operateur $user"
- }
- }
- foreach user [userlist o|] {
- if [string match -nocase $mask $user] {
- putserv "privmsg $nick :SuperOp $user"
- }
- }
- putserv "privmsg $nick :Fin de la liste d'access."
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Access\0036\] \0031par : \0034$hand"
- return
- }
- # Newpass #
- proc newpass { nick uhost hand text } {
- set text [gbfilter2 $text]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {$text==""} {
- puthelp "notice $nick :Ancien mot de passe incorrect ! Veuillez respecter la syntaxe suivante : ( /msg $::botnick newpass <ancien-pass> <nouveau-pass> ) !"
- }
- if {[getuser $hand PASS]==""} {
- setuser $hand PASS [lindex $text 0]
- puthelp "notice $nick :Mot de passe défini : [lindex $text 0] !"
- return 0
- }
- if {[passwdok $hand [lindex $text 0]]} {
- if {[llength $text]>1} {
- setuser $hand PASS [lindex $text 1]
- puthelp "notice $nick :Nouveau mot de passe défini : [lindex $text 1] !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033New-Pass\0036\] \0031par : \0034$hand"
- return
- }
- }
- }
- # Addop/Addmaster/Addowner/Addsuperop Msg #
- proc addop { nick host hand text } {
- set text [gbfilter2 $text]
- set vhand [lindex [split [lindex $text 0] |] 0]
- set chan [lindex $text 1]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if ![isauth $hand] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* $chan]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick addop <pseudo> <#salon> ) !"
- return 0
- }
- if ![validchan $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if ![matchattr $hand o|m $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if [matchattr $vhand |n $chan] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
- return 0
- }
- if [matchattr $vhand |m $chan] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
- return 0
- }
- if [matchattr $vhand |o $chan] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List Opérateurs sur $chan !"
- return 0
- }
- if [matchattr $vhand |m $chan] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
- return 0
- }
- adduser $vhand $vhand*!*@*
- setuser $vhand HOSTS $vhand!*@*
- setuser $vhand HOSTS $vhand|*!*@*
- chattr $vhand -h|+o $chan
- foreach line [split $::GB::msg(pvmsg) "\n"] {
- putserv "privmsg $vhand :$line"
- }
- puthelp "notice $nick :$vhand a bien été ajouté(e) en tant qu'opérateur sur $chan !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Add-Op\0036\] \0031par : \0034$hand"
- save
- }
- # Addmaster #
- proc addmaster { nick uhost hand text } {
- set text [gbfilter2 $text]
- set vhand [lindex [split [lindex $text 0] |] 0]
- set chan [lindex $text 1]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* $chan]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick addmaster <pseudo> <#salon> ) !"
- return 0
- }
- if ![validchan $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if ![matchattr $hand o|n $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if [validuser [lindex $text 0]] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List"
- return 0
- }
- adduser $vhand [lindex $text 0]*!*@*
- setuser $vhand HOSTS [lindex $text 0]!*@*
- setuser $vhand HOSTS [lindex $text 0]|*!*@*
- chattr $vhand -h|+om [lindex $text 1]
- foreach line [split $::GB::msg(pvmsg) "\n"] {
- putserv "privmsg $vhand :$line"
- }
- puthelp "notice $nick :[lindex $text 0] a bien été ajouté(e) en tant que Master sur [lindex $text 1] !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Add-Master\0036\] \0031par : \0034$hand"
- save
- return
- }
- # Addowner #
- proc addowner { nick uhost hand text } {
- set text [gbfilter2 $text]
- set vhand [lindex [split [lindex $text 0] |] 0]
- set chan [lindex $text 1]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* $chan]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick addowner <pseudo> <#salon> ) !"
- return 0
- }
- if ![validchan $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if ![matchattr $hand o| $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {[validuser [lindex $text 0]]} {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List"
- return 0
- }
- adduser $vhand [lindex $text 0]*!*@*
- setuser $vhand HOSTS [lindex $text 0]!*@*
- setuser $vhand HOSTS [lindex $text 0]|*!*@*
- chattr $vhand -h|+on [lindex $text 1]
- foreach line [split $::GB::msg(pvmsg) "\n"] {
- putserv "privmsg $vhand :$line"
- }
- puthelp "notice $nick :[lindex $text 0] a bien été ajouté(e) en tant que Owner sur [lindex $text 1] !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Add-Owner\0036\] \0031par : \0034$hand"
- save
- return 0
- }
- # Addsuperop #
- proc addsuperop { nick host hand text } {
- set text [gbfilter2 $text]
- set vhand [lindex [split [lindex $text 0] |] 0]
- set chan [lindex $text 1]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if ![isauth $hand] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if ![matchattr $hand o|] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- adduser $vhand $vhand*!*@*
- setuser $vhand HOSTS $vhand!*@*
- setuser $vhand HOSTS $vhand|*!*@*
- chattr $vhand +o
- chattr $vhand -h|
- foreach line [split $::GB::msg(pvmsg) "\n"] {
- putserv "privmsg $vhand :$line"
- }
- puthelp "notice $nick :$vhand a bien été ajouté(e) en tant que SuperOp sur $::botnick !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Add-Superop\0036\] \0031par : \0034$hand"
- save
- }
- # Delop/Delmaster/Delowner/Delsuperop #
- # Delop #
- proc delop { nick uhost hand text } {
- set text [gbfilter2 $text]
- set vhand [lindex [split [lindex $text 0] |] 0]
- set chan [lindex $text 1]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* $chan]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick delop <pseudo> <#salon> ) !"
- return 0
- }
- if ![validchan $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if ![matchattr $hand o|m $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if ![matchattr $vhand |o $chan] {
- puthelp "notice $nick :Ce pseudo ne figure pas dans l'Access-List de $chan !"
- return 0
- }
- if [matchattr $vhand |n $chan] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
- return 0
- }
- if [matchattr $vhand |m $chan] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
- return 0
- }
- delchanrec $vhand $chan
- puthelp "notice $nick :[lindex $text 0] a bien été supprimé(e) de l'Access-List Opérateurs sur [lindex $text 1] !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Del-Op\0036\] \0031par : \0034$hand"
- save
- foreach c [channels] {
- if [haschanrec $vhand $c] {
- return
- }
- }
- deluser $vhand
- save
- }
- # Delmaster #
- proc delmaster { nick uhost hand text } {
- set text [gbfilter2 $text]
- set vhand [lindex [split [lindex $text 0] |] 0]
- set chan [lindex $text 1]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* $chan]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick delmaster <pseudo> <#salon> ) !"
- return 0
- }
- if ![validchan $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if ![matchattr $hand o|n $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if ![matchattr $vhand |o $chan] {
- puthelp "notice $nick :Ce pseudo ne figure pas dans l'Access-List de $chan !"
- return 0
- }
- if [matchattr $vhand |n $chan] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
- return 0
- }
- if ![matchattr $vhand |m $chan] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
- return 0
- }
- delchanrec $vhand $chan
- puthelp "notice $nick :[lindex $text 0] a bien été supprimé(e) de l'Access-List Master sur [lindex $text 1] !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Del-Master\0036\] \0031par : \0034$hand"
- save
- foreach c [channels] {
- if [haschanrec $vhand $c] {
- return
- }
- }
- deluser $vhand
- save
- }
- # Delowner #
- proc delowner { nick uhost hand text } {
- set text [gbfilter2 $text]
- set vhand [lindex [split [lindex $text 0] |] 0]
- set chan [lindex $text 1]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* $chan]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick delowner <pseudo> <#salon> ) !"
- return 0
- }
- if ![validchan $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if ![matchattr $hand o| $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if ![matchattr $vhand |o $chan] {
- puthelp "notice $nick :Ce pseudo ne figure pas dans l'Access-List de $chan !"
- return 0
- }
- if ![matchattr $vhand |n $chan] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
- return 0
- }
- if ![matchattr $vhand |m $chan] {
- puthelp "notice $nick :Ce pseudo figure dans l'Access-List Master sur $chan !"
- return 0
- }
- delchanrec $vhand $chan
- puthelp "notice $nick :[lindex $text 0] a bien été supprimé(e) de l'Access-List Owner sur [lindex $text 1] !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Del-Owner\0036\] \0031par : \0034$hand"
- save
- foreach c [channels] {
- if [haschanrec $vhand $c] {
- return
- }
- }
- deluser $vhand
- save
- }
- # Delsuperop #
- proc delsuperop { nick host hand text } {
- set text [gbfilter2 $text]
- set vhand [lindex [split [lindex $text 0] |] 0]
- set chan [lindex $text 1]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if ![isauth $hand] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if ![matchattr $hand o] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- deluser $vhand
- puthelp "notice $nick :$vhand a bien été supprimé en tant que superop sur $::botnick !"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Del-Superop\0036\] \0031par : \0034$hand"
- save
- }
- # op/deop/voice/devoice/helfop Chan #
- # op #
- proc op { nick host hand chan text } {
- set text [gbfilter2 $text]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {$text!=""} {
- if ![matchattr $hand o|o $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- pushmode $chan +oooooo [join $text]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Op\0036\] \0031par : \0034$hand"
- return 0
- }
- if [isop [join $nick] $chan] {
- putserv "NOTICE $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- pushmode $chan +o [join $nick]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Op\0036\] \0031par : \0034$hand"
- }
- # Deop #
- proc deop { nick host hand chan text } {
- set text [gbfilter2 $text]
- set verifexempt "[split [lindex $text 0] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {$text!=""} {
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
- return 0
- }
- pushmode $chan -oooooo [join $text]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Deop\0036\] \0031par : \0034$hand"
- return 0
- }
- if {![isop [join $nick] $chan]} {
- putserv "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- pushmode $chan -o [join $nick]
- puthelp "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Deop\0036\] \0031par : \0034$hand"
- }
- # Voice #
- proc voice { nick host hand chan text } {
- set text [gbfilter2 $text]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {$text!=""} {
- putserv "mode $chan +vvvvvv [join $text]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Voice\0036\] \0031par : \0034$hand"
- return 0
- }
- if [isvoice [join $nick] $chan] {
- putserv "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- pushmode $chan +v [join $nick]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Voice\0036\] \0031par : \0034$hand"
- }
- # Devoice #
- proc devoice { nick host hand chan text } {
- set text [gbfilter2 $text]
- set verifexempt "[split [lindex $text 0] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
- return 0
- }
- if {$text==""} {
- putserv "mode $chan -vvvvvv [join $text]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Devoice\0036\] \0031par : \0034$hand"
- return 0
- }
- if {![isvoice [join $nick] $chan]} {
- putserv "NOTICE $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- pushmode $chan -v [join $nick]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Devoice\0036\] \0031par : \0034$hand"
- }
- # Halfop #
- proc halfop { nick host hand chan text } {
- set text [gbfilter2 $text]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {$text!=""} {
- if ![matchattr $hand o|o $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- pushmode $chan +hhhhhh [join $text]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Halfop\0036\] \0031par : \0034$hand"
- return 0
- }
- if [isop [join $nick] $chan] {
- putserv "NOTICE $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- pushmode $chan +h [join $nick]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Halfop\0036\] \0031par : \0034$hand"
- }
- # DeHalfop #
- proc dehalfop { nick host hand chan text } {
- set text [gbfilter2 $text]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {$text!=""} {
- if ![matchattr $hand o|o $chan] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- pushmode $chan -hhhhhh [join $text]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Halfop\0036\] \0031par : \0034$hand"
- return 0
- }
- if [isop [join $nick] $chan] {
- putserv "NOTICE $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- pushmode $chan -h [join $nick]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)DeHalfop\0036\] \0031par : \0034$hand"
- }
- # Opall/Deopall/Voiceall/Devoiceall/Halfopall Chan #
- # Opall #
- proc opall {nick host hand chan arg} {
- set arg [gbfilter $arg]
- set arg [split $arg]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|m $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- foreach opall [chanlist $chan] { if [isop $opall $chan] continue; pushmode $chan +o $opall }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Op-All\0036\] \0031par : \0034$hand"
- return
- }
- # Deopall #
- proc deopall { nick host hand chan arg } {
- set arg [gbfilter $arg]
- set arg [split $arg]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|m $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- foreach deopall [chanlist $chan] { if [isvoice $deopall $chan] continue; pushmode $chan -o $deopall }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Deop-All\0036\] \0031par : \0034$hand"
- return
- }
- # voiceall #
- proc voiceall { nick host hand chan arg } {
- set arg [gbfilter $arg]
- set arg [split $arg]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|m $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- foreach voiceall [chanlist $chan] { if [isop $voiceall $chan] continue; pushmode $chan +v $voiceall }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Voice-All\0036\] \0031par : \0034$hand"
- return
- }
- # Devoiceall #
- proc devoiceall { nick host hand chan arg } {
- set arg [gbfilter $arg]
- set arg [split $arg]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> ) !"
- return 0
- }
- if {![matchattr $hand o|m $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- foreach devoiceall [chanlist $chan] { if [isop $devoiceall $chan] continue; pushmode $chan -v $devoiceall }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Devoice-All\0036\] \0031par : \0034$hand"
- return
- }
- # Halfopall #
- proc halfopall {nick host hand chan arg} {
- set arg [gbfilter $arg]
- set arg [split $arg]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|m $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- foreach halfopall [chanlist $chan] { if [isop $halfopall $chan] continue; pushmode $chan +h $halfopall }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Halfop-All\0036\] \0031par : \0034$hand"
- return
- }
- # DeHalfopall #
- proc dehalfopall { nick host hand chan arg } {
- set arg [gbfilter $arg]
- set arg [split $arg]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|m $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- foreach dehalfopall [chanlist $chan] { if [isvoice $dehalfopall $chan] continue; pushmode $chan -h $dehalfopall }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Dehalfop-All\0036\] \0031par : \0034$hand"
- return
- }
- # Opall/Deopall/Voiceall/Devoiceall Msg #
- # Opall #
- proc xopall { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick opall <#salon> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|m [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {![onchan $nick [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- if {[isop [join $nick] [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- foreach xopall [chanlist $chan] { if [isop $xopall $chan] continue; pushmode $chan +o $xopall }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Op-All\0036\] \0031par : \0034$hand"
- }
- # Deopall #
- proc xdeopall { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick deopall <#salon> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|m [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {![onchan $nick [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- foreach xdeopall [chanlist $chan] { if [isvoice $xdeopall $chan] continue; pushmode $chan -o $xdeopall }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Deop-All\0036\] \0031par : \0034$hand"
- }
- # Voiceall #
- proc xvoiceall { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick voiceall <#salon> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|m [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {![onchan $nick [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- foreach xvoiceall [chanlist $chan] { if [isop $xvoiceall $chan] continue; pushmode $chan +v $xvoiceall }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Voice-All\0036\] \0031par : \0034$hand"
- }
- # Devoiceall #
- proc xdevoiceall { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick devoiceall <#salon> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|m [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {![onchan $nick [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- foreach xdevoiceall [chanlist $chan] { if [isop $xdevoiceall $chan] continue; pushmode $chan -v $xdevoiceall }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Devoice-All\0036\] \0031par : \0034$hand"
- }
- # op/deop/voice/devoice Msg #
- # Op #
- proc xop { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick op <#salon> <pseudo(s)> )"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|o [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {[lindex $text 1]!=""} {
- pushmode [lindex $text 0] +oooooo [join [lrange $text 1 end]]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Op\0036\] \0031par : \0034$hand"
- return 0
- }
- if {![onchan $nick [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- if {[isop [join $nick] [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- pushmode [lindex $text 0] +o [join $nick]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Op\0036\] \0031par : \0034$hand"
- }
- # Deop #
- proc xdeop { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- set verifexempt "[split [lindex $text 1] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick deop <#salon> <pseudo(s)> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|o [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![onchan $nick [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- putserv "notice $nick :Attention le Nick: \2$nickverife\2 est dans la liste des protégés."
- return 0
- }
- if {[lindex $text 1] !=""} {
- pushmode [lindex $text 0] -oooooo [join [lrange $text 1 end]]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Deop\0036\] \0031par : \0034$hand"
- return 0
- }
- if {![isop [join $nick] [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- pushmode [lindex $text 0] -o [join $nick]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Deop\0036\] \0031par : \0034$hand"
- }
- # Voice #
- proc xvoice { nick uhost hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick voice <#salon> <pseudo(s)> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|o [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![onchan $nick [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {[lindex $text 1] !=""} {
- pushmode [lindex $text 0] +vvvvvv [join [lrange $text 1 end]]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Voice\0036\] \0031par : \0034$hand"
- return 0
- }
- if [isop [join $nick] [lindex $text 0]] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- pushmode [lindex $text 0] +v [join $nick]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Voice\0036\] \0031par : \0034$hand"
- }
- # Devoice #
- proc xdevoice { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- set verifexempt "[split [lindex $text 1] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick devoice <#salon> <pseudo(s)> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|o [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![onchan $nick [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- putserv "notice $nick :Attention le Nick: \2$nickverife\2 est dans la liste des protégés."
- return 0
- }
- if {[lindex $text 1] !=""} {
- pushmode [lindex $text 0] -vvvvvv [join [lrange $text 1 end]]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Devoice\0036\] \0031par : \0034$hand"
- return 0
- }
- if ![isvoice [join $nick] [lindex $text 0]] {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
- return 0
- }
- pushmode [lindex $text 0] -v [join $nick]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Devoice\0036\] \0031par : \0034$hand"
- }
- # Ban/Kick/Unban/Kickban Chan #
- # Ban #
- proc ban { nick host hand chan text } {
- set text [gbfilter2 $text]
- set verifexempt "[split [lindex $text 0] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {$text == ""} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( $::GB::commande(choix)ban <pseudo/host> ) !"
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
- return 0
- }
- if {[string match *!*@* [lindex $text 0]]} {
- pushmode $chan +b [lindex $text 0]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Ban\0036\] \0031par : \0034$hand"
- return 0
- }
- if {[llength [getchanhost [lindex $text 0]]]!=0} {
- set host [lindex [split [getchanhost [lindex $text 0]] @] 1]
- pushmode $chan +b *!*@$host
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Ban\0036\] \0031par : \0034$hand"
- return
- }
- puthelp "notice $nick :Le pseudo [lindex $text 0] n'est pas sur un de mes salons, je ne peux récupérer son host !"
- }
- # Kick #
- proc kick { nick uhost hand chan text } {
- set text [gbfilter2 $text]
- set Knick "[lindex $text 0]"
- set verifexempt "[split [lindex $text 0] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {$text == ""} {
- puthelp "notice $nick :Syntaxe : ( $::GB::commande(choix)kick <pseudo> ) !"
- return 0
- }
- if {$text != ""} {
- if {![onchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
- return 0
- }
- if {[lindex $text 1] != ""} {
- putquick "kick $chan [lindex $text 0] :[join [lrange $text 1 end]]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Kick\0036\] \0031par : \0034$hand"
- return
- }
- if {[lindex $text 1] == ""} {
- putkick $chan [lindex $text 0] [subst -nocommands -nobackslashes $::GB::msg(kick)]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Kick\0036\] \0031par : \0034$hand"
- return 0
- }
- }
- }
- # Unban #
- proc unban { nick uhost hand chan text } {
- set text [gbfilter2 $text]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {$text == ""} {
- puthelp "notice $nick :Syntaxe : ( $::GB::commande(choix)unban <host> ) !"
- return 0
- }
- if {[string match *!*@* [lindex $text 0]]} {
- pushmode $chan -b [lindex $text 0]
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Unban\0036\] \0031par : \0034$hand"
- return 0
- }
- if {[llength [getchanhost [lindex $text 0]]]!=0} {
- set host [lindex [split [getchanhost [lindex $text 0]] @] 1]
- putquick "mode $chan -b *!*@$host"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Unban\0036\] \0031par : \0034$hand"
- return
- }
- }
- # Kickban #
- proc kickban { nick host hand chan text } {
- set text [gbfilter2 $text]
- set KBnick "[lindex $text 0]"
- set host [lindex [split [getchanhost [lindex $text 0]] @] 1]
- set verifexempt "[split [lindex $text 0] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {$text == ""} {
- puthelp "notice $nick :Syntaxe : ( $::GB::commande(choix)kickban <pseudo> ) !"
- return 0
- }
- if {![onchan [lindex $text 0] $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- if {![botisop [lindex $chan]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
- return 0
- }
- ::GB::ban_user $KBnick *!*@$host $chan
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Kick-Ban\0036\] \0031par : \0034$hand"
- return
- }
- # Ban/Kick/Unban/Kickban MSG #
- # Ban #
- proc xban { nick uhost hand arg } {
- set arg [gbfilter $arg]
- set chan [lindex $arg 0]
- set cible [lindex $arg 1]
- set verifexempt "[split [lindex $arg 1] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if ("[llength $arg]"!="2")||![string match -nocase #* $chan] {
- puthelp "notice $nick :Syntaxe incorrect ( /msg $::botnick ban <#salon> <pseudo/host> ) !"
- return 0
- }
- if {![validchan [lindex $arg 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![botonchan [lindex $arg 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $arg 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {[string match *!*@* $cible]} {
- putquick "mode $chan +b $cible"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Ban\0036\] \0031par : \0034$hand"
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- putserv "notice $nick :Attention le Nick: \2$cible\2 est dans la liste des protégés."
- return 0
- }
- if {[llength [getchanhost $cible]]!=0} {
- set host [lindex [split [getchanhost $cible] @] 1]
- putquick "mode $chan +b *!*@$host"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Ban\0036\] \0031par : \0034$hand"
- return 0
- }
- puthelp "notice $nick :Le pseudo $cible n'est pas sur un de mes salons, je ne peux récupérer son host !"
- }
- # kick #
- proc xkick { nick uhost hand text } {
- set text [gbfilter2 $text]
- set Knick "[lindex $text 0]"
- set chan [lindex $text 0]
- set cible [lindex $text 1]
- set verifexempt "[split [lindex $text 1] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick kick <#salon> <pseudo(s)> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![onchan $nick [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- if {![onchan $cible $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- puthelp "notice $nick :Attention le Nick: \2[lindex $text 1]\2 est dans la liste des protégés."
- return 0
- }
- if {[lindex $text 2] !=""} {
- putquick "kick [lindex $text 0] [lindex $text 1] :[join [lrange $text 2 end]]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Kick\0036\] \0031par : \0034$hand"
- return
- }
- if {[onchan [join [lindex $text 1]] [lindex $text 0]]} {
- putquick "kick [lindex $text 0] [lindex $text 1] :[subst -nocommands -nobackslashes $::GB::msg(kick)]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Kick\0036\] \0031par : \0034$hand"
- return
- }
- }
- # Unban #
- proc xunban { nick uhost hand arg } {
- set arg [gbfilter $arg]
- set chan [lindex $arg 0]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![string match #* [lindex $arg 0]]} {
- puthelp "notice $nick :Syntaxe : ( /msg $::botnick unban <#salon> <host> ) !"
- return 0
- }
- if {[string match *!*@* [lindex $arg 1]]} {
- putquick "mode $chan -b [lindex $arg 1]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Unban\0036\] \0031par : \0034$hand"
- return 0
- }
- if {[llength [getchanhost [lindex $arg 0]]]!=0} {
- set host [lindex [split [getchanhost [lindex $arg 0]] @] 1]
- putquick "mode $chan -b *!*@$host"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Unban\0036\] \0031par : \0034$hand"
- return 0
- }
- }
- # Kickban #
- proc xkickban { nick uhost hand arg } {
- set arg [gbfilter $arg]
- set KBnick "[lindex $text 0]"
- set chan [lindex $arg 0]
- set verifexempt "[split [lindex $arg 1] |]"
- set nickverife "[lindex $verifexempt 0]"
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![string match #* [lindex $arg 0]]} {
- puthelp "notice $nick :Syntaxe : ( /msg $::botnick kickban <#salon> <pseudo> ) !"
- return 0
- }
- if {[progfile exempt icr $nickverife]!="0"} {
- puthelp "notice $nick :Attention le Nick: \2[lindex $arg 1]\2 est dans la liste des protégés."
- return 0
- }
- if {[llength [getchanhost [lindex $arg 1]]]!=0} {
- set host [lindex [split [getchanhost [lindex $arg 1]] @] 1]
- ::GB::ban_user $KBnick *!*@$host $chan
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Kick-Ban\0036\] \0031par : \0034$hand"
- return
- }
- }
- # Clearban/Mode Chan #
- # Clearban #
- proc clearbans { nick host hand chan text } {
- set text [gbfilter2 $text]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|m $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- foreach bsyntaxe [chanbans $chan] {
- putquick "mode $chan -b [lindex $bsyntaxe 0]"
- }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Clear-Bans\0036\] \0031par : \0034$hand"
- }
- # Mode #
- proc mode { nick uhost hand chan text } {
- set text [gbfilter2 $text]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {$text!=""} {
- if {![matchattr $hand o|m $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- putquick "mode $chan $text"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Mode\0036\] \0031par : \0034$hand"
- }
- }
- # Clearbans/Mode Msg #
- # Clearbans #
- proc xclearbans { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick clearbans <#salon> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|m [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- foreach bsyntaxe [chanbans $chan] {
- putquick "mode $chan -b [lindex $bsyntaxe 0]"
- }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Clear-Bans\0036\] \0031par : \0034$hand"
- }
- # Mode #
- proc xmode { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [lindex $text 0]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick mode <#salon> <mode(s)> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {$text!=""} {
- if {![matchattr $hand o|m [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- if {![botisop [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
- return 0
- }
- putquick "mode $chan [lindex $text 1]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Mode\0036\] \0031par : \0034$hand"
- }
- }
- # Topic Chan/Msg #
- # Topic Chan #
- proc topic { nick host hand chan arg} {
- set arg [gbfilter $arg]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- putquick "TOPIC $chan :$arg"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Topic\0036\] \0031par : \0034$hand"
- }
- # Topic Msg #
- proc xtopic { nick host hand text } {
- set text [gbfilter2 $text]
- set chan [string tolower [lindex $text 0]]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick topic <#chan> <text> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if { [string length $text] ne "" } {
- if {![matchattr $hand o|o [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- putquick "TOPIC $chan :[lindex $text 1 end]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Topic\0036\] \0031par : \0034$hand"
- }
- }
- # Infoline #
- proc infoline { nick host hand arg } {
- set arg [gbfilter $arg]
- set chan [string tolower [lindex $arg 0]]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $arg 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick infoline <#salon> <text> ) !"
- return 0
- }
- if {![validchan [lindex $arg 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if { [string length $arg] ne "" } {
- if {![matchattr $hand o|o [lindex $arg 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- setchaninfo $hand $chan [join [lrange $arg 1 end]]
- puthelp "notice $nick :Infoline définie :[join [lrange $arg 1 end]]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Info-Line\0036\] \0031par : \0034$hand"
- }
- }
- # Message au join Infoline de CrazyCat #
- proc greet { nick uhost handle chan } {
- if { ![validuser $handle] } { return; }
- if { [getchaninfo $handle $chan] ne "" } {
- putserv "PRIVMSG $chan :\[$nick\] [getchaninfo $handle $chan]"
- }
- return
- }
- # Notice-Chan #
- proc nonotice_chanoff { nick uhost hand text dest } {
- set text [gbfilter2 $text]
- if ("$nick"=="")||("$dest"=="$::botnick") {return 0}
- if [validuser [finduser $nick!*@*]]&&[matchattr $hand o|o $dest] {return 0}
- if [isop $nick $dest]||[isvoice $nick $dest] {return 0}
- if ![botisop $dest] {return 0}
- if [string match -nocase niubot?? $nick] {return 0}
- set host [lindex [split $uhost @] 1]
- putquick "mode $dest +b *!*@$host"
- putquick "kick $dest $nick :[subst -nocommands -nobackslashes $::GB::msg(nc)]"
- }
- # Amsg #
- proc amsg { nick host hand chan arg } {
- set arg [gbfilter $arg]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![matchattr $hand o|n $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- foreach c [channels] {
- putserv "privmsg $c :\0031\[\00314 Information \0031\] \0034$hand \0032: $arg"
- }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Amsg\0036\] \0031par : \0034$hand"
- }
- # Activation/Désactivation du TCL #
- proc gbon { nick host hand chan arg } {
- set arg [gbfilter $arg]
- if {[channel get $chan GB] == 0} {
- channel set $chan +GB
- putquick "PRIVMSG $chan :TCL Activé !"
- } else {
- putquick "PRIVMSG $chan :TCL déjà Activé !"
- }
- puthelp "privmsg $::GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)gbon\0036\] \0031par : \0034$hand"
- }
- proc gboff { nick host hand chan arg } {
- set arg [gbfilter $arg]
- if {[channel get $chan GB] != 0} {
- channel set $chan -GB
- putquick "PRIVMSG $chan :TCL Désactivé !"
- } else {
- putquick "PRIVMSG $chan :TCL déjà Désactivé !"
- }
- puthelp "privmsg $::GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)gboff\0036\] \0031par : \0034$hand"
- }
- # Auth-List #
- proc authlist { nick host hand arg } {
- set arg [gbfilter $arg]
- set chan [string tolower [lindex $arg 0]]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $arg 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick authlist <#salon> ) !"
- return 0
- }
- if {![validchan [lindex $arg 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if { [string length $arg] ne "" } {
- if {![matchattr $hand o|o [lindex $arg 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- foreach u [userlist] {
- if [matchattr $u o|o $chan] {
- if [isauth $u] {
- putserv "privmsg $nick :\0031\[\00314$u\0031\] \0031: \0036AUTH \0031: \0033YES"
- } else {
- putserv "privmsg $nick :\0031\[\00314$u\0031\] \0031: \0036AUTH \0031: \0034NO"
- }
- }
- }
- }
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Auth-List\0036\] \0031par : \0034$hand"
- }
- # Say/Me Msg #
- # Say #
- proc say { nick uhost hand text } {
- set text [gbfilter2 $text]
- set chan [string tolower [lindex $text 0]]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick say <#salon> <text> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- set chann "[lindex [channels] [lsearch [string tolower [channels]] [string tolower [lindex $text 0]]]]"
- putserv "privmsg [lindex $text 0] :[join [lrange $text 1 end]]"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Say\0036\] \0031par : \0034$hand"
- return
- }
- # Me #
- proc me { nick uhost hand text } {
- set text [gbfilter2 $text]
- set chan [string tolower [lindex $text 0]]
- if {[channel get $chan GB]==0} { return; }
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- if {![isauth $hand]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
- return 0
- }
- if {![string match #* [lindex $text 0]]} {
- puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick me <#salon> <text> ) !"
- return 0
- }
- if {![validchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
- return 0
- }
- if {![matchattr $hand o|o $chan]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
- return 0
- }
- if {![botonchan [lindex $text 0]]} {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
- return 0
- }
- set chann "[lindex [channels] [lsearch [string tolower [channels]] [string tolower [lindex $text 0]]]]"
- putserv "privmsg [lindex $text 0] :\001ACTION [join [lrange $text 1 end]] \001"
- putserv "privmsg $GB::log :\00314Commande \0036\[\0033Me\0036\] \0031par : \0034$hand"
- return
- }
- # Configuration d'aide en pv #
- proc conf { nick host hand arg } {
- set arg [gbfilter $arg]
- set chan [string tolower [lindex $arg 0]]
- if { [nick2hand $nick] eq "*" } {
- puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
- return 0
- }
- putserv "privmsg $nick :Bonjour $nick Pour commencer veuillez taper la commande :"
- putserv "privmsg $nick :/msg $::botnick pass <unpass>"
- putserv "privmsg $nick :Ensuite pour vous authentifier veuillez taper :"
- putserv "privmsg $nick :/msg $::botnick auth $nick <votre-pass>"
- putserv "privmsg $nick :Une fois ceci fait, pour voir un aperçu de mes commandes disponibles auxquelles vous avez accès tapez :"
- putserv "privmsg $nick :/msg $::botnick help"
- putserv "privmsg $nick :Fin de l'aide."
- }
- # Help #
- proc help { nick host hand arg } {
- set arg [gbfilter $arg]
- set commande [lindex $arg 1]
- set commande [stripcodes abcu [lindex $arg 0]]
- if {$commande == ""} {
- puthelp "privmsg $nick :\00314Commande Help du Robot \002\0034$::botnick\002\0034"
- foreach c [channels] {
- if [matchattr $hand o|o $c] {
- puthelp "privmsg $nick :\0031\037Level \002Opérateur\002 :\0037"
- puthelp "privmsg $nick :\00314Auth \0031: \0034Permet de vous identifier auprès du Robot Identifia en MSG !"
- puthelp "privmsg $nick :\00314Op \0031: \0034Permet de te mettre Opérateur \0031(\00312@\0031) \0034 sur le salon ou en Msg, et pour le faire sur quelqu'un aussi !"
- puthelp "privmsg $nick :\00314Deop \0031: \0034Permet de te mettre Deop \0031(\00312-@\0031) \0034 sur le salon ou en Msg, et pour le faire sur quelqu'un aussi !"
- puthelp "privmsg $nick :\00314Halfop \0031: \0034Permet de te mettre Halfop \0031(\00312%\0031) \0034 sur le salon , et pour le faire sur quelqu'un aussi !"
- puthelp "privmsg $nick :\00314Dehalfop \0031: \0034Permet de te mettre Dehalfop \0031(\00312-%\0031) \0034 sur le salon , et pour le faire sur quelqu'un aussi !"
- puthelp "privmsg $nick :\00314Voice \0031: \0034Permet de te mettre voice \0031(\0033+v\0031) \0034 sur le salon ou en Msg, et pour le faire sur quelqu'un aussi !"
- puthelp "privmsg $nick :\00314Devoice \0031: \0034Permet de te mettre Devoice \0031(\0033-v\0031) \0034 sur le salon ou en Msg, et pour le faire sur quelqu'un aussi !"
- puthelp "privmsg $nick :\00314Kick \0031: \0034Permet de Kick quelqu'un sur un salon défini commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Kickban \0031: \0034Permet de Kickban quelqu'un sur un salon défini commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Ban \0031: \0034Permet de Ban quelqu'un sur un salon défini commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Unban \0031: \0034Permet de Unban quelqu'un sur un salon défini commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Access \0031: \0034Permet de regarder la liste d'acces command Msg !"
- puthelp "privmsg $nick :\00314Deauth \0031: \0034Permet de vous déauthentifier auprès du Robot $::botnick commande Msg !"
- puthelp "privmsg $nick :\00314Newpass \0031: \0034Permet de changer votre mot de passe auprès du Robot $::botnick commande Msg !"
- puthelp "privmsg $nick :\00314Infoline \0031: \0034Permet de vous mettre un texte à l'entrée d'un salon commande Msg !"
- puthelp "privmsg $nick :\00314Topic \0031: \0034Permet de mettre un topic sur un salon défini commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Authlist \0031: \0034Permet de regarder qui est authentifié auprès du Robot $::botnick commande Msg !"
- puthelp "privmsg $nick :\00314Say \0031: \0034Permet d'envoyer un message sous forme de /say sur un salon défini commande Msg !"
- puthelp "privmsg $nick :\00314Me \0031: \0034Permet d'envoyer un message sous forme de /me sur un salon défini commande en Msg !"
- break
- }
- }
- foreach c [channels] {
- if [matchattr $hand o|m $c] {
- puthelp "privmsg $nick :\0031\037Level \002Master\002 :\037"
- puthelp "privmsg $nick :\00314Addop \0031: \0034Permet de mettre un user Opérateur sur un salon défini commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Delop \0031: \0034Permet de retirer le level Opérateur sur un salon défini commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Clearbans \0031: \0034Permet de Clearbans tout les bans sur le salon commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Mode \0031: \0034Permet de mettre ou retirer un Mode commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Opall \0031: \0034Permet de mettre tout le monde Op commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Deopall \0031: \0034Permet de mettre tout le monde Deop commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Halfopall \0031: \0034Permet de mettre tout le monde Halfop commande Chan !"
- puthelp "privmsg $nick :\00314Dehalfop \0031: \0034Permet de mettre tout le monde Dehalfop commande Chan !"
- puthelp "privmsg $nick :\00314Voiceall \0031: \0034Permet de mettre tout le monde Voice commande Chan ou Msg !"
- puthelp "privmsg $nick :\00314Devoiceall \0031: \0034Permet de mettre tout le monde Devoice commande Chan ou Msg !"
- break
- }
- }
- foreach c [channels] {
- if [matchattr $hand o|n $c] {
- puthelp "privmsg $nick :\0031\037Level \002Owner\002 :\037"
- puthelp "privmsg $nick :\00314Addmaster \0031: \0034Permet de mettre un user ou un Opérateur d'un salon le level Master commande Msg !"
- puthelp "privmsg $nick :\00314Delmaster \0031: \0034Permet de retirer le level Master sur un salon défini commande Msg !"
- puthelp "privmsg $nick :\00314Amsg \0031: \0034Permet de faire un Amsg sur tout les salons où se situe $::botnick commande Chan seulement sur $::GB::log Il faut taper la commande sinon cela ne fonctionne pas !"
- break
- }
- }
- foreach c [channels] {
- if [matchattr $hand o $c] {
- puthelp "privmsg $nick :\0031\037Level \002SuperOp\002 :\037"
- puthelp "privmsg $nick :\00314Delowner \0031: \0034Permet de retirer le level Owner sur un salon défini commande Msg !"
- puthelp "privmsg $nick :\00314Exempt \0031: \0034Permet de mettre/retirer/regarder les pseudos protégés commande Chan !"
- puthelp "privmsg $nick :\00314Blacklist \0031: \0034Permet de mettre/retirer/regarder la Blacklist commande Chan !"
- puthelp "privmsg $nick :\00314Addsuspend \0031: \0034Permet de suspendre un accéss commande Msg !"
- puthelp "privmsg $nick :\00314Delsuspend \0031: \0034Permet de retirer un suspend commande Msg !"
- puthelp "privmsg $nick :\00314Addchan \0031: \0034Permet de rajouter un autojoin sur un salon au bot commande Msg !"
- puthelp "privmsg $nick :\00314Delchan \0031: \0034Permet de retirer un salon des autojoin au bot commande Msg !"
- puthelp "privmsg $nick :\00314Listchan \0031: \0034Permet de regarder la liste des chan en autojoin qu'il y a dans $::botnick commande Msg !"
- puthelp "privmsg $nick :\00314Addowner \0031: \0034Permet de mettre un user ou Opérateur ou un Master le level Owner commande Msg !"
- puthelp "privmsg $nick :\00314Addsuperop \0031: \0034Permet de mettre un user ou Opérateur ou Master ou Owner le level SuperOp commande Msg !"
- puthelp "privmsg $nick :\00314Delsuperop \0031: \0034Permet de retirer le level SuperOp commande Msg !"
- puthelp "privmsg $nick :\00314Gbon \0031: \0034Permet d'activer le TCL sur un salon défini commande Chan !"
- puthelp "privmsg $nick :\00314Gboff \0031: \0034Permet de désactiver le TCL sur un salon défini commande Chan !"
- break
- }
- }
- puthelp "privmsg $nick :\00314Exemple de commande à taper pour avoir de l'aide plus détaillée\00314"
- puthelp "privmsg $nick :\0034/msg $::botnick help op\0034"
- puthelp "privmsg $nick :\0031\[\0034Info\0031\] \00314Toutes les commandes sont a taper en \002\0031(Minuscules)\002"
- puthelp "privmsg $nick :\0031\037\002Fin du Help !\002"
- puthelp "privmsg $GB::log :\00314Commande \0036\[\0033Help\0036\] \0031par : \0034$hand"
- }
- switch -- $commande {
- "op" {
- puthelp "privmsg $nick :\00314Commande Op Chan \0031: \0034$::GB::commande(choix)op \0031ou \0034$::GB::commande(choix)op <pseudo>"
- puthelp "privmsg $nick :\00314Commande Op Msg \0031: \0034/msg $::botnick op <#salon> \0031ou \0034/msg $::botnick op <#salon> <pseudo>"
- }
- "deop" {
- puthelp "privmsg $nick :\00314Commande Deop Chan \0031: \0034$::GB::commande(choix)deop \0031ou \0034$::GB::commande(choix)deop <pseudo>"
- puthelp "privmsg $nick :\0031Commande Deop Chan \0031: \0034/msg $::botnick deop <#salon> \0031ou \0034/msg $::botnick deop <#salon> <pseudo>"
- }
- "voice" {
- puthelp "privmsg $nick :\00314Commande Voice Chan \0031: \0034$::GB::commande(choix)voice \0031ou \0034$::GB::commande(choix)voice <pseudo>"
- puthelp "privmsg $nick :\00314Commande Voice Msg \0031: \0034/msg $::botnick <voice> <#salon> \0031ou \0034/msg $::botnick <voice> <#salon> <pseudo>"
- }
- "devoice" {
- puthelp "privmsg $nick :\00314Commande Devoice Chan \0031: \0034$::GB::commande(choix)devoice \0031ou \0034$::GB::commande(choix)devoice <pseudo>"
- puthelp "privmsg $nick :\00314Commande Devoice Msg \0031: \0034/msg $::botnick <devoice> <#salon> \0031ou \0034/msg $::botnick devoice <#salon> <pseudo>"
- }
- "halfop" {
- puthelp "privmsg $nick :\00314Commande Halfop Chan \0031: \0034$::GB::commande(choix)halfop \0031ou \0034$::GB::commande(choix)halfop <pseudo>"
- }
- "dehalfop" {
- puthelp "privmsg $nick :\00314Commande Dehalfop Chan \0031: \0034$::GB::commande(choix)dehalfop \0031ou \0034$::GB::commande(choix)dehalfop <pseudo>"
- }
- "halfopall" {
- puthelp "privmsg $nick :\00314Commande Halfopall Chan \0031: \0034$::GB::commande(choix)halfopall \0031ou \0034$::GB::commande(choix)halfopall <pseudo>"
- }
- "dehalfopall" {
- puthelp "privmsg $nick :\00314Commande Dehalfopall Chan \0031: \0034$::GB::commande(choix)dehalfopall \0031ou \0034$::GB::commande(choix)dehalfopall <pseudo>"
- }
- "kick" {
- puthelp "privmsg $nick :\00314Commande Kick Chan \0031: \0034$::GB::commande(choix)kick <pseudo> \0031ou \0034$::GB::commande(choix)kick <pseudo> <raison>"
- puthelp "privmsg $nick :\00314Commande Kick Msg \0031: \0034/msg $::botnick kick <#salon> <pseudo> \0031ou \0034/msg $::botnick kick <#salon> <pseudo> <raison>"
- }
- "kickban" {
- puthelp "privmsg $nick :\00314Commande Kickban Chan \0031: \0034$::GB::commande(choix)kickban <pseudo>"
- puthelp "privmsg $nick :\00314Commande Kickban Msg \0031: \0034/msg $::botnick kickban <#salon> <pseudo>"
- }
- "ban" {
- puthelp "privmsg $nick :\00314Commande Ban Chan \0031: \0034$::GB::commande(choix)ban <pseudo> \0031ou \0034$::GB::commande(choix)ban <host>"
- puthelp "privmsg $nick :\00314Commande Ban Msg \0031: \0034/msg $::botnick ban <#salon> <host>"
- }
- "unban" {
- puthelp "privmsg $nick :\00314Commande Unban Chan \0031: \0034$::GB::commande(choix)unban <pseudo> \ou \0034$::GB::commande(choix)unban <host>"
- puthelp "privmsg $nick :\00314Commande Unban Msg \0031: \0034/msg $::botnick unban <#salon> <host>"
- }
- "access" {
- puthelp "privmsg $nick :\00314Commande Access Msg \0031: \0034/msg $::botnick access <#salon> * \0031ou \0034/msg $::botnick access <#salon> al* \0037Ceci et un exemple le al* cherchera tout les access ayant dans le pseudo (al)"
- }
- "addop" {
- puthelp "privmsg $nick :\00314Commande Addop Msg \0031: \0034/msg $::botnick addop <pseudo> <#salon>"
- }
- "addmaster" {
- puthelp "privmsg $nick :\00314Commande Addmaster Msg \0031: \0034/msg $::botnick addmaster <pseudo> <#salon>"
- }
- "addowner" {
- puthelp "privmsg $nick :\00314Commande Addowner Msg \0031: \0034/msg $::botnick addowner <pseudo> <#salon>"
- }
- "delop" {
- puthelp "privmsg $nick :\00314Commande Delop Msg \0031: \0034 /msg $::botnick delop <pseudo> <#salon>"
- }
- "delmaster" {
- puthelp "privmsg $nick :\00314Commande Delmaster Msg \0031: \0034/msg $::botnick delmaster <pseudo> <#salon>"
- }
- "delowner" {
- puthelp "privmsg $nick :\00314Commande Delowner Msg \0031: \0034/msg $::botnick delowner <pseudo> <#salon>"
- }
- "clearbans" {
- puthelp "privmsg $nick :\00314Commande Clearbans Chan \0031: \0034$::GB::commande(choix)clearbans"
- puthelp "privmsg $nick :\00314Commande Clearbans Msg \0031: \0034/msg $::botnick clearbans <#salon>"
- }
- "mode" {
- puthelp "privmsg $nick :\00314Commande Mode Chan \0031: \0034$::GB::commande(choix)mode <le-mode>"
- puthelp "privmsg $nick :\00314Commande Mode Msg \0031: \0034/msg $::botnick mode <#salon> <mode>"
- }
- "blacklist" {
- puthelp "privmsg $nick :\00314Commande Blacklist Chan \0031: \0034$::GB::commande(choix)blacklist"
- puthelp "privmsg $nick :\00314Commande Blacklist Chan \0031: \0034$::GB::commande(choix)+blacklist <pseudo>"
- puthelp "privmsg $nick :\00314Commande Blacklist Chan \0031: \0034$::GB::commande(choix)-blacklist <pseudo>"
- }
- "exempt" {
- puthelp "privmsg $nick :\00314Commande Exempt Chan \0031: \0034$::GB::commande(choix)exempt"
- puthelp "privmsg $nick :\00314Commande Exempt Chan \0031: \0034$::GB::commande(choix)+exempt <pseudo>"
- puthelp "privmsg $nick :\00314Commande Exempt Chan \0031: \0034$::GB::commande(choix)-exempt <pseudo>"
- }
- "newpass" {
- puthelp "privmsg $nick :\00314Commande Newpass Msg \0031: \0034/msg $::botnick newpass <ancien-pass> <nouveau-pass>"
- }
- "opall" {
- puthelp "privmsg $nick :\00314Commande Opall Chan \0031: \0034$::GB::commande(choix)opall"
- puthelp "privmsg $nick :\00314Commande Opall Msg \0031: \0034/msg $::botnick opall <#salon>"
- }
- "deopall" {
- puthelp "privmsg $nick :\00314Commande Deopall Chan \0031: \0034$::GB::commande(choix)deopall"
- puthelp "privmsg $nick :\00314Commande Deopall Msg \0031: \0034/msg $::botnick deopall <#salon>"
- }
- "voiceall" {
- puthelp "privmsg $nick :\00314Commande Voiceall Chan \0031: \0034$::GB::commande(choix)voiceall"
- puthelp "privmsg $nick :\00314Commande Voiceall Msg \0031: \0034/msg $::botnick voiceall <#salon>"
- }
- "devoiceall" {
- puthelp "privmsg $nick :\00314Commande Devoiceall Chan \0031: \0034$::GB::commande(choix)devoiceall"
- puthelp "privmsg $nick :\00314Commande Devoiceall Msg \0031: \0034/msg $::botnick devoiceall <#salon>"
- }
- "addsuspend" {
- puthelp "privmsg $nick :\00314Commande Addsuspend Msg \0031: \0034/msg $::botnick addsuspend <pseudo>"
- }
- "delsuspend" {
- puthelp "privmsg $nick :\00314Commande Delsuspend Msg \0031: \0034/msg $::botnick delsuspend <pseudo>"
- }
- "addchan" {
- puthelp "privmsg $nick :\00314Commande Addchan Msg \0031: \0034/msg $::botnick addchan <#salon>"
- }
- "delchan" {
- puthelp "privmsg $nick :\00314Commande Delchan Msg \0031: \0034/msg $::botnick delchan <#salon>"
- }
- "listchan" {
- puthelp "privmsg $nick :\00314Commande Listchan Msg \0031: \0034/msg $::botnick listchan"
- }
- "addsuperop" {
- puthelp "privmsg $nick :\00314Commande Addsuperop Msg \0031: \0034/msg $::botnick addsuperop <pseudo>"
- }
- "delsuperop" {
- puthelp "privmsg $nick :\00314Commande Delsuperop Msg \0031: \0034/msg $::botnick delsuperop <pseudo>"
- }
- "infoline" {
- puthelp "privmsg $nick :\00314Commande Infoline Msg \0031: \0034/msg $::botnick infoline <#salon> <text>"
- }
- "amsg" {
- puthelp "privmsg $nick :\00314Commande Amsg Chan \0031: \0034$::GB::commande(choix)amsg <phrase>"
- }
- "topic" {
- puthelp "privmsg $nick :\00314Commande Topic Chan \0031: \0034$::GB::commande(choix)topic <phrase>"
- puthelp "privmsg $nick :\00314Commande Topic Msg \0031: \0034/msg $::botnick topic <#salon> <text>"
- }
- "authlist" {
- puthelp "privmsg $nick :\00314Commande Authlist Msg \0031: \0034/msg $::botnick authlist <#salon>"
- }
- "gbon" {
- puthelp "privmsg $nick :\00314Commande Gbon Chan \0031: \0034$::GB::commande(choix)gbon"
- }
- "gboff" {
- puthelp "privmsg $nick :\00314Commande Gboff Chan \0031: \0034$::GB::commande(choix)gboff"
- }
- "say" {
- puthelp "privmsg $nick :\00314Commande Say Msg \0031: \0034/msg $::botnick say <#salon> <text>"
- }
- "me" {
- puthelp "privmsg $nick :\00314Commande Me Msg \0031: \0034/msg $::botnick me <#salon> <text>"
- }
- }
- return
- }
- # Désallocation du TCL #
- variable script_name "Gestion.Bot V2.0 Final"
- if {[info commands ::GB::uninstall] eq "::GB::uninstall"} { ::GB::uninstall }
- proc uninstall {args} {
- putlog "Désallocation des ressources de \002$::GB::script_name\002..."
- foreach binding [lsearch -inline -all -regexp [binds *[set GB [string range [namespace current] 2 end]]*] " \{?(::)?$GB"] {
- unbind [lindex $binding 0] [lindex $binding 1] [lindex $binding 2] [lindex $binding 4]
- }
- namespace delete [namespace current]
- }
- if {$CGU!="oui"} {
- putlog "Conditions Général'Utilisations d Non accepter veuillez les accepters sinon n'utiliser pas le TCL."
- die "Condition Général d'Utilisations Non Accepter"
- }
- # Package Requis #
- if {[catch {package require Tcl 8.5}]} {
- putlog "\002Gestion.Bot\002 : Vous avez besoin de Tcl en version 8.5 au moins pour pouvoir utiliser ce script."
- return
- }
- # Procédure Caratères spéciaux Pseudo #
- proc gbfilter {arg} {
- regsub -all -- \\\\ $arg \\\\\\\\ arg
- regsub -all -- \\\[ $arg \\\\\[ arg
- regsub -all -- \\\] $arg \\\\\] arg
- regsub -all -- \\\} $arg \\\\\} arg
- regsub -all -- \\\{ $arg \\\\\{ arg
- regsub -all -- \\\" $arg \\\\\" arg
- return $arg
- }
- proc gbfilter2 {text} {
- regsub -all -- \\\\ $text \\\\\\\\ text
- regsub -all -- \\\[ $text \\\\\[ text
- regsub -all -- \\\] $text \\\\\] text
- regsub -all -- \\\} $text \\\\\} text
- regsub -all -- \\\{ $text \\\\\{ text
- regsub -all -- \\\" $text \\\\\" text
- return $text
- }
- # Binds #
- bind pub o "$::GB::commande(choix)+blacklist" [namespace current]::+blacklist
- bind pub o "$::GB::commande(choix)-blacklist" [namespace current]::-blacklist
- bind pub o "$::GB::commande(choix)blacklist" [namespace current]::.blacklist
- bind pub o "$::GB::commande(choix)+exempt" [namespace current]::+exempt
- bind pub o "$::GB::commande(choix)-exempt" [namespace current]::-exempt
- bind pub o "$::GB::commande(choix)exempt" [namespace current]::.exempt
- bind pub - "$::GB::commande(choix)op" [namespace current]::op
- bind pub - "$::GB::commande(choix)deop" [namespace current]::deop
- bind pub - "$::GB::commande(choix)voice" [namespace current]::voice
- bind pub - "$::GB::commande(choix)devoice" [namespace current]::devoice
- bind pub - "$::GB::commande(choix)opall" [namespace current]::opall
- bind pub - "$::GB::commande(choix)deopall" [namespace current]::deopall
- bind pub - "$::GB::commande(choix)voiceall" [namespace current]::voiceall
- bind pub - "$::GB::commande(choix)devoiceall" [namespace current]::devoiceall
- bind pub - "$::GB::commande(choix)halfop" [namespace current]::halfop
- bind pub - "$::GB::commande(choix)dehalfop" [namespace current]::dehalfop
- bind pub - "$::GB::commande(choix)halfopall" [namespace current]::halfopall
- bind pub - "$::GB::commande(choix)dehalfopall" [namespace current]::dehalfopall
- bind pub - "$::GB::commande(choix)ban" [namespace current]::ban
- bind pub - "$::GB::commande(choix)kick" [namespace current]::kick
- bind pub - "$::GB::commande(choix)unban" [namespace current]::unban
- bind pub - "$::GB::commande(choix)kickban" [namespace current]::kickban
- bind pub - "$::GB::commande(choix)clearbans" [namespace current]::clearbans
- bind pub - "$::GB::commande(choix)mode" [namespace current]::mode
- bind pub - "$::GB::commande(choix)topic" [namespace current]::topic
- bind pub - "$::GB::commande(choix)amsg" [namespace current]::amsg
- bind pub o "$::GB::commande(choix)gbon" [namespace current]::gbon
- bind pub o "$::GB::commande(choix)gboff" [namespace current]::gboff
- bind msg - "auth" [namespace current]::auth
- bind msg - "deauth" [namespace current]::deauth
- bind msg - "addsuspend" [namespace current]::addsuspend
- bind msg - "delsuspend" [namespace current]::delsuspend
- bind msg - "addchan" [namespace current]::addchan
- bind msg - "delchan" [namespace current]::delchan
- bind msg - "listchan" [namespace current]::listchan
- bind msg - "access" [namespace current]::access
- bind msg - "newpass" [namespace current]::newpass
- bind msg - "addop" [namespace current]::addop
- bind msg - "addmaster" [namespace current]::addmaster
- bind msg - "addowner" [namespace current]::addowner
- bind msg - "addsuperop" [namespace current]::addsuperop
- bind msg - "delop" [namespace current]::delop
- bind msg - "delmaster" [namespace current]::delmaster
- bind msg - "delowner" [namespace current]::delowner
- bind msg - "delsuperop" [namespace current]::delsuperop
- bind msg - "op" [namespace current]::xop
- bind msg - "deop" [namespace current]::xdeop
- bind msg - "voice" [namespace current]::xvoice
- bind msg - "devoice" [namespace current]::xdevoice
- bind msg - "ban" [namespace current]::xban
- bind msg - "kick" [namespace current]::xkick
- bind msg - "unban" [namespace current]::xunban
- bind msg - "kickban" [namespace current]::xkickban
- bind msg - "clearbans" [namespace current]::xclearbans
- bind msg - "mode" [namespace current]::xmode
- bind msg - "infoline" [namespace current]::infoline
- bind msg - "help" [namespace current]::help
- bind msg - "authlist" [namespace current]::authlist
- bind msg - "topic" [namespace current]::xtopic
- bind msg - "opall" [namespace current]::xopall
- bind msg - "deopall" [namespace current]::xdeopall
- bind msg - "voiceall" [namespace current]::xvoiceall
- bind msg - "devoiceall" [namespace current]::xdevoiceall
- bind msg - "say" [namespace current]::say
- bind msg - "me" [namespace current]::me
- bind msg - "conf" [namespace current]::conf
- bind chon - * [namespace current]::opco
- bind chof - * [namespace current]::opdeco
- bind part o|o "*" [namespace current]::partdeauth
- bind sign o|o "*" [namespace current]::quitdeauth
- bind join - "$::GB::log *" [namespace current]::joindeauth
- bind join - "*" [namespace current]::xbl
- bind notc - * [namespace current]::nonotice_chanoff
- bind join - "*" [namespace current]::greet
- bind evnt -|- prerehash ::GB::uninstall
- putlog "\002$::GB::script_name chargé.\002 alias_angelius 2011©"
- }
Add Comment
Please, Sign In to add comment