Advertisement
Guest User

Untitled

a guest
Jul 8th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 108.91 KB | None | 0 0
  1. # Gestion.Bot v2.0 Final Par alias_angelius.
  2. #
  3. # 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.
  4. #
  5. # Certaines Idées venant de certaines commandes du script sont de diverses personnes telles que :
  6. # CrazyCat,Artix,MenzAgitat,Xem,BeussAy,Pain,OpTiXPrO.
  7. #
  8. # Et certaines aides venant de ces personnes la aussi, je tien tout particulièrement
  9. # À remercier l'équipes de Modération de eggdrop.fr pour leur aides/explications sur diverses
  10. # Commandes et explications sur le fonctionnement de certaines commandes.
  11. #
  12. # Idée de passer le TCL en namespace : MenzAgitat.
  13. # Idée de faire un système d’array pour divers message : Artix.
  14. # Idée de passer par une double procédure par exemple comme dans le cas du kickban : MenzAgitat.
  15. # Idée de faire un système de forcing join lors de la diffusion d'un message (infoline) : CrazyCat.
  16. # Idée de faire passer les binds pub/msg en namespace current : BeussAy.
  17. # Idée de faire un level op qui et accès sur tout les salons du Robot avec le tcl : OpTiXPrO.
  18. # Idée de faire un système de authlist : Pain.
  19. #
  20. # Et d'autres personnes m'ont suggéré de faire certaines choses dans le TCL si je ne l'ai pas fait c'est
  21. # Qu'il existe déjà un script TCL correspondant à ceci ou alors que l'utilité de ce qui m'a été demandé
  22. # N'était pas en rapport avec le but de la fonction de mon TCL.
  23. #
  24. # Donc je tiens à signaler que le TCL Gestion.Bot v2.0 Final a été testé sur deux réseaux irc différents :
  25. #
  26. # Réseaux Orange : type ircu (TCL tester sur le salon  #Trip sans aucun soucis tout fonctionne).
  27. # Réseaux Zeolia : type unreal (TCL tester sur le salon #Trip sans aucun soucis tout fonctionne).
  28. #
  29. # Donc maintenant il ne vous reste plus qu'à remplir la partie variable log commande préfixe et admin.
  30. #
  31. # Donc pour ce qui concerne le lancement du TCL c'est assez simple il vous suffira de taper deux commandes :
  32. #
  33. # .gbon "commandes à taper sur salon pour activer le TCL sinon certaines commandes ne seront et ne pourront pas être exécutées".
  34. # Ensuite tapez /msg <pseudo-de-votre-bot> help "ceci vous donnera une aide détaillée sur les commandes diverses de votre
  35. # Eggdrop ce qu'il pourra exécuter en commande avec le TCL selon votre level bien sûr".
  36. # NB : à savoir il faut vous authentifier avant de faire cela donc : /msg <pseudo-de-votre-bot> auth <votre-pseudo> <pass> .
  37. #
  38. # À partir de là il ne vous reste plus qu'à tester les commandes.
  39. #
  40. # Le but du TCL lorsque j'ai codé avec l'aide que l'on m'a apportée :
  41. # 1 : Permettre aux personnes ne sachant pas coder de prendre exemple dessus s’ils le désirent.
  42. # 2 : Pouvoir modifier le TCL à votre guise mais en laissant le nom de l'auteur dans le putlog tout de même.
  43. # 3 : Le TCL peux aider selon les fonctions pour un salon pour se op/deop etc.
  44. # Voici l'un des buts principaux du TCL en espérant que cela vous conviendra.
  45. #
  46. # alias_angelius.
  47. #
  48. # Good Fun.
  49.  
  50. # Conditions Générales d'Utilisations Du TCL.
  51. #
  52. # Maintenant petite explication sur les conditions général d'utilisation du TCL Gestion.Bot.
  53. #
  54. # 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.
  55. # 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"
  56. # Ceci ne vous apportera rien.. Et je ne ferais aucunes aides si j’apprends ceci.
  57. #
  58. # Autre information si jamais il vous viendrez à l'idée de ripper vous gêner pas surtout mais si ça fonctionne pas
  59. # Ne venez pas demander de l'aide.
  60. #
  61. # Information il faut accepter les conditions que je viens de donner et de mettre "oui" au niveau de
  62. # Conditions Générales d'Utilisations ci dessous.
  63. #
  64. # Fin de l'explication.
  65.  
  66. namespace eval GB {
  67.    
  68.     # Pseudo Admin du Bot #
  69.     variable admin "votre-pseudo"
  70.     # Salon de log #
  71.     variable log "#salon-log"
  72.     # Commande Prefix Permet de choisir la commande par défault soit "." ou "!" #
  73.     set commande(choix) "."
  74.     # Conditions Général d'Utilisations #
  75.     set CGU "non"
  76.  
  77.     # Array Message #
  78.  
  79.     array set msg {
  80.          "bl" "\0034Tu es banni du salon. \00314( \0031Blackliste\00314 )"
  81.          "kick" "Vous venez d'être kické par $nick sur $chan !"
  82.          "kickban" "Exclu(e) de $chan !"
  83.          "nc" "~ Exp/Notice-Chan ~ Pas de notice salon svp"
  84.          "level" "Vous n'avez pas le level suffisant dans $::botnick pour utiliser cette commande $nick !"
  85.          "salon" "Désolé $nick mais le salon que tu demandes est inconnu !"
  86.          "auth" "Avant d'utiliser la commande veuillez vous authentifier au préalable merci : ( /msg $::botnick auth <pseudo> <pass> )"
  87.          "access" "Désolé $nick mais je ne trouve pas ton accès dans ma base de données !"
  88.          "botdeop" "Désolé je ne peux pas exécuter la commande je suis déop sur $chan !"
  89.          "nosalon" "Désolé $nick mais je suis absent du salon $chan !"
  90.          "pseudo" "Désolé mais le pseudonyme demandé n'est pas sur $chan !"
  91.          "nochan" "Désolé $nick mais je ne te vois pas sur $chan !"
  92.          "nopseudo" "Désolé mais vous n'êtes pas présent sur le salon $chan !"
  93.          "iso" "Désolé $nick mais tu me demandes quelque chose alors que tu l'es déjà sur $chan !"
  94. }  
  95.  
  96.     # Setudef #
  97.  
  98.          setudef flag GB
  99.  
  100.     # Retour de Procédure Idée et aide venant de MenzAgitat #
  101.  
  102.     # Retour Proc Kickban #
  103.  
  104.     proc ban_user {nick host chan} {
  105.         putquick "MODE $chan +b [::GB::hostmask_process $nick $host 2]"
  106.         putquick "KICK $chan $nick [subst -nocommands -nobackslashes $::GB::msg(kickban)]"
  107. }
  108.  
  109.     # Procédure inspiré du Anti-Frenzy de MenzAgitat #
  110.  
  111.     proc ::GB::hostmask_process {nick host type} {
  112.          set fullhost "$nick!$host"
  113.          set nick "*" ; set ident "*" ; set host "*"
  114.          scan $fullhost "%\[^!\]!%\[^@\]@%s" nick ident host
  115.          set nick [join [string trimleft $nick "@+"]]
  116.          set ident [join [string trimleft $ident "~"]]
  117.          set hostmask $host
  118.     if { [regexp {([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)} $host] } {
  119.          set host [lreplace [split $host .] end end *]
  120.     } else {
  121.          set host [split $host .]
  122.     if { [llength $host] == 3 } { set host [lreplace $host 0 0 *] }
  123.     if { [llength $host] > 3 } { set host [lreplace $host 0 1 *] }
  124.     }
  125.          set domain [join $host .]
  126.     switch "$type" {
  127.          "0" { return "*!$ident@$hostmask" }
  128.          "1" { return "*!*$ident@$hostmask" }
  129.          "2" { return "*!*@$hostmask" }
  130.          "3" { return "*!*$ident@$domain" }
  131.          "4" { return "*!*@$domain" }
  132.          "5" { return "$nick!*$ident@$hostmask" }
  133.          "6" { return "$nick!*$ident@$hostmask" }
  134.          "7" { return "$nick!*@$hostmask" }
  135.          "8" { return "$nick!*$ident@$domain" }
  136.          "9" { return "$nick!*@$domain" }
  137.          "10" { return "*!$ident@$domain" }
  138.          "11" { return "*!$ident@*.IP" }
  139.          "12" { return "*!$ident@*.EpiK" }
  140.     }
  141.     if {[set resultmask $nick!$ident@$fullhost] eq "*!*@*"} { return "invalid!host@mask" }
  142.     return $resultmask
  143. }
  144.  
  145.     # PL #
  146.  
  147.     proc opco {hand idx} {
  148.          putquick "privmsg $::GB::log :\0031\[\00312Connection\0031\] \0034$hand \0033vien de se connecter a la \0036Party-Line.\0036"
  149.          dccbroadcast "\00312Connection PL Autorisé pour \0034$hand\0034"
  150. }
  151.  
  152.     proc opdeco {hand idx} {
  153.          putquick "privmsg $::GB::log :\0031\[\00312Déconection\0031\] \0034$hand \0033vien de se déconecter de la \0036Part-Line.\0036"
  154.          dccbroadcast "\00312Déconnection PL pour \0034$hand\0034"
  155. }
  156.  
  157.     # Auth #
  158.  
  159.     proc auth { nick host hand arg } {
  160.          set args [split $arg]
  161.          set chan [lindex $arg 0]
  162.          set pseudo [lindex $arg 0]
  163.     if {[llength $args] != 2} {
  164.          puthelp "notice $nick :\002Erreur :\002 ( /msg $::botnick auth <pseudo> <pass> )"
  165.     return 0
  166.     }
  167.          set password [lindex $args 1]
  168.     if { [nick2hand $pseudo] eq "*" } {
  169.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  170.     return 0
  171.     }
  172.     if {![passwdok $pseudo $password]} {
  173.          puthelp "notice $nick :\002Erreur :\002 Votre mot de pass ou/et votre pseudo est/sont incorrect(s) !"
  174.     return 0
  175.     }
  176.     if {![string match -nocase [lindex [getuser $pseudo HOSTS] 0] $nick!$host]} {
  177.          puthelp "notice $nick :\002Erreur :\002 Votre host ne correspond pas avec votre access !"
  178.     return 0
  179.     }
  180.     if {[getuser $pseudo XTRA AUTH] eq "ON"} {
  181.          puthelp "notice $nick :\002Erreur :\002 Vous êtes déjà authentifier !"
  182.     return 0
  183.     }
  184.     if {[getuser $hand XTRA SUSPEND] eq "ON"} {
  185.          puthelp "notice $nick :\002Erreur :\002 Vous êtes suspendu !"
  186.     return 0
  187.     }      
  188.          puthelp "notice $nick :\0031\[AUTHENTIFICATION REUSSIE\]\0031 Vous êtes maintenant authentifié !"
  189.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Auth\0036\] \0031par : \0034$hand"
  190.          putquick "invite $nick $::GB::log"
  191.          setuser $pseudo XTRA AUTH ON;
  192.          setuser $hand XTRA SEEN [clock format [clock seconds] -format "le %d/%m/%Y à %Hh%M"]
  193.          save
  194.     return
  195. }
  196.  
  197.     # Deauth #
  198.  
  199.     proc deauth { nick host hand arg } {
  200.          set chan [lindex $arg 0]
  201.     if {[getuser $hand XTRA auth] eq "ON"} {
  202.          puthelp "notice $nick :\0031\[DEAUTHENTIFICATION REUSSIE\]\0031 Vous êtes maintenant deauthentifié !"
  203.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Deauth\0036\] \0031par : \0034$hand"
  204.          setuser $hand XTRA AUTH OFF;
  205.          save
  206.     return
  207.     }
  208. }
  209.  
  210.     # Isauth #
  211.  
  212.     proc [namespace current]::isauth {hand} {
  213.     if {[getuser $hand XTRA AUTH] eq "OFF"} {return 0}
  214.     if {[getuser $hand XTRA AUTH] eq "ON"} {return 1}
  215. }
  216.  
  217.     # Addsuspend #
  218.  
  219.     proc addsuspend {nick host hand arg} {
  220.     if {![matchattr $hand o]} {
  221.          putserv "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  222.     return 0
  223.     }
  224.          set arg [split $arg]
  225.          set login [lindex $arg 0]
  226.     if {$login==""} {
  227.          puthelp "notice $nick :\002/msg $::botnick addsuspend\002<login>"
  228.          puthelp "notice $nick :\002Exemple :\002/msg $botnick addsuspend $::GB::admin"
  229.     return 0
  230.     }
  231.     if { [nick2hand $login] eq "*" } {
  232.          puthelp "notice $nick :\002ADDSUSPEND\002: Le login \002$login\002 a aucun accès."
  233.     return 0
  234.     }
  235.     if {[getuser $login XTRA suspend]=="ON"} {
  236.          puthelp "notice $nick :\002ADDSUSPEND\002: Le login \002$login\002 est déjà suspendu."
  237.     return 0
  238.     }
  239.          setuser $login XTRA SUSPEND ON
  240.          puthelp "notice $nick :\002ADDSUSPEND\002: \002$login\002 a été suspendu."
  241.          putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Addsuspend\0036\] \0031ajouté par : \0034$hand pour $login"
  242.     return
  243. }
  244.  
  245.     # Delsuspend #
  246.  
  247.     proc delsuspend {nick host hand arg} {
  248.     if {![matchattr $hand o|]} {
  249.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  250.     return 0
  251.     }
  252.          set arg [split $arg]
  253.          set login [lindex $arg 0]
  254.     if {$login==""} {
  255.          puthelp "notice $nick :\002/msg $botnick delsuspend\002<login>"
  256.          puthelp "notice $nick :\002Exemple :\002/msg $botnick delsuspend $::GB::admin"
  257.     return 0
  258.     }
  259.     if { [nick2hand $login] eq "*" } {
  260.          puthelp "notice $nick :\002DELSUSPEND\002 : Le login \002$login\002 a aucun accès."
  261.     return 0
  262.     }
  263.     if {[getuser $login XTRA suspend]=="OFF"} {
  264.          puthelp "notice $nick :\002DELSUSPEND\002 : Le login \002$login\002 n'est pas suspendu."
  265.     return 0
  266.     }
  267.          setuser $login XTRA SUSPEND OFF
  268.          puthelp "notice $nick :\002DELSUSPEND\002 : \002$login\002 n'est plus suspendu."
  269.          putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Delsuspend\0036\] \0031retiré par : \0034$hand pour $login"
  270.     return
  271. }
  272.  
  273.     # Deauth Part #
  274.  
  275.     proc partdeauth { nick uhost hand chan {msg ""}} {
  276.     if {[matchattr $hand o|o $chan] && [isauth $hand]} {
  277.          setuser $hand XTRA AUTH OFF
  278.          puthelp "notice $nick :Déauthentification suite à votre part du salon.."
  279.          putserv "privmsg $::GB::log :\00314Déauthentification \0036suite au part de \0031: \0034$hand"
  280.     }
  281. }
  282.  
  283.     # Deauth Quit #
  284.  
  285.     proc quitdeauth { nick uhost hand chan {msg ""}} {
  286.     if {[matchattr $hand o|o $chan] && [isauth $hand]} {
  287.          setuser $hand XTRA AUTH OFF
  288.          putserv "privmsg $::GB::log :\00314Déauthentification \0036suit au quit de \0031: \0034$hand"
  289.     }
  290. }
  291.  
  292.     # Deauth Join #
  293.  
  294.     proc joindeauth {nick host hand chan} {
  295.     if {$nick=="$::botnick"} {
  296.          putserv "privmsg $::GB::log :\0034Réinitialisation des accès, tous les authentifiés ont été deauth par sécurité.\0034"
  297.     foreach user [userlist * $chan] {
  298.          setuser $user XTRA AUTH OFF
  299.         }
  300.     }
  301. }
  302.  
  303.     # Blacklist #
  304.  
  305.     # Création et Gestion Db #
  306.  
  307.     if ![file exist database/blacklist.db] {
  308.          set load [open database/blacklist.db w+]
  309.     close fcreate
  310.          putlog "\2Je créé le blacklist.db\2"
  311. }
  312.  
  313.     if ![file exist database/exempt.db] {
  314.          set load [open database/exempt.db w+]
  315.     close fcreate
  316.          putlog "\2Je créé le exempt.db\2"
  317. }
  318.  
  319.      proc progfile {file action arg} {
  320.          set return 0
  321.          set dbr [open database/$file.db r+]
  322.          set dbw [open tmp.tmp w+]
  323.     while {![eof $dbr]} {
  324.          set r [gets $dbr]
  325.     if {$r!=""} {puts $dbw $r}
  326.     }
  327.     close $dbr
  328.     close $dbw
  329.          set dbr [open tmp.tmp r+]
  330.          set dbw [open database/$file.db w+]
  331.     while {![eof $dbr]} {
  332.          set r [gets $dbr]
  333.     if {$action=="add"} {
  334.     if {$r!=""} {
  335.     puts $dbw $r
  336.     } else {
  337.     puts $dbw $arg
  338.     }
  339.          set return 1
  340.     }
  341.     if {$action=="del"} {
  342.     if {$r!=""} {
  343.     if {![string match -nocase $arg [lindex $r 0]] && ![string match -nocase $arg [lindex $r 1]]} {
  344.     puts $dbw $r
  345.     } else {
  346.          set return 1
  347.             }
  348.         }
  349.     }
  350.     if {$action=="chk"} {
  351.     if {$r!=""} {
  352.     puts $dbw $r
  353.     if [string match -nocase [lindex $arg 0] [lindex $r 1]] {
  354.          set return [lindex $r 0]
  355.     if ![string match -nocase [lindex $arg 1] [lindex $r 2]] {set return 2}
  356.     if ![string match [lindex $arg 2] [lindex $r 3]] {set return 3}
  357.             }
  358.         }
  359.     }
  360.     if {$action=="icr"} {
  361.     if {$r!=""} {
  362.     puts $dbw $r
  363.     if [string match -nocase $arg [lindex $r 0]] {
  364.          set return 1
  365.             }
  366.         }
  367.     }
  368.     if {$action=="cf"} {
  369.     if {$r!=""} {
  370.     puts $dbw $r
  371.     if [string match -nocase [lindex $r 0] $arg] {
  372.          set return 1
  373.             }
  374.         }
  375.     }
  376.     if {$action=="ibr"} {
  377.     if {$r!=""} {
  378.     puts $dbw $r
  379.     if [string match -nocase $arg [lindex $r 1]] {
  380.          set return 1
  381.                 }
  382.             }
  383.         }
  384.  
  385.     }
  386.     close $dbr
  387.     close $dbw
  388.     return $return
  389. }
  390.  
  391.     # Add blacklist #
  392.  
  393.     proc +blacklist {nick uhost hand chan args} {
  394.          set verifexempt "[split [lindex $args 0] |]"
  395.          set nickverife "[lindex $verifexempt 0]"
  396.     if {[channel get $chan GB]==0} { return; }
  397.     if {[lindex $args 0]!=""} {
  398.     if {[progfile blacklist icr $nickverife]!="0"} {
  399.          puthelp "notice $nick :Attention le Nick: \2$nickverife\2 est déjà dans la Blacklist ou ne peux etre Blackliste."
  400.     return 0
  401.     }
  402.     if {[progfile exempt icr $nickverife]!="0"} {
  403.          puthelp "notice $nick :Attention le Nick: \2$nickverife\2 Ne peux être ajouter a la Blackliste."
  404.     return 0
  405.     }
  406.          progfile blacklist add $nickverife
  407.          puthelp "notice $nick :Le Nick: \2$nickverife\2 a bien été ajouté à la blacklist."
  408.          putquick "privmsg $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était ajouter au pseudo des (\0034Blackliste\00314)"
  409.          putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Blacklist\0036\] \0031ajouté par : \0034$hand"
  410.     return 0
  411.     } else {
  412.          puthelp "privmsg $chan :Il faut une victime"
  413.     return 0
  414.     }
  415. }
  416.  
  417.     # Del Blacklist #
  418.  
  419.     proc -blacklist {nick uhost hand chan args} {
  420.          set verifexempt "[split [lindex $args 0] |]"
  421.          set nickverife "[lindex $verifexempt 0]"
  422.     if {[channel get $chan GB]==0} { return; }
  423.     if {[lindex $args 0]!=""} {
  424.     if {[progfile blacklist del $nickverife]!="1"} {
  425.          puthelp "notice $nick :Attention le Nick: \2$nickverife\2 n'est pas dans la Blacklist."
  426.     return 0
  427.     }
  428.          progfile blacklist del $nickverife
  429.          puthelp "notice $nick :Le Nick: \2$nickverife\2 a bien été supprimé de la blacklist."
  430.          putquick "privmsg $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était retiré au pseudo des (\0034Blackliste\00314)"
  431.          putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Blacklist\0036\] \0031retiré par : \0034$hand"
  432.     return 0
  433.     } else {
  434.          puthelp "privmsg $chan :Il faut une victime"
  435.     return
  436.     }
  437. }
  438.  
  439.     # List Blacklist #
  440.  
  441.     proc .blacklist {nick uhost hand chan args} {
  442.          set nickb [lindex $args 0]
  443.          set blusers [open database/blacklist.db r]
  444.     if {[channel get $chan GB]==0} { return; }
  445.          putserv "notice $nick :\2Voici la Blacklist:\2"
  446.          putserv "notice $nick :\2\2"
  447.     while {![eof $blusers]} {
  448.          set bluser [gets $blusers]
  449.     if {$bluser!="" && $nickb==""} {
  450.          putserv "notice $nick :\2Nick:\2 $bluser"
  451.     } elseif [string match -nocase $nickb $bluser] {
  452.          putserv "notice $nick :\2Nick:\2 $bluser."
  453.         }
  454.     }
  455.          putserv "notice $nick :\2Fin de la Blacklist\2."
  456.          putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Blacklist\0036\] \0031par : \0034$hand"
  457.     close $blusers
  458.          putserv "notice $nick :\2\2"
  459. }
  460.  
  461.     # Add Exempt #
  462.  
  463.     proc +exempt {nick uhost hand chan args} {
  464.          set verifexempt "[split [lindex $args 0] |]"
  465.          set nickverife "[lindex $verifexempt 0]"
  466.     if {[channel get $chan GB]==0} { return; }
  467.     if {[lindex $args 0]!=""} {
  468.     if {[progfile exempt icr $nickverife]!="0"} {
  469.          putserv "notice $nick :Attention le Nick: \2$nickverife\2 est déjà dans la liste des protégés."
  470.     return 0
  471.     }
  472.          progfile exempt add $nickverife
  473.          puthelp "notice $nick :Le Nick: \2$nickverife\2 a bien été ajouté à la liste des protégés."
  474.          putquick "privmsg $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était ajouter au pseudo des (\0034Protégés\00314)"
  475.          putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Exempt\0036\] \0031ajouté par : \0034$hand"
  476.     return 0
  477.     } else {
  478.          puthelp "privmsg $chan :Il faut une victime"
  479.     return 0
  480.     }
  481. }
  482.  
  483. # Del Exempt #
  484.  
  485.     proc -exempt {nick uhost hand chan args} {
  486.          set verifexempt "[split [lindex $args 0] |]"
  487.          set nickverife "[lindex $verifexempt 0]"
  488.     if {[channel get $chan GB]==0} { return; }
  489.     if {[lindex $args 0]!=""} {
  490.     if {[progfile exempt del $nickverife]!="1"} {
  491.          putserv "notice $nick :Attention le Nick: \2$nickverife\2 n'est pas dans la liste des protégés."
  492.     return 0
  493.     }
  494.          progfile exempt del $nickverife
  495.          puthelp "notice $nick :Le Nick: \2$nickverife\2 a bien été supprimé de la listes des protégés."
  496.          putquick "privmsg $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était retiré au pseudo des (\0034Protégés\00314)"
  497.          putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Exempt\0036\] \0031retiré par : \0034$hand"
  498.     return 0
  499.     } else {
  500.          puthelp "privmsg $chan :Il faut une victime"
  501.     return
  502.     }
  503. }
  504.  
  505.     # List Exempt #
  506.  
  507.     proc .exempt {nick uhost hand chan args} {
  508.          set nickb [lindex $args 0]
  509.          set blusers [open database/exempt.db r]
  510.     if {[channel get $chan GB]==0} { return; }
  511.          putserv "notice $nick :\2Voici la ExemptList:\2"
  512.          putserv "notice $nick :\2\2"
  513.     while {![eof $blusers]} {
  514.          set bluser [gets $blusers]
  515.     if {$bluser!="" && $nickb==""} {
  516.          putserv "notice $nick :\2Nick:\2 $bluser"
  517.     } elseif [string match -nocase $nickb $bluser] {
  518.          putserv "notice $nick :\2Nick:\2 $bluser."
  519.         }
  520.     }
  521.          putserv "notice $nick :\2Fin de la ExemptList\2."
  522.          putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Exempt\0036\] \0031par : \0034$hand"
  523.     close $blusers
  524.          putserv "notice $nick :\2\2"
  525. }
  526.  
  527.     # Join #
  528.  
  529.     proc xbl {n u h c} {
  530.          set k [lindex [split $n |] 0]
  531.     if {[progfile blacklist cf $k]=="1"} {
  532.          set vnick $n
  533.          set hostmask "[split [getchanhost $vnick $c] @]"
  534.          set hostmask "!*@*[lindex $hostmask 1]"
  535.          pushmode $c +b $hostmask
  536.          pushmode $c +b $k!*@*
  537.          pushmode $c +b $k|*!*@*
  538.          puthelp "kick $c $vnick :[subst -nocommands -nobackslashes $::GB::msg(bl)]"
  539.     }
  540. }
  541.  
  542.     # AddChan/DelChan/ListChan Msg #
  543.  
  544.     proc addchan { nick host hand text } {
  545.          set chan [lindex $text 0]
  546.          set chans [join [lrange [split $text] 0 0]]
  547.     if {[channel get $chan GB]==0} { return; }
  548.     if { [nick2hand $nick] eq "*" } {
  549.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  550.     return 0
  551.    }
  552.     if {![isauth $hand]} {
  553.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  554.     return 0
  555.     }
  556.     if {$text==""} {
  557.          puthelp "notice $nick :Addchan incorrect ! Veuillez respecter la syntaxe suivante : ( /msg $::botnick addchan <#salon> ) !"
  558.     }
  559.     if ![matchattr $hand o| [lindex $text 0]] {
  560.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  561.     return 0
  562.    }    
  563.     if {[string match -nocase $chans $chan]} {
  564.          putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Add-Chan\0036\] \0031par : \0034$hand"
  565.          putserv "notice $nick :$chans Rajouter au Addchan !"
  566.          channel add $chans
  567.          savechannels
  568.     return 0
  569.     }
  570.     if {[lsearch [channels] $chans]==-1} {
  571.          puthelp "notice $nick :$chans existe déja dans la liste des addchan"
  572.     return
  573.     }
  574. }
  575.  
  576.     # Delchan #
  577.  
  578.     proc delchan { nick host hand text } {
  579.          set chan [lindex $text 0]
  580.          set chans [join [lrange [split $text] 0 0]]
  581.     if {[channel get $chan GB]==0} { return; }
  582.     if { [nick2hand $nick] eq "*" } {
  583.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  584.     return 0
  585.     }
  586.     if {![isauth $hand]} {
  587.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  588.     return 0
  589.     }
  590.     if {$text==""} {
  591.          puthelp "notice $nick :Addchan incorrect ! Veuillez respecter la syntaxe suivante : ( /msg $::botnick delchan <#salon> ) !"
  592.     }
  593.     if ![matchattr $hand o| [lindex $text 0]] {
  594.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  595.     return 0
  596.    }    
  597.     if {[lsearch [channels] $chans]==-1} {
  598.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  599.     return 0
  600.     }
  601.     if {[string match -nocase $chans $chan]} {
  602.          putserv "privmsg $::GB::log :\00314Commande \0036\[\0033Del-Chan\0036\] \0031par : \0034$hand"
  603.          putserv "notice $nick :$chans Retiré des Addchan !"
  604.          channel remove $chans
  605.          savechannels
  606.     return
  607.     }
  608. }  
  609.    
  610.     # ListChan #
  611.  
  612.     proc listchan { nick host hand text } {
  613.          set chan [lindex $text 0]
  614.          set chans [join [lrange [split $text] 0 0]]
  615.     if {[channel get $chan GB]==0} { return; }
  616.     if { [nick2hand $nick] eq "*" } {
  617.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  618.     return 0
  619.     }
  620.     if {![isauth $hand]} {
  621.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  622.     return 0
  623.     }
  624.     if ![matchattr $hand o| [lindex $text 0]] {
  625.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  626.     return 0
  627.     }    
  628.     if {[string match -nocase $chans $chan]} {
  629.          set voir 1
  630.          putquick "privmsg $nick :\0034\[Liste Salons\]"
  631.     foreach liste [channels] {
  632.          putquick "privmsg $nick :\0037=>\0032 $voir \0037<= \0033 $liste"
  633.     incr voir 1
  634.     }
  635.          putquick "privmsg $nick :\0036\[Fin De Liste\]"
  636.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033List-Chan\0036\] \0031par : \0034$hand"
  637.     return 0
  638.     }
  639.     if {[lsearch [channels] $chans]==-1} {
  640.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  641.      return
  642.     }
  643. }
  644.    
  645.     # Access/Newpass #
  646.  
  647.     proc access { nick host hand text } {
  648.          set chan [lindex $text 0]
  649.          set mask [lindex $text 1]
  650.     if {[channel get $chan GB]==0} { return; }
  651.     if { [nick2hand $nick] eq "*" } {
  652.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  653.     return 0
  654.     }
  655.     if {![isauth $hand]} {
  656.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  657.     return 0
  658.     }
  659.     if ![string match #* $chan] {
  660.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick access <#salon> <mask> )"
  661.     return 0
  662.     }
  663.     if {$mask==""} {
  664.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick access <#salon> <mask> )"
  665.     return 0
  666.     }
  667.     if ![validchan $chan] {
  668.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  669.     return 0
  670.     }
  671.     if ![matchattr $hand o|o [lindex $text 0]] {
  672.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  673.     return 0
  674.     }
  675.          putserv "privmsg $nick :Liste des access de $chan correspondant à \0031\[ \0034$mask \0031\] :"
  676.     foreach user [userlist |n $chan] {
  677.     if [string match -nocase $mask $user] {
  678.          putserv "privmsg $nick :Owner $user"
  679.         }
  680.     }
  681.     foreach user [userlist |m $chan] {
  682.     if ![matchattr $user |n $chan]&&[string match -nocase $mask $user] {
  683.          putserv "privmsg $nick :Master $user"
  684.         }
  685.     }
  686.     foreach user [userlist |o $chan] {
  687.     if ![matchattr $user |m $chan]&&[string match -nocase $mask $user] {
  688.          putserv "privmsg $nick :Operateur $user"
  689.         }
  690.     }
  691.     foreach user [userlist o|] {
  692.     if [string match -nocase $mask $user] {
  693.          putserv "privmsg $nick :SuperOp $user"
  694.         }
  695.     }
  696.          putserv "privmsg $nick :Fin de la liste d'access."
  697.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Access\0036\] \0031par : \0034$hand"
  698.     return
  699. }
  700.  
  701.     # Newpass #
  702.  
  703.     proc newpass { nick uhost hand text } {
  704.     if { [nick2hand $nick] eq "*" } {
  705.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  706.     return 0
  707.     }
  708.     if {![isauth $hand]} {
  709.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  710.     return 0
  711.     }
  712.     if {$text==""} {
  713.          puthelp "notice $nick :Ancien mot de passe incorrect ! Veuillez respecter la syntaxe suivante : ( /msg $::botnick newpass <ancien-pass> <nouveau-pass> ) !"
  714.     }
  715.     if {[getuser $hand PASS]==""} {
  716.          setuser $hand PASS [lindex $text 0]
  717.          puthelp "notice $nick :Mot de passe défini : [lindex $text 0] !"
  718.     return 0
  719.     }
  720.     if {[passwdok $hand [lindex $text 0]]} {
  721.     if {[llength $text]>1} {
  722.          setuser $hand PASS [lindex $text 1]
  723.          puthelp "notice $nick :Nouveau mot de passe défini : [lindex $text 1] !"
  724.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033New-Pass\0036\] \0031par : \0034$hand"
  725.     return
  726.         }    
  727.     }
  728. }
  729.  
  730.     # Addop/Addmaster/Addowner/Addsuperop Msg #
  731.  
  732.     proc addop { nick host hand text } {
  733.          set vhand [lindex [split [lindex $text 0] |] 0]
  734.          set chan [lindex $text 1]
  735.     if {[channel get $chan GB]==0} { return; }
  736.     if { [nick2hand $nick] eq "*" } {
  737.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  738.     return 0
  739.     }
  740.     if ![isauth $hand] {
  741.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  742.     return 0
  743.     }
  744.     if {![string match #* $chan]} {
  745.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick addop <pseudo> <#salon> ) !"
  746.     return 0
  747.     }
  748.     if ![validchan $chan] {
  749.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  750.     return 0
  751.     }
  752.     if ![matchattr $hand o|m $chan] {
  753.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  754.     return 0
  755.     }
  756.     if [matchattr $vhand |n $chan] {
  757.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
  758.     return 0
  759.     }
  760.     if [matchattr $vhand |m $chan] {
  761.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
  762.     return 0
  763.     }
  764.     if [matchattr $vhand |o $chan] {
  765.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List Opérateurs sur $chan !"
  766.     return 0
  767.     }
  768.     if [matchattr $vhand |m $chan] {
  769.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
  770.     return 0
  771.     }
  772.          adduser $vhand $vhand!*@*
  773.          setuser $vhand HOSTS $vhand|*!*@*
  774.          chattr  $vhand -h|+o $chan
  775.          puthelp "notice $nick :$vhand a bien été ajouté(e) en tant qu'opérateur sur $chan !"
  776.          puthelp "privmsg $vhand :Bonjour $vhand Je suis $::botnick le Robot de Gestion "
  777.          puthelp "privmsg $vhand :On vient de te créer un Access dans ma base de données"
  778.          puthelp "privmsg $vhand :Donc je te conseille de taper la commande qui suit "
  779.          puthelp "privmsg $vhand :/msg $::botnick conf"
  780.          puthelp "privmsg $vhand :Ceci t'aidera pour les premiers pas pour configurer ton mot de passe par exemple"
  781.          puthelp "privmsg $vhand :Si vous ne l'avez pas encore effectué sinon ceci ne vous servira à rien de le tapez"
  782.          puthelp "privmsg $vhand :Fin de l'aide."
  783.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Add-Op\0036\] \0031par : \0034$hand"
  784.          save
  785. }
  786.  
  787.     # Addmaster #
  788.  
  789.     proc addmaster { nick uhost hand text } {
  790.          set vhand [lindex [split [lindex $text 0] |] 0]
  791.          set chan [lindex $text 1]
  792.     if {[channel get $chan GB]==0} { return; }
  793.     if { [nick2hand $nick] eq "*" } {
  794.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  795.     return 0
  796.     }
  797.     if {![isauth $hand]} {
  798.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  799.     return 0
  800.     }
  801.     if {![string match #* $chan]} {
  802.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick addmaster <pseudo> <#salon> ) !"
  803.     return 0
  804.     }
  805.     if ![validchan $chan] {
  806.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  807.     return 0
  808.     }
  809.     if ![matchattr $hand o|n $chan] {
  810.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  811.     return 0
  812.     }
  813.     if [validuser [lindex $text 0]] {
  814.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List"
  815.     return 0
  816.     }
  817.          adduser $vhand [lindex $text 0]!*@*
  818.          setuser $vhand HOSTS [lindex $text 0]|*!*@*
  819.          chattr  $vhand -h|+om [lindex $text 1]
  820.          puthelp "notice $nick :[lindex $text 0] a bien été ajouté(e) en tant que Master sur [lindex $text 1] !"
  821.          puthelp "privmsg $vhand :Bonjour $vhand Je suis $::botnick le Robot de Gestion "
  822.          puthelp "privmsg $vhand :On vient de te créer un Access dans ma base de données"
  823.          puthelp "privmsg $vhand :Donc je te conseille de taper la commande qui suit "
  824.          puthelp "privmsg $vhand :/msg $::botnick conf"
  825.          puthelp "privmsg $vhand :Ceci t'aidera pour les premiers pas pour configurer ton mot de passe par exemple"
  826.          puthelp "privmsg $vhand :Si vous ne l'avez pas encore effectué sinon ceci ne vous servira à rien de le tapez"
  827.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Add-Master\0036\] \0031par : \0034$hand"
  828.          save
  829.     return
  830. }
  831.  
  832.     # Addowner #
  833.  
  834.     proc addowner { nick uhost hand text } {
  835.          set vhand [lindex [split [lindex $text 0] |] 0]
  836.          set chan [lindex $text 1]
  837.     if {[channel get $chan GB]==0} { return; }
  838.     if { [nick2hand $nick] eq "*" } {
  839.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  840.     return 0
  841.     }
  842.     if {![isauth $hand]} {
  843.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  844.     return 0
  845.     }
  846.     if {![string match #* $chan]} {
  847.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick addowner <pseudo> <#salon> ) !"
  848.     return 0
  849.     }
  850.     if ![validchan $chan] {
  851.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  852.     return 0
  853.     }
  854.     if ![matchattr $hand o| $chan] {
  855.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  856.     return 0
  857.     }
  858.     if {![validuser [lindex $text 0]]} {
  859.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List"
  860.     return 0
  861.     }
  862.          adduser $vhand [lindex $text 0]!*@*
  863.          setuser $vhand HOSTS [lindex $text 0]|*!*@*
  864.          chattr  $vhand -h|+on [lindex $text 1]
  865.          puthelp "notice $nick :[lindex $text 0] a bien été ajouté(e) en tant que Owner sur [lindex $text 1] !"
  866.          puthelp "privmsg $vhand :Bonjour $vhand Je suis $::botnick le Robot de Gestion "
  867.          puthelp "privmsg $vhand :On vient de te créer un Access dans ma base de données"
  868.          puthelp "privmsg $vhand :Donc je te conseille de taper la commande qui suit "
  869.          puthelp "privmsg $vhand :/msg $::botnick conf"
  870.          puthelp "privmsg $vhand :Ceci t'aidera pour les premiers pas pour configurer ton mot de passe par exemple"
  871.          puthelp "privmsg $vhand :Si vous ne l'avez pas encore effectué sinon ceci ne vous servira à rien de le tapez"
  872.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Add-Owner\0036\] \0031par : \0034$hand"
  873.          save
  874.     return 0
  875.     }
  876.  
  877. # Addsuperop #
  878.  
  879.      proc addsuperop { nick host hand text } {
  880.          set vhand [lindex [split [lindex $text 0] |] 0]
  881.          set chan [lindex $text 1]
  882.     if { [nick2hand $nick] eq "*" } {
  883.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  884.     return 0
  885.     }
  886.     if ![isauth $hand] {
  887.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  888.     return 0
  889.     }
  890.     if ![matchattr $hand o|] {
  891.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  892.     return 0
  893.     }
  894.          adduser $vhand $vhand!*@*
  895.          setuser $vhand HOSTS $vhand|*!*@*
  896.          chattr  $vhand +o
  897.          chattr $vhand -h|
  898.          puthelp "notice $nick :$vhand a bien été ajouté(e) en tant que SuperOp sur $::botnick !"
  899.          puthelp "privmsg $vhand :Bonjour $vhand Je suis $::botnick le Robot de Gestion "
  900.          puthelp "privmsg $vhand :On vient de te créer un Access dans ma base de données"
  901.          puthelp "privmsg $vhand :Donc je te conseille de taper la commande qui suit "
  902.          puthelp "privmsg $vhand :/msg $::botnick conf"
  903.          puthelp "privmsg $vhand :Ceci t'aidera pour les premiers pas pour configurer ton mot de passe par exemple"
  904.          puthelp "privmsg $vhand :Si vous ne l'avez pas encore effectué sinon ceci ne vous servira à rien de le tapez"
  905.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Add-Superop\0036\] \0031par : \0034$hand"
  906.          save
  907. }
  908.  
  909.     # Delop/Delmaster/Delowner/Delsuperop #
  910.  
  911.     # Delop #
  912.  
  913.     proc delop { nick uhost hand text } {
  914.          set vhand [lindex [split [lindex $text 0] |] 0]
  915.          set chan [lindex $text 1]
  916.     if {[channel get $chan GB]==0} { return; }
  917.     if { [nick2hand $nick] eq "*" } {
  918.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  919.     return 0
  920.     }
  921.     if {![isauth $hand]} {
  922.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  923.     return 0
  924.     }
  925.     if {![string match #* $chan]} {
  926.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick delop <pseudo> <#salon> ) !"
  927.     return 0
  928.     }
  929.     if ![validchan $chan] {
  930.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  931.     return 0
  932.     }
  933.     if ![matchattr $hand o|m $chan] {
  934.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  935.     return 0
  936.     }
  937.     if ![matchattr $vhand |o $chan] {
  938.          puthelp "notice $nick :Ce pseudo ne figure pas dans l'Access-List de $chan !"
  939.     return 0
  940.     }
  941.     if [matchattr $vhand |n $chan] {
  942.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
  943.     return 0
  944.     }
  945.     if [matchattr $vhand |m $chan] {
  946.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
  947.     return 0
  948.     }
  949.          delchanrec $vhand $chan
  950.          puthelp "notice $nick :[lindex $text 0] a bien été supprimé(e) de l'Access-List Opérateurs sur [lindex $text 1] !"
  951.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Del-Op\0036\] \0031par : \0034$hand"
  952.          save
  953.     foreach c [channels] {
  954.     if [haschanrec $vhand $c] {
  955.     return
  956.         }
  957.     }
  958.          deluser $vhand
  959.          save
  960. }
  961.  
  962.     # Delmaster #
  963.  
  964.     proc delmaster { nick uhost hand text } {
  965.          set vhand [lindex [split [lindex $text 0] |] 0]
  966.          set chan [lindex $text 1]
  967.     if {[channel get $chan GB]==0} { return; }
  968.     if { [nick2hand $nick] eq "*" } {
  969.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  970.     return 0
  971.     }
  972.     if {![isauth $hand]} {
  973.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  974.     return 0
  975.     }
  976.     if {![string match #* $chan]} {
  977.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick delmaster <pseudo> <#salon> ) !"
  978.     return 0
  979.     }
  980.     if ![validchan $chan] {
  981.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  982.     return 0
  983.     }
  984.     if ![matchattr $hand o|n $chan] {
  985.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  986.     return 0
  987.     }
  988.     if ![matchattr $vhand |o $chan] {
  989.          puthelp "notice $nick :Ce pseudo ne figure pas dans l'Access-List de $chan !"
  990.     return 0
  991.     }
  992.     if [matchattr $vhand |n $chan] {
  993.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
  994.     return 0
  995.     }
  996.     if ![matchattr $vhand |m $chan] {
  997.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
  998.     return 0
  999.     }
  1000.          delchanrec $vhand $chan
  1001.          puthelp "notice $nick :[lindex $text 0] a bien été supprimé(e) de l'Access-List Master sur [lindex $text 1] !"
  1002.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Del-Master\0036\] \0031par : \0034$hand"
  1003.          save
  1004.     foreach c [channels] {
  1005.     if [haschanrec $vhand $c] {
  1006.      return
  1007.         }
  1008.     }
  1009.          deluser $vhand
  1010.          save
  1011. }
  1012.  
  1013.     # Delowner #
  1014.  
  1015.     proc delowner { nick uhost hand text } {
  1016.          set vhand [lindex [split [lindex $text 0] |] 0]
  1017.          set chan [lindex $text 1]
  1018.     if {[channel get $chan GB]==0} { return; }
  1019.     if { [nick2hand $nick] eq "*" } {
  1020.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1021.     return 0
  1022.     }
  1023.     if {![isauth $hand]} {
  1024.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1025.     return 0
  1026.     }
  1027.     if {![string match #* $chan]} {
  1028.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick delowner <pseudo> <#salon> ) !"
  1029.     return 0
  1030.     }
  1031.     if ![validchan $chan] {
  1032.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1033.     return 0
  1034.     }
  1035.     if ![matchattr $hand o| $chan] {
  1036.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1037.     return 0
  1038.     }
  1039.     if ![matchattr $vhand |o $chan] {
  1040.          puthelp "notice $nick :Ce pseudo ne figure pas dans l'Access-List de $chan !"
  1041.     return 0
  1042.     }
  1043.     if ![matchattr $vhand |n $chan] {
  1044.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
  1045.     return 0
  1046.     }
  1047.     if ![matchattr $vhand |m $chan] {
  1048.          puthelp "notice $nick :Ce pseudo figure dans l'Access-List Master sur $chan !"
  1049.     return 0
  1050.     }
  1051.          delchanrec $vhand $chan
  1052.          puthelp "notice $nick :[lindex $text 0] a bien été supprimé(e) de l'Access-List Owner sur [lindex $text 1] !"
  1053.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Del-Owner\0036\] \0031par : \0034$hand"
  1054.          save
  1055.     foreach c [channels] {
  1056.     if [haschanrec $vhand $c] {
  1057.     return
  1058.         }
  1059.     }
  1060.          deluser $vhand
  1061.          save
  1062. }
  1063.  
  1064.     # Delsuperop #
  1065.  
  1066.     proc delsuperop { nick host hand text } {
  1067.          set vhand [lindex [split [lindex $text 0] |] 0]
  1068.          set chan [lindex $text 1]
  1069.     if { [nick2hand $nick] eq "*" } {
  1070.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1071.     return 0
  1072.     }
  1073.     if ![isauth $hand] {
  1074.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1075.     return 0
  1076.     }
  1077.     if ![matchattr $hand o] {
  1078.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1079.     return 0
  1080.     }
  1081.          deluser $vhand
  1082.          puthelp "notice $nick :$vhand a bien été supprimé en tant que superop sur $::botnick !"
  1083.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Del-Superop\0036\] \0031par : \0034$hand"
  1084.          save
  1085. }
  1086.  
  1087.     # op/deop/voice/devoice Chan #
  1088.  
  1089.     # op #
  1090.  
  1091.     proc op { nick host hand chan text } {
  1092.     if {[channel get $chan GB]==0} { return; }
  1093.     if { [nick2hand $nick] eq "*" } {
  1094.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1095.     return 0
  1096.     }
  1097.     if {![isauth $hand]} {
  1098.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1099.     return 0
  1100.     }
  1101.     if {$text!=""} {
  1102.     if ![matchattr $hand o|o $chan] {
  1103.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1104.     return 0
  1105.     }
  1106.          pushmode $chan +oooooo [join $text]
  1107.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Op\0036\] \0031par : \0034$hand"
  1108.     return 0
  1109.     }
  1110.     if [isop [join $nick] $chan] {
  1111.          putserv "NOTICE $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
  1112.     return 0
  1113.     }
  1114.          pushmode $chan +o [join $nick]
  1115.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Op\0036\] \0031par : \0034$hand"
  1116. }
  1117.  
  1118.     # Deop #
  1119.  
  1120.     proc deop { nick host hand chan text } {
  1121.          set verifexempt "[split [lindex $text 0] |]"
  1122.          set nickverife "[lindex $verifexempt 0]"
  1123.     if {[channel get $chan GB]==0} { return; }
  1124.     if { [nick2hand $nick] eq "*" } {
  1125.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1126.     return 0
  1127.     }
  1128.     if {![isauth $hand]} {
  1129.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1130.     return 0
  1131.     }
  1132.     if {$text!=""} {
  1133.     if {![matchattr $hand o|o $chan]} {
  1134.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1135.     return 0
  1136.     }
  1137.     if {[progfile exempt icr $nickverife]!="0"} {
  1138.          putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
  1139.     return 0
  1140.     }
  1141.          pushmode $chan -oooooo [join $text]
  1142.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Deop\0036\] \0031par : \0034$hand"
  1143.     return 0
  1144.     }
  1145.     if {![isop [join $nick] $chan]} {
  1146.          putserv "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
  1147.     return 0
  1148.     }
  1149.          pushmode $chan -o [join $nick]
  1150.          puthelp "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Deop\0036\] \0031par : \0034$hand"
  1151. }
  1152.  
  1153.     # Voice #
  1154.  
  1155.     proc voice { nick host hand chan text } {
  1156.     if {[channel get $chan GB]==0} { return; }
  1157.     if { [nick2hand $nick] eq "*" } {
  1158.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1159.     return 0
  1160.     }
  1161.     if {![isauth $hand]} {
  1162.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1163.     return 0
  1164.     }
  1165.     if {![matchattr $hand o|o $chan]} {
  1166.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1167.     return 0
  1168.     }
  1169.     if {$text!=""} {
  1170.          putserv "mode $chan +vvvvvv [join $text]"
  1171.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Voice\0036\] \0031par : \0034$hand"
  1172.     return 0
  1173.     }
  1174.     if [isvoice [join $nick] $chan] {
  1175.          putserv "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
  1176.     return 0
  1177.     }
  1178.          pushmode $chan +v [join $nick]
  1179.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Voice\0036\] \0031par : \0034$hand"
  1180. }
  1181.  
  1182.     # Devoice #
  1183.  
  1184.     proc devoice { nick host hand chan text } {
  1185.          set verifexempt "[split [lindex $text 0] |]"
  1186.          set nickverife "[lindex $verifexempt 0]"
  1187.     if {[channel get $chan GB]==0} { return; }
  1188.     if { [nick2hand $nick] eq "*" } {
  1189.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1190.     return 0
  1191.     }
  1192.     if {![isauth $hand]} {
  1193.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1194.     return 0
  1195.     }
  1196.     if {![matchattr $hand o|o $chan]} {
  1197.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1198.     return 0
  1199.     }
  1200.     if {[progfile exempt icr $nickverife]!="0"} {
  1201.          putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
  1202.     return 0
  1203.     }
  1204.     if {$text!=""} {
  1205.          pushmode $chan -vvvvvv [join $text]
  1206.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Devoice\0036\] \0031par : \0034$hand"
  1207.     return 0
  1208.     }
  1209.     if {![isvoice [join $nick] $chan]} {
  1210.          putserv "NOTICE $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
  1211.     return 0
  1212.     }
  1213.          pushmode $chan -v [join $nick]
  1214.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Devoice\0036\] \0031par : \0034$hand"
  1215. }
  1216.  
  1217.     # Opall/Deopall/Voiceall/Devoiceall Chan #
  1218.  
  1219.     # Opall #
  1220.  
  1221.     proc opall {nick host hand chan arg} {
  1222.          set arg [split $arg]
  1223.     if {[channel get $chan GB]==0} { return; }
  1224.     if { [nick2hand $nick] eq "*" } {
  1225.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1226.     return 0
  1227.     }
  1228.     if {![isauth $hand]} {
  1229.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1230.     return 0
  1231.     }
  1232.     if {![matchattr $hand o|m $chan]} {
  1233.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1234.     return 0
  1235.     }
  1236.     foreach opall [chanlist $chan] { if [isop $opall $chan] continue; pushmode $chan +o $opall }
  1237.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Op-All\0036\] \0031par : \0034$hand"
  1238.     return
  1239. }
  1240.  
  1241.     # Deopall #
  1242.  
  1243.     proc deopall { nick host hand chan arg } {
  1244.          set arg [split $arg]
  1245.     if {[channel get $chan GB]==0} { return; }
  1246.     if { [nick2hand $nick] eq "*" } {
  1247.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1248.     return 0
  1249.     }
  1250.     if {![isauth $hand]} {
  1251.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1252.     return 0
  1253.     }
  1254.     if {![matchattr $hand o|m $chan]} {
  1255.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1256.     return 0
  1257.     }
  1258.     foreach deopall [chanlist $chan] { if [isvoice $deopall $chan] continue; pushmode $chan -o $deopall }
  1259.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Deop-All\0036\] \0031par : \0034$hand"
  1260.     return
  1261. }
  1262.  
  1263.     # voiceall #
  1264.  
  1265.     proc voiceall { nick host hand chan arg } {
  1266.          set arg [split $arg]
  1267.     if {[channel get $chan GB]==0} { return; }
  1268.     if { [nick2hand $nick] eq "*" } {
  1269.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1270.     return 0
  1271.     }
  1272.     if {![isauth $hand]} {
  1273.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1274.     return 0
  1275.     }
  1276.     if {![matchattr $hand o|m $chan]} {
  1277.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1278.     return 0
  1279.     }
  1280.     foreach voiceall [chanlist $chan] { if [isop $voiceall $chan] continue; pushmode $chan +v $voiceall }
  1281.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Voice-All\0036\] \0031par : \0034$hand"
  1282.     return
  1283. }
  1284.  
  1285.     # Devoiceall #
  1286.  
  1287.     proc devoiceall { nick host hand chan arg } {
  1288.          set arg [split $arg]
  1289.     if {[channel get $chan GB]==0} { return; }
  1290.     if { [nick2hand $nick] eq "*" } {
  1291.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1292.     return 0
  1293.     }
  1294.     if {![isauth $hand]} {
  1295.          puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> ) !"
  1296.     return 0
  1297.     }
  1298.     if {![matchattr $hand o|m $chan]} {
  1299.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1300.     return 0
  1301.     }
  1302.     foreach devoiceall [chanlist $chan] { if [isop $devoiceall $chan] continue; pushmode $chan -v $devoiceall }
  1303.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Devoice-All\0036\] \0031par : \0034$hand"
  1304.     return
  1305. }
  1306.    
  1307.     # Opall/Deopall/Voiceall/Devoiceall Msg #
  1308.  
  1309.     # Opall #
  1310.  
  1311.     proc xopall { nick host hand text } {
  1312.          set chan [lindex $text 0]
  1313.     if { [nick2hand $nick] eq "*" } {
  1314.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1315.     return 0
  1316.     }
  1317.     if {![isauth $hand]} {
  1318.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1319.     return 0
  1320.     }
  1321.     if {![string match #* [lindex $text 0]]} {
  1322.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick opall <#salon> ) !"
  1323.     return 0
  1324.     }
  1325.     if {![validchan [lindex $text 0]]} {
  1326.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1327.     return 0
  1328.     }
  1329.     if {![matchattr $hand o|m [lindex $text 0]]} {
  1330.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1331.     return 0
  1332.     }
  1333.     if {![botonchan [lindex $text 0]]} {
  1334.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  1335.     return 0
  1336.     }
  1337.     if {![botisop [lindex $text 0]]} {
  1338.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1339.     return 0
  1340.     }
  1341.     if {![onchan $nick [lindex $text 0]]} {
  1342.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1343.     return 0
  1344.     }
  1345.     if {[isop [join $nick] [lindex $text 0]]} {
  1346.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
  1347.     return 0
  1348.     }
  1349.     foreach xopall [chanlist $chan] { if [isop $xopall $chan] continue; pushmode $chan +o $xopall }
  1350.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Op-All\0036\] \0031par : \0034$hand"
  1351. }
  1352.    
  1353.     # Deopall #
  1354.  
  1355.     proc xdeopall { nick host hand text } {
  1356.          set chan [lindex $text 0]
  1357.     if { [nick2hand $nick] eq "*" } {
  1358.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1359.     return 0
  1360.     }
  1361.     if {![isauth $hand]} {
  1362.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1363.     return 0
  1364.     }
  1365.     if {![string match #* [lindex $text 0]]} {
  1366.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick deopall <#salon> ) !"
  1367.     return 0
  1368.     }
  1369.     if {![validchan [lindex $text 0]]} {
  1370.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1371.     return 0
  1372.     }
  1373.     if {![matchattr $hand o|m [lindex $text 0]]} {
  1374.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1375.     return 0
  1376.     }
  1377.     if {![botonchan [lindex $text 0]]} {
  1378.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  1379.     return 0
  1380.     }
  1381.     if {![botisop [lindex $text 0]]} {
  1382.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1383.     return 0
  1384.     }
  1385.     if {![onchan $nick [lindex $text 0]]} {
  1386.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1387.     return 0
  1388.     }
  1389.     foreach xdeopall [chanlist $chan] { if [isvoice $xdeopall $chan] continue; pushmode $chan -o $xdeopall }
  1390.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Deop-All\0036\] \0031par : \0034$hand"
  1391. }
  1392.    
  1393.     # Voiceall #
  1394.  
  1395.     proc xvoiceall { nick host hand text } {
  1396.          set chan [lindex $text 0]
  1397.     if { [nick2hand $nick] eq "*" } {
  1398.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1399.     return 0
  1400.     }
  1401.     if {![isauth $hand]} {
  1402.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1403.     return 0
  1404.     }
  1405.     if {![string match #* [lindex $text 0]]} {
  1406.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick voiceall <#salon> ) !"
  1407.     return 0
  1408.     }
  1409.     if {![validchan [lindex $text 0]]} {
  1410.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1411.     return 0
  1412.     }
  1413.     if {![matchattr $hand o|m [lindex $text 0]]} {
  1414.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1415.     return 0
  1416.     }
  1417.     if {![botonchan [lindex $text 0]]} {
  1418.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  1419.     return 0
  1420.     }
  1421.     if {![botisop [lindex $text 0]]} {
  1422.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1423.     return 0
  1424.     }
  1425.     if {![onchan $nick [lindex $text 0]]} {
  1426.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1427.     return 0
  1428.     }
  1429.     foreach xvoiceall [chanlist $chan] { if [isop $xvoiceall $chan] continue; pushmode $chan +v $xvoiceall }
  1430.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Voice-All\0036\] \0031par : \0034$hand"
  1431. }
  1432.    
  1433.     # Devoiceall #
  1434.  
  1435.     proc xdevoiceall { nick host hand text } {
  1436.          set chan [lindex $text 0]
  1437.     if { [nick2hand $nick] eq "*" } {
  1438.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1439.     return 0
  1440.     }
  1441.     if {![isauth $hand]} {
  1442.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1443.     return 0
  1444.     }
  1445.     if {![string match #* [lindex $text 0]]} {
  1446.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick devoiceall <#salon> ) !"
  1447.     return 0
  1448.     }
  1449.     if {![validchan [lindex $text 0]]} {
  1450.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1451.     return 0
  1452.     }
  1453.     if {![matchattr $hand o|m [lindex $text 0]]} {
  1454.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1455.     return 0
  1456.     }
  1457.     if {![botonchan [lindex $text 0]]} {
  1458.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  1459.     return 0
  1460.     }
  1461.     if {![botisop [lindex $text 0]]} {
  1462.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1463.     return 0
  1464.     }
  1465.     if {![onchan $nick [lindex $text 0]]} {
  1466.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1467.     return 0
  1468.     }
  1469.     foreach xdevoiceall [chanlist $chan] { if [isop $xdevoiceall $chan] continue; pushmode $chan -v $xdevoiceall }
  1470.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Devoice-All\0036\] \0031par : \0034$hand"
  1471. }
  1472.  
  1473.     # op/deop/voice/devoice Msg #
  1474.  
  1475.     # Op #
  1476.  
  1477.     proc xop { nick host hand text } {
  1478.          set chan [lindex $text 0]
  1479.     if {[channel get $chan GB]==0} { return; }
  1480.     if { [nick2hand $nick] eq "*" } {
  1481.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1482.     return 0
  1483.     }
  1484.     if {![isauth $hand]} {
  1485.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1486.     return 0
  1487.     }
  1488.     if {![string match #* [lindex $text 0]]} {
  1489.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick op <#salon> <pseudo(s)> )"
  1490.     return 0
  1491.     }
  1492.     if {![validchan [lindex $text 0]]} {
  1493.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1494.     return 0
  1495.     }
  1496.     if {![matchattr $hand o|o [lindex $text 0]]} {
  1497.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1498.     return 0
  1499.     }
  1500.     if {![botonchan [lindex $text 0]]} {
  1501.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  1502.     return 0
  1503.     }
  1504.     if {![botisop [lindex $text 0]]} {
  1505.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1506.     return 0
  1507.     }
  1508.     if {[lindex $text 1]!=""} {
  1509.          pushmode [lindex $text 0] +oooooo [join [lrange $text 1 end]]
  1510.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Op\0036\] \0031par : \0034$hand"
  1511.     return 0
  1512.     }
  1513.     if {![onchan $nick [lindex $text 0]]} {
  1514.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1515.     return 0
  1516.     }
  1517.     if {[isop [join $nick] [lindex $text 0]]} {
  1518.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
  1519.     return 0
  1520.     }
  1521.          pushmode [lindex $text 0] +o [join $nick]
  1522.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Op\0036\] \0031par : \0034$hand"
  1523. }
  1524.  
  1525.     # Deop #
  1526.  
  1527.     proc xdeop { nick host hand text } {
  1528.          set chan [lindex $text 0]
  1529.          set verifexempt "[split [lindex $text 1] |]"
  1530.          set nickverife "[lindex $verifexempt 0]"
  1531.     if {[channel get $chan GB]==0} { return; }
  1532.     if { [nick2hand $nick] eq "*" } {
  1533.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1534.     return 0
  1535.     }
  1536.     if {![isauth $hand]} {
  1537.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1538.     return 0
  1539.     }
  1540.     if {![string match #* [lindex $text 0]]} {
  1541.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick deop <#salon> <pseudo(s)> ) !"
  1542.     return 0
  1543.     }
  1544.     if {![validchan [lindex $text 0]]} {
  1545.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1546.     return 0
  1547.     }
  1548.     if {![matchattr $hand o|o [lindex $text 0]]} {
  1549.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1550.     return 0
  1551.     }
  1552.     if {![onchan $nick [lindex $text 0]]} {
  1553.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1554.     return 0
  1555.     }
  1556.     if {![botonchan [lindex $text 0]]} {
  1557.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  1558.     return 0
  1559.     }
  1560.     if {![botisop [lindex $text 0]]} {
  1561.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1562.     return 0
  1563.     }
  1564.     if {[progfile exempt icr $nickverife]!="0"} {
  1565.          putserv "notice $nick :Attention le Nick: \2$nickverife\2 est dans la liste des protégés."
  1566.     return 0
  1567.     }
  1568.     if {[lindex $text 1] !=""} {
  1569.          pushmode [lindex $text 0] -oooooo [join [lrange $text 1 end]]
  1570.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Deop\0036\] \0031par : \0034$hand"
  1571.     return 0
  1572.     }
  1573.     if {![isop [join $nick] [lindex $text 0]]} {
  1574.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
  1575.     return 0
  1576.     }
  1577.          pushmode [lindex $text 0] -o [join $nick]
  1578.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Deop\0036\] \0031par : \0034$hand"
  1579. }
  1580.  
  1581.     # Voice #
  1582.  
  1583.     proc xvoice { nick uhost hand text } {
  1584.          set chan [lindex $text 0]
  1585.     if {[channel get $chan GB]==0} { return; }
  1586.     if { [nick2hand $nick] eq "*" } {
  1587.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1588.     return 0
  1589.     }
  1590.     if {![isauth $hand]} {
  1591.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1592.     return 0
  1593.     }
  1594.     if {![string match #* [lindex $text 0]]} {
  1595.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick voice <#salon> <pseudo(s)> ) !"
  1596.     return 0
  1597.     }
  1598.     if {![validchan [lindex $text 0]]} {
  1599.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1600.     return 0
  1601.     }
  1602.     if {![matchattr $hand o|o [lindex $text 0]]} {
  1603.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1604.     return 0
  1605.     }
  1606.     if {![onchan $nick [lindex $text 0]]} {
  1607.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1608.     return 0
  1609.     }
  1610.     if {![botonchan [lindex $text 0]]} {
  1611.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  1612.     return 0
  1613.     }
  1614.     if {![botisop [lindex $text 0]]} {
  1615.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1616.     return 0
  1617.     }
  1618.     if {[lindex $text 1] !=""} {
  1619.          pushmode [lindex $text 0] +vvvvvv [join [lrange $text 1 end]]
  1620.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Voice\0036\] \0031par : \0034$hand"
  1621.     return 0
  1622.     }
  1623.     if [isop [join $nick] [lindex $text 0]] {
  1624.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
  1625.     return 0
  1626.     }
  1627.          pushmode [lindex $text 0] +v [join $nick]
  1628.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Voice\0036\] \0031par : \0034$hand"
  1629. }
  1630.  
  1631.     # Devoice #
  1632.  
  1633.     proc xdevoice { nick host hand text } {
  1634.          set chan [lindex $text 0]
  1635.          set verifexempt "[split [lindex $text 1] |]"
  1636.          set nickverife "[lindex $verifexempt 0]"
  1637.     if {[channel get $chan GB]==0} { return; }
  1638.     if { [nick2hand $nick] eq "*" } {
  1639.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1640.     return 0
  1641.     }
  1642.     if {![isauth $hand]} {
  1643.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1644.     return 0
  1645.     }
  1646.     if {![string match #* [lindex $text 0]]} {
  1647.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick devoice <#salon> <pseudo(s)> ) !"
  1648.     return 0
  1649.     }
  1650.     if {![validchan [lindex $text 0]]} {
  1651.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1652.     return 0
  1653.     }
  1654.     if {![matchattr $hand o|o [lindex $text 0]]} {
  1655.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1656.     return 0
  1657.     }
  1658.     if {![onchan $nick [lindex $text 0]]} {
  1659.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1660.     return 0
  1661.     }
  1662.     if {![botonchan [lindex $text 0]]} {
  1663.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  1664.     return 0
  1665.     }
  1666.     if {![botisop [lindex $text 0]]} {
  1667.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1668.     return 0
  1669.     }
  1670.     if {[progfile exempt icr $nickverife]!="0"} {
  1671.          putserv "notice $nick :Attention le Nick: \2$nickverife\2 est dans la liste des protégés."
  1672.     return 0
  1673.     }
  1674.     if {[lindex $text 1] !=""} {
  1675.          pushmode [lindex $text 0] -vvvvvv [join [lrange $text 1 end]]
  1676.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Devoice\0036\] \0031par : \0034$hand"
  1677.     return 0
  1678.     }
  1679.     if ![isvoice [join $nick] [lindex $text 0]] {
  1680.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(iso)]"
  1681.     return 0
  1682.     }
  1683.          pushmode [lindex $text 0] -v [join $nick]
  1684.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Devoice\0036\] \0031par : \0034$hand"
  1685. }
  1686.  
  1687.     # Ban/Kick/Unban/Kickban Chan  #
  1688.  
  1689.     # Ban #
  1690.  
  1691.     proc ban { nick host hand chan text } {
  1692.          set verifexempt "[split [lindex $text 0] |]"
  1693.          set nickverife "[lindex $verifexempt 0]"
  1694.     if {[channel get $chan GB]==0} { return; }
  1695.     if { [nick2hand $nick] eq "*" } {
  1696.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1697.     return 0
  1698.     }
  1699.     if {![isauth $hand]} {
  1700.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1701.     return 0
  1702.     }
  1703.     if {![matchattr $hand o|o $chan]} {
  1704.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1705.     return 0
  1706.     }
  1707.     if {$text == ""} {
  1708.          puthelp "notice $nick :Syntaxe incorrecte ! ( $::GB::commande(choix)ban <pseudo/host> ) !"
  1709.     return 0
  1710.     }
  1711.     if {[progfile exempt icr $nickverife]!="0"} {
  1712.          putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
  1713.     return 0
  1714.     }
  1715.     if {[string match *!*@* [lindex $text 0]]} {
  1716.          pushmode $chan +b [lindex $text 0]
  1717.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Ban\0036\] \0031par : \0034$hand"
  1718.     return 0
  1719.     }
  1720.     if {[llength [getchanhost [lindex $text 0]]]!=0} {
  1721.          set host [lindex [split [getchanhost [lindex $text 0]] @] 1]
  1722.          pushmode $chan +b *!*@$host
  1723.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Ban\0036\] \0031par : \0034$hand"
  1724.     return
  1725.     }
  1726.          puthelp "notice $nick :Le pseudo [lindex $text 0] n'est pas sur un de mes salons, je ne peux récupérer son host !"
  1727. }
  1728.  
  1729.     # Kick #
  1730.  
  1731.     proc kick { nick uhost hand chan text } {
  1732.          set Knick "[lindex $text 0]"
  1733.          set verifexempt "[split [lindex $text 0] |]"
  1734.          set nickverife "[lindex $verifexempt 0]"
  1735.     if {[channel get $chan GB]==0} { return; }
  1736.     if { [nick2hand $nick] eq "*" } {
  1737.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1738.     return 0
  1739.     }
  1740.     if {![isauth $hand]} {
  1741.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1742.     return 0
  1743.     }
  1744.     if {![matchattr $hand o|o $chan]} {
  1745.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1746.     return 0
  1747.     }
  1748.     if {$text == ""} {
  1749.          puthelp "notice $nick :Syntaxe : ( $::GB::commande(choix)kick <pseudo> ) !"
  1750.     return 0
  1751.     }
  1752.     if {$text != ""} {
  1753.     if {![onchan [lindex $text 0]]} {
  1754.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1755.     return 0
  1756.     }
  1757.     if {[progfile exempt icr $nickverife]!="0"} {
  1758.          putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
  1759.     return 0
  1760.     }
  1761.     if {[lindex $text 1] != ""} {
  1762.          putquick "kick $chan [lindex $text 0] :[join [lrange $text 1 end]]"
  1763.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Kick\0036\] \0031par : \0034$hand"
  1764.     return
  1765.     }
  1766.     if {[lindex $text 1] == ""} {
  1767.          putkick $chan [lindex $text 0] [subst -nocommands -nobackslashes $::GB::msg(kick)]
  1768.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Kick\0036\] \0031par : \0034$hand"
  1769.     return 0
  1770.         }
  1771.     }
  1772. }
  1773.  
  1774.     # Unban #
  1775.  
  1776.     proc unban { nick uhost hand chan text } {
  1777.     if {[channel get $chan GB]==0} { return; }
  1778.     if { [nick2hand $nick] eq "*" } {
  1779.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1780.     return 0
  1781.     }
  1782.     if {![isauth $hand]} {
  1783.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1784.     return 0
  1785.     }
  1786.     if {![matchattr $hand o|o $chan]} {
  1787.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1788.     return 0
  1789.     }
  1790.     if {$text == ""} {
  1791.          puthelp "notice $nick :Syntaxe : ( $::GB::commande(choix)unban <host> ) !"
  1792.     return 0
  1793.     }
  1794.     if {[string match *!*@* [lindex $text 0]]} {
  1795.          pushmode $chan -b [lindex $text 0]
  1796.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Unban\0036\] \0031par : \0034$hand"
  1797.     return 0
  1798.     }
  1799.     if {[llength [getchanhost [lindex $text 0]]]!=0} {
  1800.          set host [lindex [split [getchanhost [lindex $text 0]] @] 1]
  1801.          putquick "mode $chan -b *!*@$host"
  1802.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Unban\0036\] \0031par : \0034$hand"
  1803.     return
  1804.     }
  1805. }
  1806.  
  1807.     # Kickban #
  1808.  
  1809.     proc kickban { nick host hand chan text } {
  1810.          set KBnick "[lindex $text 0]"
  1811.          set host [lindex [split [getchanhost [lindex $text 0]] @] 1]
  1812.          set verifexempt "[split [lindex $text 0] |]"
  1813.          set nickverife "[lindex $verifexempt 0]"
  1814.     if {[channel get $chan GB]==0} { return; }
  1815.     if { [nick2hand $nick] eq "*" } {
  1816.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1817.     return 0
  1818.     }
  1819.     if {![isauth $hand]} {
  1820.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1821.     return 0
  1822.     }
  1823.     if {![matchattr $hand o|o $chan]} {
  1824.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1825.     return 0
  1826.     }
  1827.     if {$text == ""} {
  1828.          puthelp "notice $nick :Syntaxe : ( $::GB::commande(choix)kickban <pseudo> ) !"
  1829.     return 0
  1830.     }
  1831.     if {![onchan [lindex $text 0] $chan]} {
  1832.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1833.     return 0
  1834.     }
  1835.     if {![botisop [lindex $chan]]} {
  1836.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1837.     return 0
  1838.     }
  1839.     if {[progfile exempt icr $nickverife]!="0"} {
  1840.          putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
  1841.     return 0
  1842.     }
  1843.         ::GB::ban_user $KBnick *!*@$host $chan
  1844.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Kick-Ban\0036\] \0031par : \0034$hand"
  1845.     return
  1846. }
  1847.  
  1848.     # Ban/Kick/Unban/Kickban MSG #
  1849.  
  1850.     # Ban #
  1851.  
  1852.     proc xban { nick uhost hand arg } {
  1853.          set chan [lindex $arg 0]
  1854.          set cible [lindex $arg 1]
  1855.          set verifexempt "[split [lindex $arg 1] |]"
  1856.          set nickverife "[lindex $verifexempt 0]"
  1857.     if {[channel get $chan GB]==0} { return; }
  1858.     if { [nick2hand $nick] eq "*" } {
  1859.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1860.     return 0
  1861.     }
  1862.     if {![isauth $hand]} {
  1863.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1864.     return 0
  1865.     }
  1866.     if ("[llength $arg]"!="2")||![string match -nocase #* $chan] {
  1867.          puthelp "notice $nick :Syntaxe incorrect ( /msg $::botnick ban <#salon> <pseudo/host> ) !"
  1868.     return 0
  1869.     }
  1870.     if {![validchan [lindex $arg 0]]} {
  1871.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1872.     return 0
  1873.     }
  1874.     if {![matchattr $hand o|o $chan]} {
  1875.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1876.     return 0
  1877.     }
  1878.     if {![botonchan [lindex $arg 0]]} {
  1879.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  1880.     return 0
  1881.     }
  1882.     if {![botisop [lindex $arg 0]]} {
  1883.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1884.     return 0
  1885.     }
  1886.     if {[string match *!*@* $cible]} {
  1887.          putquick "mode $chan +b $cible"
  1888.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Ban\0036\] \0031par : \0034$hand"
  1889.     return 0
  1890.     }
  1891.     if {[progfile exempt icr $nickverife]!="0"} {
  1892.          putserv "notice $nick :Attention le Nick: \2$cible\2 est dans la liste des protégés."
  1893.     return 0
  1894.     }
  1895.     if {[llength [getchanhost $cible]]!=0} {
  1896.          set host [lindex [split [getchanhost $cible] @] 1]
  1897.          putquick "mode $chan +b *!*@$host"
  1898.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Ban\0036\] \0031par : \0034$hand"
  1899.     return 0
  1900.     }
  1901.          puthelp "notice $nick :Le pseudo $cible n'est pas sur un de mes salons, je ne peux récupérer son host !"
  1902. }
  1903.  
  1904.     # kick #
  1905.  
  1906.     proc xkick { nick uhost hand text } {
  1907.          set Knick "[lindex $text 0]"
  1908.          set chan [lindex $text 0]
  1909.          set cible [lindex $text 1]
  1910.          set verifexempt "[split [lindex $text 1] |]"
  1911.          set nickverife "[lindex $verifexempt 0]"
  1912.     if {[channel get $chan GB]==0} { return; }
  1913.     if { [nick2hand $nick] eq "*" } {
  1914.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1915.     return 0
  1916.     }
  1917.     if {![isauth $hand]} {
  1918.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1919.     return 0
  1920.     }
  1921.     if {![string match #* [lindex $text 0]]} {
  1922.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick kick <#salon> <pseudo(s)> ) !"
  1923.     return 0
  1924.     }
  1925.     if {![validchan [lindex $text 0]]} {
  1926.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  1927.     return 0
  1928.     }
  1929.     if {![matchattr $hand o|o $chan]} {
  1930.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1931.     return 0
  1932.     }
  1933.     if {![onchan $nick [lindex $text 0]]} {
  1934.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1935.     return 0
  1936.     }
  1937.     if {![botonchan [lindex $text 0]]} {
  1938.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  1939.     return 0
  1940.     }
  1941.     if {![botisop [lindex $text 0]]} {
  1942.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  1943.     return 0
  1944.     }
  1945.     if {![onchan $cible $chan]} {
  1946.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nopseudo)]"
  1947.     return 0
  1948.     }
  1949.     if {[progfile exempt icr $nickverife]!="0"} {
  1950.          puthelp "notice $nick :Attention le Nick: \2[lindex $text 1]\2 est dans la liste des protégés."
  1951.     return 0
  1952.     }
  1953.     if {[lindex $text 2] !=""} {
  1954.          putquick "kick [lindex $text 0] [lindex $text 1] :[join [lrange $text 2 end]]"
  1955.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Kick\0036\] \0031par : \0034$hand"
  1956.     return
  1957.     }
  1958.     if {[onchan [join [lindex $text 1]] [lindex $text 0]]} {
  1959.          putquick "kick [lindex $text 0] [lindex $text 1] :[subst -nocommands -nobackslashes $::GB::msg(kick)]"
  1960.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Kick\0036\] \0031par : \0034$hand"
  1961.      return
  1962.     }
  1963. }
  1964.  
  1965.     # Unban #
  1966.  
  1967.     proc xunban { nick uhost hand arg } {
  1968.          set chan [lindex $arg 0]
  1969.     if {[channel get $chan GB]==0} { return; }
  1970.     if { [nick2hand $nick] eq "*" } {
  1971.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  1972.     return 0
  1973.     }
  1974.     if {![isauth $hand]} {
  1975.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  1976.     return 0
  1977.     }
  1978.     if {![matchattr $hand o|o $chan]} {
  1979.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  1980.     return 0
  1981.     }
  1982.     if {![string match #* [lindex $arg 0]]} {
  1983.          puthelp "notice $nick :Syntaxe : ( /msg $::botnick unban <#salon> <host> ) !"
  1984.     return 0
  1985.     }
  1986.     if {[string match *!*@* [lindex $arg 1]]} {
  1987.          putquick "mode $chan -b [lindex $arg 1]"
  1988.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Unban\0036\] \0031par : \0034$hand"
  1989.     return 0
  1990.     }
  1991.     if {[llength [getchanhost [lindex $arg 0]]]!=0} {
  1992.          set host [lindex [split [getchanhost [lindex $arg 0]] @] 1]
  1993.          putquick "mode $chan -b *!*@$host"
  1994.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Unban\0036\] \0031par : \0034$hand"
  1995.     return 0
  1996.     }
  1997. }
  1998.  
  1999.     # Kickban #
  2000.  
  2001.     proc xkickban { nick uhost hand arg } {
  2002.          set KBnick "[lindex $text 0]"
  2003.          set chan [lindex $arg 0]
  2004.          set verifexempt "[split [lindex $arg 1] |]"
  2005.          set nickverife "[lindex $verifexempt 0]"
  2006.     if {[channel get $chan GB]==0} { return; }
  2007.     if { [nick2hand $nick] eq "*" } {
  2008.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2009.     return 0
  2010.     }
  2011.     if {![isauth $hand]} {
  2012.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2013.     return 0
  2014.     }
  2015.     if {![matchattr $hand o|o $chan]} {
  2016.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2017.     return 0
  2018.     }
  2019.     if {![string match #* [lindex $arg 0]]} {
  2020.          puthelp "notice $nick :Syntaxe : ( /msg $::botnick kickban <#salon> <pseudo> ) !"
  2021.     return 0
  2022.     }
  2023.     if {[progfile exempt icr $nickverife]!="0"} {
  2024.          puthelp "notice $nick :Attention le Nick: \2[lindex $arg 1]\2 est dans la liste des protégés."
  2025.     return 0
  2026.     }
  2027.     if {[llength [getchanhost [lindex $arg 1]]]!=0} {
  2028.          set host [lindex [split [getchanhost [lindex $arg 1]] @] 1]
  2029.          ::GB::ban_user $KBnick *!*@$host $chan
  2030.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Kick-Ban\0036\] \0031par : \0034$hand"
  2031.     return
  2032.     }
  2033. }
  2034.  
  2035.     # Clearban/Mode Chan #
  2036.  
  2037.     # Clearban #
  2038.  
  2039.     proc clearbans { nick host hand chan text } {
  2040.     if {[channel get $chan GB]==0} { return; }
  2041.     if { [nick2hand $nick] eq "*" } {
  2042.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2043.     return 0
  2044.     }
  2045.     if {![isauth $hand]} {
  2046.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2047.     return 0
  2048.     }
  2049.     if {![matchattr $hand o|m $chan]} {
  2050.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2051.     return 0
  2052.     }
  2053.     foreach bsyntaxe [chanbans $chan] {
  2054.          putquick "mode $chan -b [lindex $bsyntaxe 0]"
  2055.     }
  2056.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Clear-Bans\0036\] \0031par : \0034$hand"
  2057. }
  2058.  
  2059.     # Mode #
  2060.  
  2061. proc mode { nick uhost hand chan text } {
  2062.     if {[channel get $chan GB]==0} { return; }
  2063.     if { [nick2hand $nick] eq "*" } {
  2064.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2065.     return 0
  2066.     }
  2067.     if {![isauth $hand]} {
  2068.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2069.     return 0
  2070.     }
  2071.     if {$text!=""} {
  2072.     if {![matchattr $hand o|m $chan]} {
  2073.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2074.     return 0
  2075.     }
  2076.          putquick "mode $chan $text"
  2077.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Mode\0036\] \0031par : \0034$hand"
  2078.     }
  2079. }
  2080.  
  2081.     # Clearbans/Mode Msg #
  2082.  
  2083.     # Clearbans #
  2084.  
  2085.     proc xclearbans { nick host hand text } {
  2086.          set chan [lindex $text 0]
  2087.     if {[channel get $chan GB]==0} { return; }
  2088.     if { [nick2hand $nick] eq "*" } {
  2089.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2090.     return 0
  2091.     }
  2092.     if {![isauth $hand]} {
  2093.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2094.     return 0
  2095.     }
  2096.     if {![string match #* [lindex $text 0]]} {
  2097.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick clearbans <#salon> ) !"
  2098.     return 0
  2099.     }
  2100.     if {![validchan [lindex $text 0]]} {
  2101.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  2102.     return 0
  2103.     }
  2104.     if {![matchattr $hand o|m [lindex $text 0]]} {
  2105.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2106.     return 0
  2107.     }
  2108.     if {![botonchan [lindex $text 0]]} {
  2109.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  2110.     return 0
  2111.     }
  2112.     if {![botisop [lindex $text 0]]} {
  2113.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  2114.     return 0
  2115.     }
  2116.     foreach bsyntaxe [chanbans $chan] {
  2117.          putquick "mode $chan -b [lindex $bsyntaxe 0]"
  2118.     }
  2119.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Clear-Bans\0036\] \0031par : \0034$hand"
  2120. }
  2121.  
  2122.     # Mode #
  2123.  
  2124.     proc xmode { nick host hand text } {
  2125.          set chan [lindex $text 0]
  2126.     if {[channel get $chan GB]==0} { return; }
  2127.     if { [nick2hand $nick] eq "*" } {
  2128.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2129.     return 0
  2130.     }
  2131.     if {![isauth $hand]} {
  2132.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2133.     return 0
  2134.     }
  2135.     if {![string match #* [lindex $text 0]]} {
  2136.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick mode <#salon> <mode(s)> ) !"
  2137.     return 0
  2138.     }
  2139.     if {![validchan [lindex $text 0]]} {
  2140.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  2141.     return 0
  2142.     }
  2143.     if {$text!=""} {
  2144.     if {![matchattr $hand o|m [lindex $text 0]]} {
  2145.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2146.     return 0
  2147.     }
  2148.     if {![botonchan [lindex $text 0]]} {
  2149.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  2150.     return 0
  2151.     }
  2152.     if {![botisop [lindex $text 0]]} {
  2153.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(botdeop)]"
  2154.     return 0
  2155.     }
  2156.          putquick "mode $chan [lindex $text 1]"
  2157.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Mode\0036\] \0031par : \0034$hand"
  2158.     }
  2159. }
  2160.  
  2161.     # Topic Chan/Msg #
  2162.  
  2163.     # Topic Chan #
  2164.  
  2165.     proc topic { nick host hand chan arg} {
  2166.     if {[channel get $chan GB]==0} { return; }
  2167.     if { [nick2hand $nick] eq "*" } {
  2168.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2169.     return 0
  2170.     }
  2171.  
  2172.     if {![isauth $hand]} {
  2173.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2174.     return 0
  2175.     }
  2176.  
  2177.     if {![matchattr $hand o|o $chan]} {
  2178.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2179.     return 0
  2180.     }
  2181.          putquick "TOPIC $chan :$arg"
  2182.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Topic\0036\] \0031par : \0034$hand"
  2183. }
  2184.  
  2185.     # Topic Msg #
  2186.    
  2187.     proc xtopic { nick host hand text } {
  2188.          set chan [string tolower [lindex $text 0]]
  2189.     if {[channel get $chan GB]==0} { return; }
  2190.     if { [nick2hand $nick] eq "*" } {
  2191.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2192.     return 0
  2193.     }
  2194.     if {![isauth $hand]} {
  2195.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2196.     return 0
  2197.     }
  2198.     if {![string match #* [lindex $text 0]]} {
  2199.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick topic <#chan> <text> ) !"
  2200.     return 0
  2201.     }
  2202.     if {![validchan [lindex $text 0]]} {
  2203.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  2204.     return 0
  2205.     }
  2206.     if { [string length $text] ne "" } {
  2207.     if {![matchattr $hand o|o [lindex $text 0]]} {
  2208.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2209.     return 0
  2210.          }
  2211.          putquick "TOPIC $chan :[lindex $text 1 end]"
  2212.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Topic\0036\] \0031par : \0034$hand"
  2213.     }
  2214. }
  2215.    
  2216.     # Infoline #
  2217.  
  2218.     proc infoline { nick host hand arg } {
  2219.          set chan [string tolower [lindex $arg 0]]
  2220.     if {[channel get $chan GB]==0} { return; }
  2221.     if { [nick2hand $nick] eq "*" } {
  2222.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2223.     return 0
  2224.     }
  2225.     if {![isauth $hand]} {
  2226.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2227.     return 0
  2228.     }
  2229.     if {![string match #* [lindex $arg 0]]} {
  2230.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick infoline <#salon> <text> ) !"
  2231.     return 0
  2232.     }
  2233.     if {![validchan [lindex $arg 0]]} {
  2234.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  2235.     return 0
  2236.     }
  2237.     if { [string length $arg] ne "" } {
  2238.     if {![matchattr $hand o|o [lindex $arg 0]]} {
  2239.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2240.     return 0
  2241.     }
  2242.          setchaninfo $hand $chan [join [lrange $arg 1 end]]
  2243.          puthelp "notice $nick :Infoline définie :[join [lrange $arg 1 end]]"
  2244.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Info-Line\0036\] \0031par : \0034$hand"
  2245.     }
  2246. }
  2247.  
  2248.     # Message au join Infoline de CrazyCat #
  2249.  
  2250.     proc greet { nick uhost handle chan } {
  2251.     if { ![validuser $handle] } { return; }
  2252.     if { [getchaninfo $handle $chan] ne "" } {
  2253.          putserv "PRIVMSG $chan :\[$nick\] [getchaninfo $handle $chan]"
  2254.    }
  2255.    return
  2256. }
  2257.    
  2258.     # Notice-Chan #
  2259.  
  2260.     proc nonotice_chanoff { nick uhost hand text dest } {
  2261.     if ("$nick"=="")||("$dest"=="$::botnick") {return 0}
  2262.     if [validuser [finduser $nick!*@*]]&&[matchattr $hand o|o $dest] {return 0}
  2263.     if [isop $nick $dest]||[isvoice $nick $dest] {return 0}
  2264.     if ![botisop $dest] {return 0}
  2265.     if [string match -nocase niubot?? $nick] {return 0}
  2266.          set host [lindex [split $uhost @] 1]
  2267.          putquick "mode $dest +b *!*@$host"
  2268.          putquick "kick $dest $nick :[subst -nocommands -nobackslashes $::GB::msg(nc)]"
  2269. }
  2270.    
  2271.     # Amsg #
  2272.  
  2273.     proc amsg { nick host hand chan arg } {
  2274.     if {[channel get $chan GB]==0} { return; }
  2275.     if { [nick2hand $nick] eq "*" } {
  2276.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2277.     return 0
  2278.     }
  2279.     if {![isauth $hand]} {
  2280.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2281.     return 0
  2282.     }
  2283.     if {![matchattr $hand o|n $chan]} {
  2284.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2285.     return 0
  2286.     }
  2287.     if [string equal -nocase $chan "$::GB::log"] {
  2288.     foreach c [channels] {
  2289.          putserv "privmsg $c :\0031\[\00314 Information \0031\] \0034$hand \0032: $arg"
  2290.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)Amsg\0036\] \0031par : \0034$hand"
  2291.         }
  2292.     }
  2293. }
  2294.  
  2295.     # Activation/Désactivation du TCL #
  2296.  
  2297.     proc gbon { nick host hand chan arg } {
  2298.     if {[channel get $chan GB] == 0} {
  2299.          channel set $chan +GB
  2300.          putquick "PRIVMSG $chan :TCL Activé !"
  2301.     } else {
  2302.          putquick "PRIVMSG $chan :TCL déjà Activé !"
  2303.     }
  2304.          puthelp "privmsg $::GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)gbon\0036\] \0031par : \0034$hand"
  2305. }
  2306.  
  2307.     proc gboff { nick host hand chan arg } {
  2308.     if {[channel get $chan GB] != 0} {
  2309.          channel set $chan -GB
  2310.          putquick "PRIVMSG $chan :TCL Désactivé !"
  2311.     } else {
  2312.          putquick "PRIVMSG $chan :TCL déjà Désactivé !"
  2313.     }
  2314.          puthelp "privmsg $::GB::log :\00314Commande \0036\[\0033$::GB::commande(choix)gboff\0036\] \0031par : \0034$hand"
  2315. }
  2316.    
  2317.     # Auth-List #
  2318.  
  2319.     proc authlist { nick host hand arg } {
  2320.          set chan [string tolower [lindex $arg 0]]
  2321.     if {[channel get $chan GB]==0} { return; }
  2322.     if { [nick2hand $nick] eq "*" } {
  2323.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2324.     return 0
  2325.     }
  2326.     if {![isauth $hand]} {
  2327.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2328.     return 0
  2329.     }
  2330.     if {![string match #* [lindex $arg 0]]} {
  2331.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick authlist <#salon> ) !"
  2332.     return 0
  2333.     }
  2334.     if {![validchan [lindex $arg 0]]} {
  2335.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  2336.     return 0
  2337.     }
  2338.     if { [string length $arg] ne "" } {
  2339.     if {![matchattr $hand o|o [lindex $arg 0]]} {
  2340.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2341.     return 0
  2342.     }
  2343.     foreach u [userlist] {
  2344.     if [matchattr $u o|o $chan] {
  2345.     if [isauth $u] {
  2346.          putserv "privmsg $nick :\0031\[\00314$u\0031\] \0031: \0036AUTH \0031: \0033YES"
  2347.     } else {
  2348.          putserv "privmsg $nick :\0031\[\00314$u\0031\] \0031: \0036AUTH \0031: \0034NO"
  2349.                 }
  2350.             }
  2351.         }
  2352.     }
  2353.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Auth-List\0036\] \0031par : \0034$hand"
  2354. }
  2355.          
  2356.     # Say/Me Msg #
  2357.  
  2358.     # Say #
  2359.  
  2360.     proc say { nick uhost hand text } {
  2361.          set chan [string tolower [lindex $text 0]]
  2362.     if {[channel get $chan GB]==0} { return; }
  2363.     if { [nick2hand $nick] eq "*" } {
  2364.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2365.     return 0
  2366.     }
  2367.     if {![isauth $hand]} {
  2368.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2369.     return 0
  2370.     }
  2371.     if {![string match #* [lindex $text 0]]} {
  2372.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick say <#salon> <text> ) !"
  2373.     return 0
  2374.     }
  2375.     if {![validchan [lindex $text 0]]} {
  2376.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  2377.     return 0
  2378.     }
  2379.     if {![matchattr $hand o|o $chan]} {
  2380.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2381.     return 0
  2382.     }
  2383.     if {![botonchan [lindex $text 0]]} {
  2384.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  2385.     return 0
  2386.     }
  2387.          set chann "[lindex [channels] [lsearch [string tolower [channels]] [string tolower [lindex $text 0]]]]"
  2388.          putserv "privmsg [lindex $text 0] :[join [lrange $text 1 end]]"
  2389.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Say\0036\] \0031par : \0034$hand"
  2390.     return
  2391. }
  2392.    
  2393.     # Me #
  2394.  
  2395.     proc me { nick uhost hand text } {
  2396.          set chan [string tolower [lindex $text 0]]
  2397.     if {[channel get $chan GB]==0} { return; }
  2398.     if { [nick2hand $nick] eq "*" } {
  2399.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2400.     return 0
  2401.     }
  2402.     if {![isauth $hand]} {
  2403.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
  2404.     return 0
  2405.     }
  2406.     if {![string match #* [lindex $text 0]]} {
  2407.          puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick me <#salon> <text> ) !"
  2408.     return 0
  2409.     }
  2410.     if {![validchan [lindex $text 0]]} {
  2411.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
  2412.     return 0
  2413.     }
  2414.     if {![matchattr $hand o|o $chan]} {
  2415.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
  2416.     return 0
  2417.     }
  2418.     if {![botonchan [lindex $text 0]]} {
  2419.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(nosalon)]"
  2420.     return 0
  2421.     }
  2422.          set chann "[lindex [channels] [lsearch [string tolower [channels]] [string tolower [lindex $text 0]]]]"
  2423.          putserv "privmsg [lindex $text 0] :\001ACTION [join [lrange $text 1 end]] \001"
  2424.          putserv "privmsg $GB::log :\00314Commande \0036\[\0033Me\0036\] \0031par : \0034$hand"
  2425.      return
  2426. }
  2427.    
  2428.     # Configuration d'aide en pv #
  2429.  
  2430.     proc conf { nick host hand arg } {
  2431.          set chan [string tolower [lindex $arg 0]]
  2432.     if { [nick2hand $nick] eq "*" } {
  2433.          puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
  2434.     return 0
  2435.     }
  2436.          putserv "privmsg $nick :Bonjour $nick Pour commencer veuillez taper la commande :"
  2437.          putserv "privmsg $nick :/msg $::botnick pass <unpass>"
  2438.          putserv "privmsg $nick :Ensuite pour vous authentifier veuillez taper :"
  2439.          putserv "privmsg $nick :/msg $::botnick auth $nick <votre-pass>"
  2440.          putserv "privmsg $nick :Une fois ceci fait, pour voir un aperçu de mes commandes disponibles auxquelles vous avez accès tapez :"
  2441.          putserv "privmsg $nick :/msg $::botnick help"
  2442.          putserv "privmsg $nick :Fin de l'aide."
  2443. }
  2444.        
  2445.     # Help #
  2446.  
  2447.     proc help { nick host hand arg } {
  2448.          set commande [lindex $arg 1]
  2449.          set commande [stripcodes abcu [lindex $arg 0]]
  2450.     if {$commande == ""} {
  2451.          puthelp "privmsg $nick :\00314Commande Help du Robot \002\0034$::botnick\002\0034"
  2452.     foreach c [channels] {
  2453.     if [matchattr $hand |o $c] {
  2454.          puthelp "privmsg $nick :\0031\037Level \002Opérateur\002 :\0037"
  2455.          puthelp "privmsg $nick :\00314Auth \0031: \0034Permet de vous identifier auprès du Robot Identifia en MSG !"
  2456.          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 !"
  2457.          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 !"
  2458.          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 !"
  2459.          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 !"
  2460.          puthelp "privmsg $nick :\00314Kick \0031: \0034Permet de Kick quelqu'un sur un salon défini commande Chan ou Msg !"
  2461.          puthelp "privmsg $nick :\00314Kickban \0031: \0034Permet de Kickban quelqu'un sur un salon défini commande Chan ou Msg !"
  2462.          puthelp "privmsg $nick :\00314Ban \0031: \0034Permet de Ban quelqu'un sur un salon défini commande Chan ou Msg !"
  2463.          puthelp "privmsg $nick :\00314Unban \0031: \0034Permet de Unban quelqu'un sur un salon défini commande Chan ou Msg !"
  2464.          puthelp "privmsg $nick :\00314Access \0031: \0034Permet de regarder la liste d'acces command Msg !"
  2465.          puthelp "privmsg $nick :\00314Deauth \0031: \0034Permet de vous déauthentifier auprès du Robot $::botnick commande Msg !"
  2466.          puthelp "privmsg $nick :\00314Newpass \0031: \0034Permet de changer votre mot de passe auprès du Robot $::botnick commande Msg !"
  2467.          puthelp "privmsg $nick :\00314Infoline \0031: \0034Permet de vous mettre un texte à l'entrée d'un salon commande Msg !"
  2468.          puthelp "privmsg $nick :\00314Topic \0031: \0034Permet de mettre un topic sur un salon défini commande Chan ou Msg !"
  2469.          puthelp "privmsg $nick :\00314Authlist \0031: \0034Permet de regarder qui est authentifié auprès du Robot $::botnick commande Msg !"
  2470.          puthelp "privmsg $nick :\00314Say \0031: \0034Permet d'envoyer un message sous forme de /say sur un salon défini commande Msg !"
  2471.          puthelp "privmsg $nick :\00314Me \0031: \0034Permet d'envoyer un message sous forme de /me sur un salon défini commande en Msg !"        
  2472.      break
  2473.     }
  2474. }
  2475.     foreach c [channels] {
  2476.     if [matchattr $hand |m $c] {
  2477.          puthelp "privmsg $nick :\0031\037Level \002Master\002 :\037"
  2478.          puthelp "privmsg $nick :\00314Addop \0031: \0034Permet de mettre un user Opérateur sur un salon défini commande Chan ou Msg !"
  2479.          puthelp "privmsg $nick :\00314Delop \0031: \0034Permet de retirer le level Opérateur sur un salon défini commande Chan ou Msg !"
  2480.          puthelp "privmsg $nick :\00314Clearbans \0031: \0034Permet de Clearbans tout les bans sur le salon commande Chan ou Msg !"
  2481.          puthelp "privmsg $nick :\00314Mode \0031: \0034Permet de mettre ou retirer un Mode commande Chan ou Msg !"
  2482.          puthelp "privmsg $nick :\00314Opall \0031: \0034Permet de mettre tout le monde Op commande Chan ou Msg !"
  2483.          puthelp "privmsg $nick :\00314Deopall \0031: \0034Permet de mettre tout le monde Deop commande Chan ou Msg !"
  2484.          puthelp "privmsg $nick :\00314Voiceall \0031: \0034Permet de mettre tout le monde Voice commande Chan ou Msg !"
  2485.          puthelp "privmsg $nick :\00314Devoiceall \0031: \0034Permet de mettre tout le monde Devoice commande Chan ou Msg !"         
  2486.          break
  2487.     }
  2488. }
  2489.     foreach c [channels] {
  2490.     if [matchattr $hand |n $c] {
  2491.          puthelp "privmsg $nick :\0031\037Level \002Owner\002 :\037"
  2492.          puthelp "privmsg $nick :\00314Addmaster \0031: \0034Permet de mettre un user ou un Opérateur d'un salon le level Master commande Msg !"
  2493.          puthelp "privmsg $nick :\00314Delmaster \0031: \0034Permet de retirer le level Master sur un salon défini commande Msg !"
  2494.          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 !"      
  2495.      break
  2496.     }
  2497. }
  2498.     foreach c [channels] {
  2499.     if [matchattr $hand o| $c] {
  2500.          puthelp "privmsg $nick :\0031\037Level \002SuperOp\002 :\037"
  2501.          puthelp "privmsg $nick :\00314Delowner \0031: \0034Permet de retirer le level Owner sur un salon défini commande Msg !"
  2502.          puthelp "privmsg $nick :\00314Exempt \0031: \0034Permet de mettre/retirer/regarder les pseudos protégés commande Chan !"
  2503.          puthelp "privmsg $nick :\00314Blacklist \0031: \0034Permet de mettre/retirer/regarder la Blacklist commande Chan !"
  2504.          puthelp "privmsg $nick :\00314Addsuspend \0031: \0034Permet de suspendre un accéss commande Msg !"
  2505.          puthelp "privmsg $nick :\00314Delsuspend \0031: \0034Permet de retirer un suspend commande Msg !"
  2506.          puthelp "privmsg $nick :\00314Addchan \0031: \0034Permet de rajouter un autojoin sur un salon au bot commande Msg !"
  2507.          puthelp "privmsg $nick :\00314Delchan \0031: \0034Permet de retirer un salon des autojoin au bot commande Msg !"
  2508.          puthelp "privmsg $nick :\00314Listchan \0031: \0034Permet de regarder la liste des chan en autojoin qu'il y a dans $::botnick commande Msg !"
  2509.          puthelp "privmsg $nick :\00314Addowner \0031: \0034Permet de mettre un user ou Opérateur ou un Master le level Owner commande Msg !"
  2510.          puthelp "privmsg $nick :\00314Addsuperop \0031: \0034Permet de mettre un user ou Opérateur ou Master ou Owner le level SuperOp commande Msg !"
  2511.          puthelp "privmsg $nick :\00314Delsuperop \0031: \0034Permet de retirer le level SuperOp commande Msg !"
  2512.          puthelp "privmsg $nick :\00314Gbon \0031: \0034Permet d'activer le TCL sur un salon défini commande Chan !"
  2513.          puthelp "privmsg $nick :\00314Gboff \0031: \0034Permet de désactiver le TCL sur un salon défini commande Chan !"          
  2514.      break
  2515.     }
  2516. }
  2517.          puthelp "privmsg $nick :\00314Exemple de commande à taper pour avoir de l'aide plus détaillée\00314"
  2518.          puthelp "privmsg $nick :\0034/msg $::botnick help op\0034"
  2519.          puthelp "privmsg $nick :\0031\[\0034Info\0031\] \00314Toutes les commandes sont a taper en \002\0031(Minuscules)\002"
  2520.          puthelp "privmsg $nick :\0031\037\002Fin du Help !\002"
  2521.          puthelp "privmsg $GB::log :\00314Commande \0036\[\0033Help\0036\] \0031par : \0034$hand"
  2522.     }
  2523.     switch -- $commande {
  2524. "op" {
  2525.          puthelp "privmsg $nick :\00314Commande Op Chan \0031: \0034$::GB::commande(choix)op \0031ou \0034$::GB::commande(choix)op <pseudo>"
  2526.          puthelp "privmsg $nick :\00314Commande Op Msg \0031: \0034/msg $::botnick op <#salon> \0031ou \0034/msg $::botnick op <#salon> <pseudo>"
  2527.     }
  2528. "deop" {
  2529.          puthelp "privmsg $nick :\00314Commande Deop Chan \0031: \0034$::GB::commande(choix)deop \0031ou \0034$::GB::commande(choix)deop <pseudo>"
  2530.          puthelp "privmsg $nick :\0031Commande Deop Chan \0031: \0034/msg $::botnick deop <#salon> \0031ou \0034/msg $::botnick deop <#salon> <pseudo>"
  2531.     }
  2532. "voice" {
  2533.          puthelp "privmsg $nick :\00314Commande Voice Chan \0031: \0034$::GB::commande(choix)voice \0031ou \0034$::GB::commande(choix)voice <pseudo>"
  2534.          puthelp "privmsg $nick :\00314Commande Voice Msg \0031: \0034/msg $::botnick <voice> <#salon> \0031ou \0034/msg $::botnick <voice> <#salon> <pseudo>"
  2535.     }
  2536. "devoice" {
  2537.          puthelp "privmsg $nick :\00314Commande Devoice Chan \0031: \0034$::GB::commande(choix)devoice \0031ou \0034$::GB::commande(choix)devoice <pseudo>"
  2538.          puthelp "privmsg $nick :\00314Commande Devoice Msg \0031: \0034/msg $::botnick <devoice> <#salon> \0031ou \0034/msg $::botnick devoice <#salon> <pseudo>"
  2539.     }
  2540. "kick" {
  2541.          puthelp "privmsg $nick :\00314Commande Kick Chan \0031: \0034$::GB::commande(choix)kick <pseudo> \0031ou \0034$::GB::commande(choix)kick <pseudo> <raison>"
  2542.          puthelp "privmsg $nick :\00314Commande Kick Msg \0031: \0034/msg $::botnick kick <#salon> <pseudo> \0031ou \0034/msg $::botnick kick <#salon> <pseudo> <raison>"
  2543.     }
  2544. "kickban" {
  2545.          puthelp "privmsg $nick :\00314Commande Kickban Chan \0031: \0034$::GB::commande(choix)kickban <pseudo>"
  2546.          puthelp "privmsg $nick :\00314Commande Kickban Msg \0031: \0034/msg $::botnick kickban <#salon> <pseudo>"
  2547.     }
  2548. "ban" {
  2549.          puthelp "privmsg $nick :\00314Commande Ban Chan \0031: \0034$::GB::commande(choix)ban <pseudo> \0031ou \0034$::GB::commande(choix)ban <host>"
  2550.          puthelp "privmsg $nick :\00314Commande Ban Msg \0031: \0034/msg $::botnick ban <#salon> <host>"
  2551.     }
  2552. "unban" {
  2553.          puthelp "privmsg $nick :\00314Commande Unban Chan \0031: \0034$::GB::commande(choix)unban <pseudo> \ou \0034$::GB::commande(choix)unban <host>"
  2554.          puthelp "privmsg $nick :\00314Commande Unban Msg \0031: \0034/msg $::botnick unban <#salon> <host>"
  2555.     }
  2556. "access" {
  2557.          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)"
  2558.     }
  2559. "addop" {
  2560.          puthelp "privmsg $nick :\00314Commande Addop Msg \0031: \0034/msg $::botnick addop <pseudo> <#salon>"
  2561.     }
  2562. "addmaster" {
  2563.          puthelp "privmsg $nick :\00314Commande Addmaster Msg \0031: \0034/msg $::botnick addmaster <pseudo> <#salon>"
  2564.     }
  2565. "addowner" {
  2566.          puthelp "privmsg $nick :\00314Commande Addowner Msg \0031: \0034/msg $::botnick addowner <pseudo> <#salon>"
  2567.     }
  2568. "delop" {
  2569.          puthelp "privmsg $nick :\00314Commande Delop Msg \0031: \0034 /msg $::botnick delop <pseudo> <#salon>"
  2570.     }
  2571. "delmaster" {
  2572.          puthelp "privmsg $nick :\00314Commande Delmaster Msg \0031: \0034/msg $::botnick delmaster <pseudo> <#salon>"
  2573.     }
  2574. "delowner" {
  2575.          puthelp "privmsg $nick :\00314Commande Delowner Msg \0031: \0034/msg $::botnick delowner <pseudo> <#salon>"
  2576.     }
  2577. "clearbans" {
  2578.          puthelp "privmsg $nick :\00314Commande Clearbans Chan \0031: \0034$::GB::commande(choix)clearbans"
  2579.          puthelp "privmsg $nick :\00314Commande Clearbans Msg \0031: \0034/msg $::botnick clearbans <#salon>"
  2580.     }
  2581. "mode" {
  2582.          puthelp "privmsg $nick :\00314Commande Mode Chan \0031: \0034$::GB::commande(choix)mode <le-mode>"
  2583.          puthelp "privmsg $nick :\00314Commande Mode Msg \0031: \0034/msg $::botnick mode <#salon> <mode>"
  2584.     }
  2585. "blacklist" {
  2586.          puthelp "privmsg $nick :\00314Commande Blacklist Chan \0031: \0034$::GB::commande(choix)blacklist"
  2587.          puthelp "privmsg $nick :\00314Commande Blacklist Chan \0031: \0034$::GB::commande(choix)+blacklist <pseudo>"
  2588.          puthelp "privmsg $nick :\00314Commande Blacklist Chan \0031: \0034$::GB::commande(choix)-blacklist <pseudo>"
  2589.     }
  2590. "exempt" {
  2591.          puthelp "privmsg $nick :\00314Commande Exempt Chan \0031: \0034$::GB::commande(choix)exempt"
  2592.          puthelp "privmsg $nick :\00314Commande Exempt Chan \0031: \0034$::GB::commande(choix)+exempt <pseudo>"
  2593.          puthelp "privmsg $nick :\00314Commande Exempt Chan \0031: \0034$::GB::commande(choix)-exempt <pseudo>"
  2594.     }
  2595. "newpass" {
  2596.          puthelp "privmsg $nick :\00314Commande Newpass Msg \0031: \0034/msg $::botnick newpass <ancien-pass> <nouveau-pass>"
  2597.     }
  2598. "opall" {
  2599.          puthelp "privmsg $nick :\00314Commande Opall Chan \0031: \0034$::GB::commande(choix)opall"
  2600.          puthelp "privmsg $nick :\00314Commande Opall Msg \0031: \0034/msg $::botnick opall <#salon>"
  2601.     }
  2602. "deopall" {
  2603.          puthelp "privmsg $nick :\00314Commande Deopall Chan \0031: \0034$::GB::commande(choix)deopall"
  2604.          puthelp "privmsg $nick :\00314Commande Deopall Msg \0031: \0034/msg $::botnick deopall <#salon>"
  2605.     }
  2606. "voiceall" {
  2607.          puthelp "privmsg $nick :\00314Commande Voiceall Chan \0031: \0034$::GB::commande(choix)voiceall"
  2608.          puthelp "privmsg $nick :\00314Commande Voiceall Msg \0031: \0034/msg $::botnick voiceall <#salon>"
  2609.     }
  2610. "devoiceall" {
  2611.          puthelp "privmsg $nick :\00314Commande Devoiceall Chan \0031: \0034$::GB::commande(choix)devoiceall"
  2612.          puthelp "privmsg $nick :\00314Commande Devoiceall Msg \0031: \0034/msg $::botnick devoiceall <#salon>"
  2613.     }
  2614. "addsuspend" {
  2615.          puthelp "privmsg $nick :\00314Commande Addsuspend Msg \0031: \0034/msg $::botnick addsuspend <pseudo>"
  2616.     }
  2617. "delsuspend" {
  2618.          puthelp "privmsg $nick :\00314Commande Delsuspend Msg \0031: \0034/msg $::botnick delsuspend <pseudo>"
  2619.     }
  2620. "addchan" {
  2621.          puthelp "privmsg $nick :\00314Commande Addchan Msg \0031: \0034/msg $::botnick addchan <#salon>"
  2622.     }
  2623. "delchan" {
  2624.          puthelp "privmsg $nick :\00314Commande Delchan Msg \0031: \0034/msg $::botnick delchan <#salon>"
  2625.     }
  2626. "listchan" {
  2627.          puthelp "privmsg $nick :\00314Commande Listchan Msg \0031: \0034/msg $::botnick listchan"
  2628.     }
  2629. "addsuperop" {
  2630.          puthelp "privmsg $nick :\00314Commande Addsuperop Msg \0031: \0034/msg $::botnick addsuperop <pseudo>"
  2631.     }
  2632. "delsuperop" {
  2633.          puthelp "privmsg $nick :\00314Commande Delsuperop Msg \0031: \0034/msg $::botnick delsuperop <pseudo>"
  2634.     }
  2635. "infoline" {
  2636.          puthelp "privmsg $nick :\00314Commande Infoline Msg \0031: \0034/msg $::botnick infoline <#salon> <text>"
  2637.     }
  2638. "amsg" {
  2639.          puthelp "privmsg $nick :\00314Commande Amsg Chan \0031: \0034$::GB::commande(choix)amsg <phrase>"
  2640.     }
  2641. "topic" {
  2642.          puthelp "privmsg $nick :\00314Commande Topic Chan \0031: \0034$::GB::commande(choix)topic <phrase>"
  2643.          puthelp "privmsg $nick :\00314Commande Topic Msg \0031: \0034/msg $::botnick topic <#salon> <text>"
  2644.     }
  2645. "authlist" {
  2646.          puthelp "privmsg $nick :\00314Commande Authlist Msg \0031: \0034/msg $::botnick authlist <#salon>"
  2647.     }
  2648. "gbon" {
  2649.          puthelp "privmsg $nick :\00314Commande Gbon Chan \0031: \0034$::GB::commande(choix)gbon"
  2650.     }
  2651. "gboff" {
  2652.          puthelp "privmsg $nick :\00314Commande Gboff Chan \0031: \0034$::GB::commande(choix)gboff"
  2653.     }
  2654. "say" {
  2655.          puthelp "privmsg $nick :\00314Commande Say Msg \0031: \0034/msg $::botnick say <#salon> <text>"
  2656.          
  2657.     }
  2658. "me" {
  2659.          puthelp "privmsg $nick :\00314Commande Me Msg \0031: \0034/msg $::botnick me <#salon> <text>"
  2660.         }
  2661.     }
  2662.     return
  2663. }
  2664.  
  2665. # Désallocation du TCL #
  2666.  
  2667. variable script_name "Gestion.Bot V2.0 Final"
  2668.  
  2669. if {[info commands ::GB::uninstall] eq "::GB::uninstall"} { ::GB::uninstall }
  2670.  
  2671.     proc uninstall {args} {
  2672.          putlog "Désallocation des ressources de \002$::GB::script_name\002..."
  2673.     foreach binding [lsearch -inline -all -regexp [binds *[set GB [string range [namespace current] 2 end]]*] " \{?(::)?$GB"] {
  2674.          unbind [lindex $binding 0] [lindex $binding 1] [lindex $binding 2] [lindex $binding 4]
  2675.     }
  2676.         namespace delete [namespace current]
  2677. }
  2678.  
  2679. if {$CGU!="oui"} {
  2680.     putlog "Conditions Général Non accepter veuillez les accepters sinon n'utiliser pas le TCL."
  2681.     die "Condition Général Non Accepter"
  2682. }
  2683.    
  2684.     # Package Requis #
  2685.  
  2686.     if {[catch {package require Tcl 8.5}]} {
  2687.          putlog "\002Gestion.Bot\002 : Vous avez besoin de Tcl en version 8.5 au moins pour pouvoir utiliser ce script."
  2688.     return
  2689. }
  2690.    
  2691.     # Binds #
  2692.  
  2693. bind pub o "$::GB::commande(choix)+blacklist" [namespace current]::+blacklist
  2694. bind pub o "$::GB::commande(choix)-blacklist" [namespace current]::-blacklist
  2695. bind pub o "$::GB::commande(choix)blacklist" [namespace current]::.blacklist
  2696. bind pub o "$::GB::commande(choix)+exempt" [namespace current]::+exempt
  2697. bind pub o "$::GB::commande(choix)-exempt" [namespace current]::-exempt
  2698. bind pub o "$::GB::commande(choix)exempt" [namespace current]::.exempt
  2699. bind pub - "$::GB::commande(choix)op" [namespace current]::op
  2700. bind pub - "$::GB::commande(choix)deop" [namespace current]::deop
  2701. bind pub - "$::GB::commande(choix)voice" [namespace current]::voice
  2702. bind pub - "$::GB::commande(choix)devoice" [namespace current]::devoice
  2703. bind pub - "$::GB::commande(choix)opall" [namespace current]::opall
  2704. bind pub - "$::GB::commande(choix)deopall" [namespace current]::deopall
  2705. bind pub - "$::GB::commande(choix)voiceall" [namespace current]::voiceall
  2706. bind pub - "$::GB::commande(choix)devoiceall" [namespace current]::devoiceall
  2707. bind pub - "$::GB::commande(choix)ban" [namespace current]::ban
  2708. bind pub - "$::GB::commande(choix)kick" [namespace current]::kick
  2709. bind pub - "$::GB::commande(choix)unban" [namespace current]::unban
  2710. bind pub - "$::GB::commande(choix)kickban" [namespace current]::kickban
  2711. bind pub - "$::GB::commande(choix)clearbans" [namespace current]::clearbans
  2712. bind pub - "$::GB::commande(choix)mode" [namespace current]::mode
  2713. bind pub - "$::GB::commande(choix)topic" [namespace current]::topic
  2714. bind pub - "$::GB::commande(choix)amsg" [namespace current]::amsg
  2715. bind pub o "$::GB::commande(choix)gbon" [namespace current]::gbon
  2716. bind pub o "$::GB::commande(choix)gboff" [namespace current]::gboff
  2717. bind msg - "auth" [namespace current]::auth
  2718. bind msg - "deauth" [namespace current]::deauth
  2719. bind msg - "addsuspend" [namespace current]::addsuspend
  2720. bind msg - "delsuspend" [namespace current]::delsuspend
  2721. bind msg - "addchan" [namespace current]::addchan
  2722. bind msg - "delchan" [namespace current]::delchan
  2723. bind msg - "listchan" [namespace current]::listchan
  2724. bind msg - "access" [namespace current]::access
  2725. bind msg - "newpass" [namespace current]::newpass
  2726. bind msg - "addop" [namespace current]::addop
  2727. bind msg - "addmaster" [namespace current]::addmaster
  2728. bind msg - "addowner" [namespace current]::addowner
  2729. bind msg - "addsuperop" [namespace current]::addsuperop
  2730. bind msg - "delop" [namespace current]::delop
  2731. bind msg - "delmaster" [namespace current]::delmaster
  2732. bind msg - "delowner" [namespace current]::delowner
  2733. bind msg - "delsuperop" [namespace current]::delsuperop
  2734. bind msg - "op" [namespace current]::xop
  2735. bind msg - "deop" [namespace current]::xdeop
  2736. bind msg - "voice" [namespace current]::xvoice
  2737. bind msg - "devoice" [namespace current]::xdevoice
  2738. bind msg - "ban" [namespace current]::xban
  2739. bind msg - "kick" [namespace current]::xkick
  2740. bind msg - "unban" [namespace current]::xunban
  2741. bind msg - "kickban" [namespace current]::xkickban
  2742. bind msg - "clearbans" [namespace current]::xclearbans
  2743. bind msg - "mode" [namespace current]::xmode
  2744. bind msg - "infoline" [namespace current]::infoline
  2745. bind msg - "help" [namespace current]::help
  2746. bind msg - "authlist" [namespace current]::authlist
  2747. bind msg - "topic" [namespace current]::xtopic
  2748. bind msg - "opall" [namespace current]::xopall
  2749. bind msg - "deopall" [namespace current]::xdeopall
  2750. bind msg - "voiceall" [namespace current]::xvoiceall
  2751. bind msg - "devoiceall" [namespace current]::xdevoiceall
  2752. bind msg - "say" [namespace current]::say
  2753. bind msg - "me" [namespace current]::me
  2754. bind msg - "conf" [namespace current]::conf
  2755. bind chon - * [namespace current]::opco
  2756. bind chof - * [namespace current]::opdeco
  2757. bind part o|o "*" [namespace current]::partdeauth
  2758. bind sign o|o "*" [namespace current]::quitdeauth
  2759. bind join - "$::GB::log *" [namespace current]::joindeauth
  2760. bind join - "*" [namespace current]::xbl
  2761. bind notc - * [namespace current]::nonotice_chanoff
  2762. bind join - "*" [namespace current]::greet
  2763. bind evnt -|- prerehash ::GB::uninstall
  2764.  
  2765. putlog "\002$::GB::script_name chargé.\002 alias_angelius 2011©"
  2766. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement