Mise en forme de code: pensez à utiliser les balises [ tcl ] et [ /tcl ] (sans les espaces bien sûr) autour de vos codes tcl afin d'avoir un meilleur rendu et une coloration syntaxique.
x
############################################################### Modération help. ## Code TCL pour la liste des commandes du TCL moderation.tcl ## ###############################################################namespaceeval ::mod.help {binddcc o|o "xhelp"[namespace current]::dcc:mod
procdcc:mod {handidx arg }{putdcc$idx"\00314Commandes Help du TCL de \002\0034Modération\0034\0031 :\0031\002"putdcc$idx""putdcc$idx"\037Gestion des chans à modérer\037 :"putdcc$idx"\002.modchan\002 \00314(Permet de lister les chans modérés)\00314"putdcc$idx"\002.+modchan\002 <#chan> \00314(Permet d'ajouter un chan à modérer)\00314"putdcc$idx"\002.-modchan\002 <#chan> \00314(Permet de supprimer un chan à modérer)\00314"putdcc$idx""putdcc$idx"\037Gestion des mots interdit\037 :"putdcc$idx"\002.modmot\002 \00314(Permet de lister les mots interdits)\00314"putdcc$idx"\002.+modmot\002 <mot> \00314(Permet d'ajouter un mot interdit)\00314"putdcc$idx"\002.-modmot\002 <mot> \00314(Permet de supprimer un mot interdit)\00314"putdcc$idx""putdcc$idx"\037Gestion des spams interdit\037 :"putdcc$idx"\002.modspam\002 \00314(Permet de lister les spams interdits)\00314"putdcc$idx"\002.+modspam\002 <spam> \00314(Permet d'ajouter un spam interdit)\00314"putdcc$idx"\002.-modspam\002 <spam> \00314(Permet de supprimer un spam interdit)\00314"putdcc$idx""putdcc$idx"\037Gestion des nicks interdit\037 :"putdcc$idx"\002.modnick\002 \00314(Permet de lister les nicks interdits)\00314"putdcc$idx"\002.+modnick\002 <nick> \00314(Permet d'ajouter un nick interdit)\00314"putdcc$idx"\002.-modnick\002 <nick> \00314(Permet de supprimer un nick interdit)\00314"putdcc$idx""putdcc$idx"\037Gestion de la blacklist\037 :"putdcc$idx"\002.blacklist\002 \00314(Permet de lister la blacklist)\00314"putdcc$idx"\002.+blacklist\002 <host> \00314(Permet d'ajouter un host à la blacklist)\00314"putdcc$idx"\002.-blacklist\002 <host> \00314(Permet de supprimer un host à la blacklist)\00314"putdcc$idx""putdcc$idx"\037Gestion des xtrusts (si Anticlones installé)\037 :"putdcc$idx"\002.xtrust\002 \00314(Permet de lister les hosts protégés (exemptés)\00314"putdcc$idx"\002.+xtrust\002 <host> \00314(Permet d'ajouter un host à exempter)\00314"putdcc$idx"\002.-xtrust\002 <host> \00314(Permet de supprimer un host exempté)\00314"putdcc$idx""putdcc$idx"\037Gestion de la protection contre la modération\037 :"putdcc$idx"\002.protect\002 \00314(Permet de lister les hosts protégés)\00314"putdcc$idx"\002.+protect\002 <host> \00314(Permet d'ajouter un host protégé)\00314"putdcc$idx"\002.-protect\002 <host> \00314(Permet de supprimer un host protégé)\00314"putdcc$idx""putdcc$idx"\002Fin de la liste des commandes du tcl de modération.\002"}bindpub o|o "!aide"[namespace current]::pub:aide
procpub:aide {nick host hand chan arg }{puthelp"privmsg $nick :\00300,2_______________\002Moderation - Aide\002_______________\00300,2"puthelp"privmsg $nick :"puthelp"privmsg $nick :\037\00300,2Gestion de la protection\037\00300,2"puthelp"privmsg $nick :\0035 .protectlist\0035 (\0034Permet de lister les hosts protégés\0034)- \0033Protection contre toute cette modération\0033"puthelp"privmsg $nick :\0035.+protect\0035 <\0034host/pseudo*!*@*\0034> \0033(Permet d'ajouter un host/pseudo protégé)\0033"puthelp"privmsg $nick :\0035.-protect\0035 <\0034host/pseudo*!*@*\0034> \0033(Permet de supprimer un host/pseudo protégé)\0033"puthelp"privmsg $nick :"puthelp"privmsg $nick :\037\00300,2Gestion des mots interdits\037\00300,2"puthelp"privmsg $nick :\0035.badmotlist\0035 (\0033Permet de lister les mots interdits\0033)"puthelp"privmsg $nick :\0035.+badmot\0035 <\0034mot\0034> (\0033Permet d'ajouter un mot interdit\0033)"puthelp"privmsg $nick :\0035.-badmot\0035 <\0034mot\0034> (\0033Permet de supprimer un mot interdit\0033)"puthelp"privmsg $nick :"puthelp"privmsg $nick :\037\00300,2Gestion des Spams interdits\037\00300,2"puthelp"privmsg $nick :\0035.spamlist\0035 (\0033Permet de lister les spams\0033)"puthelp"privmsg $nick :\0035.+spam\0035 <\0034spam\0034> (\0033Permet d'ajouter un spam\0033)"puthelp"privmsg $nick :\0035.-spam\0035 <\0034spam\0034> (\0033Permet de supprimer un spam\0033)"puthelp"privmsg $nick :"puthelp"privmsg $nick :\037\00300,2Gestion des nicks interdits\037\00300,2"puthelp"privmsg $nick :\0035.badnicklist\0035 (\0033Permet de lister les nicks interdits\0033)"puthelp"privmsg $nick :\0035.+badnick\0035 <\0034nick\0034> (\0033Permet d'ajouter un nick interdit\0033)"puthelp"privmsg $nick :\0035.-badnick\0035 <\0034nick\0034> (\0033Permet de supprimer un nick interdit\0033)"puthelp"privmsg $nick :"puthelp"privmsg $nick :\037\00300,2Gestion de la Blacklist\037\00300,2"puthelp"privmsg $nick :\0035.bavlist\0035 (\0033Permet de lister la blacklist\0033)"puthelp"privmsg $nick :\0035.+bav\0035 <\0034host/pseudo*!*@*\0034> (\0033Permet d'ajouter un host/pseudo*!*@* à la blacklist\0033)"puthelp"privmsg $nick :\0035.-bav\0035 <\0034host/pseudo*!*@*\0034> (\0033Permet de supprimer un host/pseudo*!*@* à la blacklist\0033)"puthelp"privmsg $nick :\037\00300,2Gestion des xtrusts\037\00300,2"puthelp"privmsg $nick :\0035.xtrust\0035 (\0033Permet de lister les hosts protégés exemptés\0033)"puthelp"privmsg $nick :\0035.+xtrust\0035 <\0034host\0034> (\0033Permet d'ajouter un host à exempter\0033)"puthelp"privmsg $nick :\0035.-xtrust\0035 <\0034host\0034> (\0033Permet de supprimer un host exempté\0033)"puthelp"privmsg $nick :"puthelp"privmsg $nick :\037\00300,2Gestion des Salons à Modérer\037\00300,2"puthelp"privmsg $nick :\0034Level Admin Bot\0034"puthelp"privmsg $nick :\0035.listchan\0035 (\0033Permet de lister les chans modérés\0033)"puthelp"privmsg $nick :\0035.+chan\0035 <\0034#chan\0034> (\0033Permet d'ajouter un chan à modérer\0033)"puthelp"privmsg $nick :\0035.-chan\0035 <\0034#chan\0034> (\0033Permet de supprimer un chan à modérer\0033)"puthelp"privmsg $nick :\0034Level Admin Bot\0034"puthelp"privmsg $nick :"puthelp"privmsg $nick :\00300,2_______________\002Fin - Aide\002_______________\00300,2"}}
J'ai oublié et aussi pas eut la fois de modifié pour le rajouter
Vous interdisez les erreurs, vous empêchez ainsi la victoire.
Tcl error in file 'eggdrop.conf':
can't define "fichier(modchan)": name refers to an element in an array
while executing
"variable fichier(modchan) "modchan.chan""
(in namespace eval "::mod" script line 60)
invoked from within
"namespace eval ::mod {
# Nous vérifions si ya le package requis pour le msgcat.
package require msgcat
# Nous mettons la langue de m..."
(file "scripts/Moderation.tcl" line 12)
invoked from within
"source scripts/Moderation.tcl"
(file "eggdrop.conf" line 111)
* FICHIER DE CONFIGURATION NON CHARGE (INTROUVABLE OU ERREUR)
26/06/2021, 00:24 (This post was last modified: 26/06/2021, 00:25 by aliasangelius.)
Salut,
Je te file une légère modification tu me dit ce que sa donne. Pour la partie msgcat normalement c'est dans la librairie tcl8.5
tcl
##################################################################################################################### Moderation.tcl ## ## Script TCL de modération, fonctionnalité du code : ## Anti-Majuscules, Anti-Répétition, Mode-Language, Mode-Spam, Anti-MassFlood, Anti-MassJoin, Mode-Nick, Blacklist. ## Mode Vip Automatique ## ## Ce code et de base de Platine, version débug et modifié en Namespace avec des rajouts de commandes etc. ## #####################################################################################################################namespaceeval ::mod{# Nous vérifions si ya le package requis pour le msgcat.package require msgcat# Nous mettons la langue de msgcat en français
::msgcat::mclocale fr
# Les messages msgcat.
::msgcat::mcset fr AvertMaj "Doucement sur les majuscules !"
::msgcat::mcset fr KickMaj "Si tu veux crier tu vas dehors !"
::msgcat::mcset fr AvertRep "N'abuse pas des répétitions !"
::msgcat::mcset fr KickRep "Tu n'as pas besoin de te répéter autant de fois !"
::msgcat::mcset fr AvertLan "Fais attention à ton langage ! Si tu continues tu te feras expulser !"
::msgcat::mcset fr KickLan "Reviens nous voir dans 10 minutes en espérant que tu auras changer de langage !"
::msgcat::mcset fr AvertSpam "Si tu veux envoyé un lien c'est en Pv et pas en salon !"
::msgcat::mcset fr KickSpam "Va faire ta pub ailleurs !"
::msgcat::mcset fr KickNick "Veuillez modifier votre pseudo car celui-ci est incorrect !"
::msgcat::mcset fr KickBlack "\02\[\002Systeme B.A.V\02]\002 Indésirable!!"
::msgcat::mcset fr KickNoti "Pas de Notice Salon !"
::msgcat::mcset fr KickNic "Veuillez modifier votre pseudo car celui-ci est incorrect !"# Les limitations/Nombres# Expiration de la detection pour les majuscules (en seconde) ?set expiration(majuscule)"60"# Nombre de majuscule à détecter ?set detect(majuscule)"25"# Combien d'avertissement avant le kick ?set avert(majuscule)"1"# Expiration de la detection pour les repetitions (en seconde) ?set expiration(repetition)"60"# Nombre de repetition à détecter ?set detect(repetition)"6"# Combien d'avertissement avant le kick ?set avert(repetition)"1"# Expiration de la detection pour le langage (en seconde) ?set expiration(mot)"600"# Combien d'avertissement avant le kickban ?set avert(mot)"3"# Expiration de la detection pour le spam (en seconde) ?set expiration(spam)"600"# Combien d'avertissement avant le kickban ?set avert(spam)"1"# Nombre de message lors d'une détection mass/floodset mass(flood)"15"# Temp de rehash pour la remise à 0 du mass/flood (en seconde)set mass(rehashflood)"1"# Temp pour le retrait du +m (en minute)set mass(retraitm)"2"# Nombre de join lors d'une détection mass/joinset mass(join)"10"# Temp de rehash pour la remise à 0 du mass/join (en seconde)set mass(rehashjoin)"1"# Temp pour le retrait du +i (en minute)set mass(retraiti)"2"# Salon de logset salonm "#Back-Eggdrop"########################### création des fichiers. ###########################set fichier(modchan)"modchan.chan"set fichier(modmot)"modmot.mot"set fichier(modspam)"modspam.spam"set fichier(modnick)"modnick.nick"set fichier(protect)"protect.protect"set fichier(blacklist)"blacklist.black"set fichiers [list$::mod::fichier(modchan)$::mod::fichier(modmot)$::mod::fichier(modspam)$::mod::fichier(modnick)$::mod::fichier(protect)$::mod::fichier(blacklist)]foreach txt $fichiers{if{![file exists $txt]}{setload[open$txt w+]close$loadputlog"\2Je créer le(s) fichier(s) $fichiers\2"}}#################### Les procédures. ####################bindpubm - "*"[namespace current]::moderationproc moderation {nick host handle channel arg }{set arg [split$arg]setmsg[join[lrange[split$arg]0 end]]set hostv $nick!$hostset userhost [getchanhost$nick]set userhost "*!*[string range $userhost [string first @ $userhost] e]"regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007}$msg""msgregsub -all -- {\{|\}|\\{|[}{|]}}$msg""msgif{![verify:b $::mod::fichier(modchan)$channel]}{return}if{[verify:a $::mod::fichier(protect)$hostv]}{return}if{![info exists modmajuscule($host)]}{set modmajuscule($host)0utimer$::mod::expiration(majuscule)[list unset modmajuscule($host)]}set nombre 0foreach x [split$msg{}]{if[string match \[A-Z\]$x]{incr nombre
}}if{$nombre>$::mod::detect(majuscule)}{incr modmajuscule($host)1if{$::mod::avert(majuscule)<$modmajuscule($host)}{putnow"kick $channel $nick :[::msgcat::mc KickMaj]"set modmajuscule($host)0return}putserv"NOTICE $nick :[::msgcat::mc AvertMaj]"}if{[info exists rpt($nick)]}{if{[lrange$rpt($nick)2 end] eq "$msg"}{set cnt [lindex$rpt($nick)1]incr cnt
set rpt($nick)"[lindex $rpt($nick) 0] $cnt [lrange $rpt($nick) 2 end]"if{[lindex$rpt($nick)1]>$::mod::detect(repetition)}{if{![info exists modrepetition($host)]}{set modrepetition($host)0utimer$::mod::expiration(repetition)[list unset modrepetition($host)]}incr modrepetition($host)1if{$::mod::avert(repetition)<$modrepetition($host)}{putnow"kick $channel $nick :[::msgcat::mc KickRep]"set modrepetition($host)0return}putserv"NOTICE $nick :[::msgcat::mc AvertRep]"
unset rpt($nick)}}else{set rpt($nick)"[expr [clock seconds] + 10] 1 $msg"}}else{set rpt($nick)"[expr [clock seconds] + 10] 1 $msg"}if{[verify:a $::mod::fichier(modmot)$msg]}{if{![info exists modmot($host)]}{set modmot($host)0utimer$::mod::expiration(mot)[list unset modmot($host)]}incr modmot($host)1if{$::mod::avert(mot)<$modmot($host)}{putnow"mode $channel +b $userhost"putquick"kick $channel $nick :[msgcat::mc KickLan]"set modmot($host)0return}putserv"NOTICE $nick :[::msgcat::mc AvertLan]"}if{[verify:a $::mod::fichier(modspam)$msg]}{if{![info exists modspam($host)]}{set modspam($host)0utimer$::mod::expiration(spam)[list unset modspam($host)]}incr modspam($host)1if{$::avert(spam)<$modspam($host)}{putnow"mode $channel +b $userhost"putquick"kick $channel $nick :[::mdscat::mc KickSpam]"set modspam($host)0return}putserv"NOTICE $nick :[::msgcat::mc AvertSpam]"}}bindpubm - "*"[namespace current]::massfloodproc massflood {nick uhost handle chan arg }{set hostv $nick!$uhostif{[verify:a $::mod::fichier(protect)$hostv]}{return}if{![verify:b $::mod::fichier(modchan)$chan]}{return}if{![info exists massflood($chan)]}{set massflood($chan)0utimer$::mod::mass(rehashflood)[list unset $massflood($chan)]incr$massflood($chan)1if{$massflood($chan) eq "$::mod::mass(flood)"}{putserv"mode $chan +m"timer$::mass(retraitm)[listputserv"mode $chan -m"]}}}bindjoin - "*"[namespace current]::massjoinproc massjoin {nick host hand chan}{set hostv $nick!$hostif{[verify:a $::mod::fichier(protect)$hostv]}{return}if{![verify:b $::mod::fichier(modchan)$chan]}{return}if{![info exists massjoin($chan)]}{set massjoin($chan)0utimer$::mod::mass(rehashjoin)[list unset massjoin($chan)]}incr massjoin($chan)1if{$::massjoin($chan) eq "$::massjoin($chan)"}{putserv"mode $chan +i"timer$::mass(retraitm)[listputserv"mode $chan -i"]}}bindnotc - "*"[namespace current]::noticechanproc noticechan {nick host handle text chan}{set hostv $nick!$hostif{[verify:a $::mod::fichier(protect)$hostv]}{return}if{![verify:b $::mod::fichier(modchan)$chan]}{return}putnow"mode $chan +b $userhost"putquick"kick $chan $nick :[::msgcat::mc KickNoti]"}binddcc m "+modspam"[namespace current]::+modspam
proc +modspam {handidx arg}{set spam [lindex$arg0]if{$spam eq ""}{putdcc$idx"\002Erreur :\002 .+modspam <spam>"putdcc$idx"\002Exemple :\002 .+modspam *.*.com*"return}if{[verify:b $::mod::fichier(modspam)$spam]}{putdcc$idx"\002Erreur :\002 $spam est déjà enregistré."return}putdcc$idx"\002+modspam :\002 $spam a été mis dans la liste."
ajouter:donnee $::mod::fichier(modspam)$spam}binddcc n "-modspam"[namespace current]::-modspam
proc -modspam {handidx arg}{set spam [lindex$arg0]if{$spam eq ""}{putdcc$idx"\002Erreur :\002 .-modspam <spam>"return}if{![verify:b $::mod::fichier(modspam)$spam]}{putdcc$idx"\002Erreur :\002 Le spam $spam n'est pas enregistré."return}putdcc$idx"\002-modspam :\002 $spam n'est plus enregistré."
effacer:donnee $::mod::fichier(modspam)$spam}binddcc m "modspam"[namespace current]::modspamproc modspam {handidx arg}{putdcc$idx"---\002 LISTE DES SPAMS \002---"
liste:donnee $idx$::mod::fichier(modspam)}bindpub o|o ".+spam"[namespace current]::+spam
proc +spam {nick uhost handle chan text}{set motspam [lindex$text0]if{$motspam eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .+spam <mot spam>"putserv"PRIVMSG $chan :\002Exemple :\002 .+spam msn.com"return}if{[verify:b $::mod::fichier(modspam)$motspam]}{putserv"PRIVMSG $chan :\002Erreur :\002 $motspam est déjà enregistré."return}putserv"PRIVMSG $chan :\02\[\002Système AntiSpam\02]\002 \02$motspam \002a été ajouté à la liste."
ajouter:donnee $::mod::fichier(modspam)$motspam}bindpub o|o ".-spam"[namespace current]::-spam
proc -spam {nick uhost handle chan text}{set motspam [lindex$text0]if{$motspam eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .-spam <motspam>"return}if{![verify:b $::mod::fichier(modspam)$motspam]}{putserv"PRIVMSG $chan :\002Erreur :\02$motspam \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Système AntiSpam\02]\002 \02$motspam \002 est supprimé de la liste."
effacer:donnee $::mod::fichier(modspam)$motspam}bindpub o|o ".spamlist"[namespace current]::pub:spamlist
procpub:spamlist {nick uhost hand chan args}{set fp [open$::mod::fichier(modspam)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"PRIVMSG $nick :PRIVMSG $nick :\0032Liste des Spams\0032"putserv"PRIVMSG $nick :\0034 $fc - $data \0034"}
unset data
}close$fpputserv"PRIVMSG $nick :\0032Fin de liste\0032"}binddcc n "+modchan"[namespace current]::+modchan
proc +modchan {handidx arg}{set chan [lindex$arg0]if{$chan eq ""||[string index $chan0] ne "#"}{putdcc$idx"\002Erreur :\002 .+modchan <#chan>"return}if{[verify:b $::mod::fichier(modchan)$chan]}{putdcc$idx"\002Erreur :\002 $chan est déjà modérer."return}putdcc$idx"\002+modchan :\002 $chan a été mis dans la liste."
ajouter:donnee $::mod::fichier(modchan)$chan}binddcc n "-modchan"[namespace current]::-modchan
proc -modchan {handidx arg}{set chan [lindex$arg0]if{$chan eq ""||[string index $chan0] ne "#"}{putdcc$idx"\002Erreur :\002 .-modchan <#chan>"return}if{![verify:b $::mod::fichier(modchan)$chan]}{putdcc$idx"\002Erreur :\002 Le chan $chan n'est pas modérer."return}putdcc$idx"\002-modchan :\002 $chan n'est plus modéré."
effacer:donnee $::mod::fichier(modchan)$chan}binddcc n "modchan"[namespace current]::modchanproc modchan {handidx arg}{putdcc$idx"---\002 Liste des chans modérer \002---"
liste:donnee $idx$::mod::fichier(modchan)}bindpub o|o ".+chan"[namespace current]::+chan
proc +chan {nick uhost handle chan text}{set moderechan [lindex$text0]if{$moderechan eq "" ||[string index $chan0] ne "#"}{putserv"PRIVMSG $chan :\002Erreur :\002 .+chan <#Salon>"putserv"PRIVMSG $chan :\002Exemple :\002 .+chan #Radio"return}if{[verify:b $::mod::fichier(modchan)$moderechan]}{putserv"PRIVMSG $chan :\002Erreur :\002 $moderechan est déjà enregistré."return}putserv"PRIVMSG $chan :\02\[\002Moderation Salon\02]\002 \02$moderechan \002a été ajouté à la liste."
ajouter:donnee $::mod::fichier(modchan)$moderechan}bindpub o|o ".-chan"[namespace current]::-chan
proc -chan {nick uhost handle chan text}{set moderechan [lindex$text0]if{$moderechan eq "" ||[string index $chan0] ne "#"}{putserv"PRIVMSG $chan :\002Erreur :\002 .-chan <#Salon>"return}if{![verify:b $::mod::fichier(modchan)$moderechan]}{putserv"PRIVMSG $chan :\002Erreur :\02$moderechan \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Moderation Salon\02]\002 \02$moderechan \002 est supprimé de la liste."
effacer:donnee $::mod::fichier(modchan)$moderechan}bindpub o|o ".listchan"[namespace current]::pub:listchan
procpub:listchan {nick uhost hand chan args}{set fp [open$::mod::fichier(modchan)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"PRIVMSG $nick :\0032Liste des Salons\0032"putserv"PRIVMSG $nick :\0034 $fc - $data \0034"}
unset data
}close$fpputserv"PRIVMSG $nick :\0032Fin de liste\0032"}binddcc n "+modmot"[namespace current]::+modmot
proc +modmot {handidx arg}{set mot [lindex$arg0]if{$mot eq ""}{putdcc$idx"\002Erreur :\002 .+modmot <mot>"return}if{[verify:b $::mod::fichier(modmot)$mot]}{putdcc$idx"\002Erreur :\002 $mot est déjà enregistré."return}putdcc$idx"\002+modmot :\002 $mot a été mis dans la liste."
ajouter:donnee $::mod::fichier(modmot)$mot}binddcc n "-modmot"[namespace current]::-modmot
proc -modmot {handidx arg}{set mot [lindex$arg0]if{$mot eq ""}{putdcc$idx"\002Erreur :\002 .-modmot <mot>"return}if{![verify:b $::mod::fichier(modmot)$mot]}{putdcc$idx"\002Erreur :\002 Le mot $mot n'est pas enregistré."return}putdcc$idx"\002-modmot :\002 $mot n'est plus enregistré."
effacer:donnee $::mod::fichier(modmot)$mot}binddcc n "modmot"[namespace current]::modmotproc modmot {handidx arg}{putdcc$idx"---\002 Liste des mots interdit \002---"
liste:donnee $idx$::mod::fichier(modmot)}bindpub o|o ".+badmot"[namespace current]::+badmot
proc +badmot {nick uhost handle chan text}{set mot [lindex$text0]if{$mot eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .+badmot <mot>"putserv"PRIVMSG $chan :\002Exemple :\002 .+badmot con"return}if{[verify:b $::mod::fichier(modmot)$mot]}{putserv"PRIVMSG $chan :\002Erreur :\002 $mot est déjà enregistré."return}putserv"PRIVMSG $chan :\02\[\002Système Badmot\02]\002 \02$mot \002a été ajouté à la liste."
ajouter:donnee $::mod::fichier(modmot)$mot}bindpub o|o ".-badmot"[namespace current]::-badmot
proc -badmot {nick uhost handle chan text}{set mot [lindex$text0]if{$mot eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .-badmot <mot>"return}if{![verify:b $::mod::fichier(modmot)$mot]}{putserv"PRIVMSG $chan :\002Erreur :\02$mot \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Système Badmot\02]\002 \02$mot \002 est supprimé de la liste."
effacer:donnee $::mod::fichier(modmot)$mot}bindpub o|o ".badmotlist"[namespace current]::pub:badmotlist
procpub:badmotlist {nick uhost hand chan args}{set fp [open$::mod::fichier(modmot)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"PRIVMSG $nick :\0032Liste des Badmot\0032"putserv"PRIVMSG $nick :\0034 $fc - $data \0034"}
unset data
}close$fpputserv"PRIVMSG $nick :\0032Fin de liste\0032"}binddcc n "+modnick"[namespace current]::+modnick
proc +modnick {handidx arg}{setnick[lindex$arg0]if{$nick eq ""}{putdcc$idx"\002Erreur :\002 .+modnick <nick>"putdcc$idx"\002Exemple :\002 .+modnick *.*.com*"return}if{[verify:b $::mod::fichier(modnick)$nick]}{putdcc$idx"\002Erreur :\002 $nick est déjà enregistré."return}putdcc$idx"\002+modnick :\002 $nick a été mis dans la liste."
ajouter:donnee $::mod::fichier(modnick)$nick}binddcc n "-modnick"[namespace current]::-modnick
proc -modnick {handidx arg}{setnick[lindex$arg0]if{$nick eq ""}{putdcc$idx"\002Erreur :\002 .-modnick <nick>"return}if{![verify:b $::mod::fichier(modnick)$nick]}{putdcc$idx"\002Erreur :\002 Le nick $nick n'est pas enregistré."return}putdcc$idx"\002-modnick :\002 $nick n'est plus enregistré."
effacer:donnee $::mod::fichier(modnick)$nick}binddcc n "modnick"[namespace current]::dcc:modnick
procdcc:modnick {handidx arg}{putdcc$idx"---\002 Liste des nicks \002---"
liste:donnee $idx$::mod::fichier(modnick)}bindpub o|o ".+badnick"[namespace current]::+badnick
proc +badnick {nick uhost handle chan text}{setnick[lindex$text0]if{$nick eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .+badnick <pseudo>"putserv"PRIVMSG $chan :\002Exemple :\002 .+badnick h_pour_cam*!*@*"return}if{[verify:b $::mod::fichier(modnick)$nick]}{putserv"PRIVMSG $chan :\002Erreur :\002 $nick est déjà enregistré."return}putserv"PRIVMSG $chan :\02\[\002Système Badnick\02]\002 \02$nick \002a été ajouté à la liste."
ajouter:donnee $::mod::fichier(modnick)$nick}bindpub o|o ".-badnick"[namespace current]::-badnick
proc -badnick {nick uhost handle chan text}{setnick[lindex$text0]if{$nick eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .-badnick <pseudo>"return}if{![verify:b $::mod::fichier(modnick)$nick]}{putserv"PRIVMSG $chan :\002Erreur :\02$nick \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Système badnick\02]\002 \02$nick \002 est supprimé de la liste."
effacer:donnee $::mod::fichier(modnick)$nick}bindpub o|o ".badnicklist"[namespace current]::pub:badnicklist
procpub:badnicklist {nick uhost hand chan args}{set fp [open$::mod::fichier(modnick)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"PRIVMSG $nick :\0032Liste des Badnick\0032"putserv"PRIVMSG $nick :\0034 $fc - $data \0034"}
unset data
}close$fpputserv"PRIVMSG $nick :\0032Fin de liste\0032"}bindjoin - "*"[namespace current]::modnickproc modnick {nick uhost handle channel}{set hostv $nick!$uhostif{[verify:a $::mod::fichier(protect)$hostv]}{return}if{[string equal -nocase $nick$::botnick]}{return}if{![verify:b $::mod::fichier(modchan)$channel]}{return}if{![verify:a $::mod::fichier(modnick)$nick]}{return}putnow"MODE $channel +b $nick*!*"putquick"KICK $channel $nick :[::msgcat::mc KickNic]"}bindnick - "*"[namespace current]::modnicksuiteproc modnicksuite {nick uhost handle chan newnick }{set hostv $nick!$uhostif{[verify:a $::mod::fichier(protect)$hostv]}{return}if{[string equal -nocase $nick$::botnick]}{return}if{![verify:b $::mod::fichier(modchan)$chan]}{return}if{![verify:a $::mod::fichier(modnick)$nick]}{return}putnow"MODE $chan +b $newnick*!*"putquick"KICK $channel $nick :[::msgcat::mc KickNic]"}bindpub o|o ".+bav"[namespace current]::+bav
proc +bav {nick uhost handle chan text}{set host [lindex$text0]set pseudo [lindex$text0]if{$host eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .+bav <host>"putserv"PRIVMSG $chan :\002Exemple :\002 .+bav *!*@0000000.com"putserv"PRIVMSG $chan :\002Exemple :\002 .+bav alias_angelius*!*"return}if{$pseudo eq "" || ![string match **!*@*$pseudo]}{putserv"PRIVMSG $chan :\0034Erreur\0034 : \0031.+bav <\0034host\0034\0031> ou <\0034pseudo*!*@*\0034\0031>"putserv"PRIVMSG $chan :\0031Exemple : \0031\0034.+bav *!*@0000000.com\0034"putserv"PRIVMSG $chan : \0031Exemple : \0031\0034.+bav bOulet*!*@*\0034"return}if{[verify:b $::mod::fichier(protect)$host]}{putserv"PRIVMSG $chan :\0034Refusé : \0034\002 Tu ne peux pas Blacklisté un host ou pseudo protégé.\002"putserv"PRIVMSG $::salonm :\0034\|Mode.Alerte.Admin\|\003\ \0034ATTENTION: \00314$nick \0034Host: \00314$uhost \0034a tenté de Blacklister \00314$pseudo \0034Host: \00314$host \0034sur: \00314$chan"return1}if{[verify:b $::mod::fichier(blacklist)$host]}{putserv"PRIVMSG $chan :\002Erreur :\002 $host est déjà enregistré."return}putserv"PRIVMSG $chan :\002\[\002Système BAV\002]\002 \002$host \002à été mis dans la liste.\002"
ajouter:donnee $::mod::fichier(blacklist)$host}bindpub o|o ".-bav"[namespace current]::-bav
proc -bav {nick uhost handle chan text}{set host [lindex$text0]if{$host eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .-bav <host>"return}if{![verify:b $::mod::fichier(blacklist)$host]}{putserv"PRIVMSG $chan :\002Erreur :\02$host \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Système BAV\02]\002 \02$host \002 n'est plus BAV."
effacer:donnee $::mod::fichier(blacklist)$host}bindpub o|o ".bavlist"[namespace current]::pub:bavlist
procpub:bavlist {nick uhost hand chan args}{set fp [open$::mod::fichier(blacklist)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"PRIVMSG $nick :\0032Liste des Blacklistés\0032"putserv"PRIVMSG $nick :\0034 $fc - $data \0034"}
unset data
}close$fpputserv"PRIVMSG $nick :\0032Fin de liste\0032"}binddcc m "+blacklist"[namespace current]::+blacklist
proc +blacklist {handidx arg}{set host [lindex$arg0]if{$host eq ""}{putdcc$idx"\002Erreur :\002 .+blacklist <host>"putdcc$idx"\002Exemple :\002 .+blacklist toto*!*@*.ru"return}if{[verify:b $::mod::fichier(blacklist)$host]}{putdcc$idx"\002Erreur :\002 $host est déjà enregistré."return}putdcc$idx"\002+blacklist :\002 $host a été mis dans la liste."
ajouter:donnee $::mod::fichier(blacklist)$host}binddcc m "-blacklist"[namespace current]::-blacklist
proc -blacklist {handidx arg}{set host [lindex$arg0]if{$host eq ""}{putdcc$idx"\002Erreur :\002 .-blacklist <host>"return}if{![verify:b $::mod::fichier(blacklist)$host]}{putdcc$idx"\002Erreur :\002 Le host $host n'est pas enregistré."return}putdcc$idx"\002-blacklist :\002 $host n'est plus enregistré."
effacer:donnee $::mod::fichier(blacklist)$host}binddcc m "blacklist"[namespace current]::dcc:blacklist
procdcc:blacklist {handidx arg}{putdcc$idx"\002 Liste des Ban à Vue\002"
liste:donnee $idx$::mod::fichier(blacklist)}bindjoin - "*"[namespace current]::modblacklistproc modblacklist {nick host handle channel}{set hostv $nick!$hostset userhost [getchanhost$nick]set userhost "*!*[string range $userhost [string first @ $userhost] e]"set expire "expire le [clock format [expr 3600 + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"set heure "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"if{[string equal -nocase $nick$::botnick]}{return}if{![verify:b $::mod::fichier(modchan)$channel]}{return}if{![verify:a $::mod::fichier(blacklist)$hostv]}{return}putquick"KICK $channel $nick :[::msgcat::mc KickBlack] $expire"putquick"MODE $channel +b $nick*!*@*"putquick"MODE $channel +b $userhost"putserv"PRIVMSG $::salonm :\0034\|Mod.KickBan.Blacklist\|\003\ \0034KickBan pour: \00314$nick \0034Host: \00314$userhost \0034(Raison: \00314$::kick(blacklist) ($expire)\0034) \0034sur: \00314$channel"}binddcc o|o "+xprotect"[namespace current]::+xprotect
proc +xprotect {handidx arg}{set host [lindex$arg0]if{$host eq ""}{putdcc$idx"\002Erreur :\002 .+protect <host>"putdcc$idx"\002Exemple :\002 .+protect alias_angelius*!*@*"return}if{[verify:b $::mod::fichier(protect)$host]}{putdcc$idx"\002Erreur :\002 $host est déjà enregistré."return}putdcc$idx"\002+protect :\002 Le host $host est maintenant protégé."
ajouter:donnee $::mod::fichier(protect)$host}binddcc o|o "-xprotect"[namespace current]::-xprotect
proc -xprotect {handidx arg}{set host [lindex$arg0]if{$host eq ""}{putdcc$idx"\002Erreur :\002 .-protect <host>"return}if{![verify:b $::mod::fichier(protect)$host]}{putdcc$idx"\002Erreur :\002 Le host $host n'est pas enregistré."return}putdcc$idx"\002-protect :\002 Le host $host n'est plus protégé."
effacer:donnee $::mod::fichier(protect)$host}binddcc o|o "xprotect"[namespace current]::xprotectproc xprotect {handidx arg}{putdcc$idx"---\002 Liste des protégé contre la modération \002---"
liste:donnee $idx$::mod::fichier(protect)}bindpub o|o ".+protect"[namespace current]::+protect
proc +protect {nick uhost handle chan text}{set host [lindex$text0]if{$host eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .+protect <pseudo/host>"putserv"PRIVMSG $chan :\002Exemple :\002 .+protect alias_angelius*!*@*"return}if{[verify:b $::mod::fichier(protect)$host]}{putserv"PRIVMSG $chan :\002Erreur :\002 $host est déjà enregistré."return}putserv"PRIVMSG $chan :\02\[\002Système Protect\02]\002 \02$host \002a été ajouté à la liste."
ajouter:donnee $::mod::fichier(protect)$host}bindpub m ".-protect"[namespace current]::-protect
proc -protect {nick uhost handle chan text}{set host [lindex$text0]if{$host eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .-protect <pseudo/host>"return}if{![verify:b $::mod::fichier(protect)$host]}{putserv"PRIVMSG $chan :\002Erreur :\02$host \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Système Protect\02]\002 \02$host \002 est supprimé de la liste."
effacer:donnee $::mod::fichier(protect)$host}bindpub o|o ".protectlist"[namespace current]::pub:protectlist
procpub:protectlist {nick uhost hand chan args}{set fp [open$::mod::fichier(protect)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"NOTICE $nick :\0032Liste des Protégés\0032"putserv"NOTICE $nick :\0034 $fc - $data\0034"}
unset data
}close$fpputserv"NOTICE $nick :\0032Fin de liste"}proc verify:a {fichierss arg}{set liste [open$fichierss r]while{![eof$liste]}{gets$liste a
regsub -all -- {\{|\}|\\{|[}{|]}}$a"" a
if{$a ne ""}{if{[string match -nocase *$a*$arg]}{close$listereturn1}}}close$listereturn0}proc verify:b {fichierss arg}{set liste [open$fichierss r]while{![eof$liste]}{gets$liste a
regsub -all -- {\{|\}|\\{|[}{|]}}$a"" a
if{$a ne ""}{if{[string equal -nocase $a$arg]}{close$listereturn1}}}close$listereturn0}proc ajouter:donnee {fichierss arg}{set liste [open$fichierss a]puts$liste"$arg"close$liste}proc effacer:donnee {fichierss arg}{set fichier(back)"$fichierss.back"setload[open$fichier(back) w+]close$loadset liste [open$fichierss r]set bcloseback [open$fichier(back) a]while{![eof$liste]}{gets$liste a
if{$a ne ""}{if{[string equal -nocase [lindex$a0]$arg]}{}else{puts$bcloseback"[lindex $a]"}}}close$listeclose$bclosebackfile delete $fichierssfilerename$fichier(back)$fichierss}proc liste:donnee {idx fichierss}{set liste [open$fichierss r]set num 0while{![eof$liste]}{gets$liste a
if{$a ne ""}{incr num 1putdcc$idx"(\002$num\002) [lindex $a 0]"}}if{$num eq "0"}{putdcc$idx"Aucun enregistrement."}putdcc$idx"---\002 FIN DE LA LISTE \002--- Total (\002$num\002)"close$liste
unset num
}}
Si JAMAIS tu as encore une erreur dit le moi ici, et je te filerais un autre code de modération complétement différent codé d'une autre manière différente !
AAh pas vus ta réponse CC, en effet ta solution es meilleurs :)
Vous interdisez les erreurs, vous empêchez ainsi la victoire.
Je te file une légère modification tu me dit ce que sa donne. Pour la partie msgcat normalement c'est dans la librairie tcl8.5
tcl
##################################################################################################################### Moderation.tcl ## ## Script TCL de modération, fonctionnalité du code : ## Anti-Majuscules, Anti-Répétition, Mode-Language, Mode-Spam, Anti-MassFlood, Anti-MassJoin, Mode-Nick, Blacklist. ## Mode Vip Automatique ## ## Ce code et de base de Platine, version débug et modifié en Namespace avec des rajouts de commandes etc. ## #####################################################################################################################namespaceeval ::mod{# Nous vérifions si ya le package requis pour le msgcat.package require msgcat# Nous mettons la langue de msgcat en français
::msgcat::mclocale fr
# Les messages msgcat.
::msgcat::mcset fr AvertMaj "Doucement sur les majuscules !"
::msgcat::mcset fr KickMaj "Si tu veux crier tu vas dehors !"
::msgcat::mcset fr AvertRep "N'abuse pas des répétitions !"
::msgcat::mcset fr KickRep "Tu n'as pas besoin de te répéter autant de fois !"
::msgcat::mcset fr AvertLan "Fais attention à ton langage ! Si tu continues tu te feras expulser !"
::msgcat::mcset fr KickLan "Reviens nous voir dans 10 minutes en espérant que tu auras changer de langage !"
::msgcat::mcset fr AvertSpam "Si tu veux envoyé un lien c'est en Pv et pas en salon !"
::msgcat::mcset fr KickSpam "Va faire ta pub ailleurs !"
::msgcat::mcset fr KickNick "Veuillez modifier votre pseudo car celui-ci est incorrect !"
::msgcat::mcset fr KickBlack "\02\[\002Systeme B.A.V\02]\002 Indésirable!!"
::msgcat::mcset fr KickNoti "Pas de Notice Salon !"
::msgcat::mcset fr KickNic "Veuillez modifier votre pseudo car celui-ci est incorrect !"# Les limitations/Nombres# Expiration de la detection pour les majuscules (en seconde) ?set expiration(majuscule)"60"# Nombre de majuscule à détecter ?set detect(majuscule)"25"# Combien d'avertissement avant le kick ?set avert(majuscule)"1"# Expiration de la detection pour les repetitions (en seconde) ?set expiration(repetition)"60"# Nombre de repetition à détecter ?set detect(repetition)"6"# Combien d'avertissement avant le kick ?set avert(repetition)"1"# Expiration de la detection pour le langage (en seconde) ?set expiration(mot)"600"# Combien d'avertissement avant le kickban ?set avert(mot)"3"# Expiration de la detection pour le spam (en seconde) ?set expiration(spam)"600"# Combien d'avertissement avant le kickban ?set avert(spam)"1"# Nombre de message lors d'une détection mass/floodset mass(flood)"15"# Temp de rehash pour la remise à 0 du mass/flood (en seconde)set mass(rehashflood)"1"# Temp pour le retrait du +m (en minute)set mass(retraitm)"2"# Nombre de join lors d'une détection mass/joinset mass(join)"10"# Temp de rehash pour la remise à 0 du mass/join (en seconde)set mass(rehashjoin)"1"# Temp pour le retrait du +i (en minute)set mass(retraiti)"2"# Salon de logset salonm "#Back-Eggdrop"########################### création des fichiers. ###########################set fichier(modchan)"modchan.chan"set fichier(modmot)"modmot.mot"set fichier(modspam)"modspam.spam"set fichier(modnick)"modnick.nick"set fichier(protect)"protect.protect"set fichier(blacklist)"blacklist.black"set fichiers [list$::mod::fichier(modchan)$::mod::fichier(modmot)$::mod::fichier(modspam)$::mod::fichier(modnick)$::mod::fichier(protect)$::mod::fichier(blacklist)]foreach txt $fichiers{if{![file exists $txt]}{setload[open$txt w+]close$loadputlog"\2Je créer le(s) fichier(s) $fichiers\2"}}#################### Les procédures. ####################bindpubm - "*"[namespace current]::moderationproc moderation {nick host handle channel arg }{set arg [split$arg]setmsg[join[lrange[split$arg]0 end]]set hostv $nick!$hostset userhost [getchanhost$nick]set userhost "*!*[string range $userhost [string first @ $userhost] e]"regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007}$msg""msgregsub -all -- {\{|\}|\\{|[}{|]}}$msg""msgif{![verify:b $::mod::fichier(modchan)$channel]}{return}if{[verify:a $::mod::fichier(protect)$hostv]}{return}if{![info exists modmajuscule($host)]}{set modmajuscule($host)0utimer$::mod::expiration(majuscule)[list unset modmajuscule($host)]}set nombre 0foreach x [split$msg{}]{if[string match \[A-Z\]$x]{incr nombre
}}if{$nombre>$::mod::detect(majuscule)}{incr modmajuscule($host)1if{$::mod::avert(majuscule)<$modmajuscule($host)}{putnow"kick $channel $nick :[::msgcat::mc KickMaj]"set modmajuscule($host)0return}putserv"NOTICE $nick :[::msgcat::mc AvertMaj]"}if{[info exists rpt($nick)]}{if{[lrange$rpt($nick)2 end] eq "$msg"}{set cnt [lindex$rpt($nick)1]incr cnt
set rpt($nick)"[lindex $rpt($nick) 0] $cnt [lrange $rpt($nick) 2 end]"if{[lindex$rpt($nick)1]>$::mod::detect(repetition)}{if{![info exists modrepetition($host)]}{set modrepetition($host)0utimer$::mod::expiration(repetition)[list unset modrepetition($host)]}incr modrepetition($host)1if{$::mod::avert(repetition)<$modrepetition($host)}{putnow"kick $channel $nick :[::msgcat::mc KickRep]"set modrepetition($host)0return}putserv"NOTICE $nick :[::msgcat::mc AvertRep]"
unset rpt($nick)}}else{set rpt($nick)"[expr [clock seconds] + 10] 1 $msg"}}else{set rpt($nick)"[expr [clock seconds] + 10] 1 $msg"}if{[verify:a $::mod::fichier(modmot)$msg]}{if{![info exists modmot($host)]}{set modmot($host)0utimer$::mod::expiration(mot)[list unset modmot($host)]}incr modmot($host)1if{$::mod::avert(mot)<$modmot($host)}{putnow"mode $channel +b $userhost"putquick"kick $channel $nick :[msgcat::mc KickLan]"set modmot($host)0return}putserv"NOTICE $nick :[::msgcat::mc AvertLan]"}if{[verify:a $::mod::fichier(modspam)$msg]}{if{![info exists modspam($host)]}{set modspam($host)0utimer$::mod::expiration(spam)[list unset modspam($host)]}incr modspam($host)1if{$::avert(spam)<$modspam($host)}{putnow"mode $channel +b $userhost"putquick"kick $channel $nick :[::mdscat::mc KickSpam]"set modspam($host)0return}putserv"NOTICE $nick :[::msgcat::mc AvertSpam]"}}bindpubm - "*"[namespace current]::massfloodproc massflood {nick uhost handle chan arg }{set hostv $nick!$uhostif{[verify:a $::mod::fichier(protect)$hostv]}{return}if{![verify:b $::mod::fichier(modchan)$chan]}{return}if{![info exists massflood($chan)]}{set massflood($chan)0utimer$::mod::mass(rehashflood)[list unset $massflood($chan)]incr$massflood($chan)1if{$massflood($chan) eq "$::mod::mass(flood)"}{putserv"mode $chan +m"timer$::mass(retraitm)[listputserv"mode $chan -m"]}}}bindjoin - "*"[namespace current]::massjoinproc massjoin {nick host hand chan}{set hostv $nick!$hostif{[verify:a $::mod::fichier(protect)$hostv]}{return}if{![verify:b $::mod::fichier(modchan)$chan]}{return}if{![info exists massjoin($chan)]}{set massjoin($chan)0utimer$::mod::mass(rehashjoin)[list unset massjoin($chan)]}incr massjoin($chan)1if{$::massjoin($chan) eq "$::massjoin($chan)"}{putserv"mode $chan +i"timer$::mass(retraitm)[listputserv"mode $chan -i"]}}bindnotc - "*"[namespace current]::noticechanproc noticechan {nick host handle text chan}{set hostv $nick!$hostif{[verify:a $::mod::fichier(protect)$hostv]}{return}if{![verify:b $::mod::fichier(modchan)$chan]}{return}putnow"mode $chan +b $userhost"putquick"kick $chan $nick :[::msgcat::mc KickNoti]"}binddcc m "+modspam"[namespace current]::+modspam
proc +modspam {handidx arg}{set spam [lindex$arg0]if{$spam eq ""}{putdcc$idx"\002Erreur :\002 .+modspam <spam>"putdcc$idx"\002Exemple :\002 .+modspam *.*.com*"return}if{[verify:b $::mod::fichier(modspam)$spam]}{putdcc$idx"\002Erreur :\002 $spam est déjà enregistré."return}putdcc$idx"\002+modspam :\002 $spam a été mis dans la liste."
ajouter:donnee $::mod::fichier(modspam)$spam}binddcc n "-modspam"[namespace current]::-modspam
proc -modspam {handidx arg}{set spam [lindex$arg0]if{$spam eq ""}{putdcc$idx"\002Erreur :\002 .-modspam <spam>"return}if{![verify:b $::mod::fichier(modspam)$spam]}{putdcc$idx"\002Erreur :\002 Le spam $spam n'est pas enregistré."return}putdcc$idx"\002-modspam :\002 $spam n'est plus enregistré."
effacer:donnee $::mod::fichier(modspam)$spam}binddcc m "modspam"[namespace current]::modspamproc modspam {handidx arg}{putdcc$idx"---\002 LISTE DES SPAMS \002---"
liste:donnee $idx$::mod::fichier(modspam)}bindpub o|o ".+spam"[namespace current]::+spam
proc +spam {nick uhost handle chan text}{set motspam [lindex$text0]if{$motspam eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .+spam <mot spam>"putserv"PRIVMSG $chan :\002Exemple :\002 .+spam msn.com"return}if{[verify:b $::mod::fichier(modspam)$motspam]}{putserv"PRIVMSG $chan :\002Erreur :\002 $motspam est déjà enregistré."return}putserv"PRIVMSG $chan :\02\[\002Système AntiSpam\02]\002 \02$motspam \002a été ajouté à la liste."
ajouter:donnee $::mod::fichier(modspam)$motspam}bindpub o|o ".-spam"[namespace current]::-spam
proc -spam {nick uhost handle chan text}{set motspam [lindex$text0]if{$motspam eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .-spam <motspam>"return}if{![verify:b $::mod::fichier(modspam)$motspam]}{putserv"PRIVMSG $chan :\002Erreur :\02$motspam \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Système AntiSpam\02]\002 \02$motspam \002 est supprimé de la liste."
effacer:donnee $::mod::fichier(modspam)$motspam}bindpub o|o ".spamlist"[namespace current]::pub:spamlist
procpub:spamlist {nick uhost hand chan args}{set fp [open$::mod::fichier(modspam)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"PRIVMSG $nick :PRIVMSG $nick :\0032Liste des Spams\0032"putserv"PRIVMSG $nick :\0034 $fc - $data \0034"}
unset data
}close$fpputserv"PRIVMSG $nick :\0032Fin de liste\0032"}binddcc n "+modchan"[namespace current]::+modchan
proc +modchan {handidx arg}{set chan [lindex$arg0]if{$chan eq ""||[string index $chan0] ne "#"}{putdcc$idx"\002Erreur :\002 .+modchan <#chan>"return}if{[verify:b $::mod::fichier(modchan)$chan]}{putdcc$idx"\002Erreur :\002 $chan est déjà modérer."return}putdcc$idx"\002+modchan :\002 $chan a été mis dans la liste."
ajouter:donnee $::mod::fichier(modchan)$chan}binddcc n "-modchan"[namespace current]::-modchan
proc -modchan {handidx arg}{set chan [lindex$arg0]if{$chan eq ""||[string index $chan0] ne "#"}{putdcc$idx"\002Erreur :\002 .-modchan <#chan>"return}if{![verify:b $::mod::fichier(modchan)$chan]}{putdcc$idx"\002Erreur :\002 Le chan $chan n'est pas modérer."return}putdcc$idx"\002-modchan :\002 $chan n'est plus modéré."
effacer:donnee $::mod::fichier(modchan)$chan}binddcc n "modchan"[namespace current]::modchanproc modchan {handidx arg}{putdcc$idx"---\002 Liste des chans modérer \002---"
liste:donnee $idx$::mod::fichier(modchan)}bindpub o|o ".+chan"[namespace current]::+chan
proc +chan {nick uhost handle chan text}{set moderechan [lindex$text0]if{$moderechan eq "" ||[string index $chan0] ne "#"}{putserv"PRIVMSG $chan :\002Erreur :\002 .+chan <#Salon>"putserv"PRIVMSG $chan :\002Exemple :\002 .+chan #Radio"return}if{[verify:b $::mod::fichier(modchan)$moderechan]}{putserv"PRIVMSG $chan :\002Erreur :\002 $moderechan est déjà enregistré."return}putserv"PRIVMSG $chan :\02\[\002Moderation Salon\02]\002 \02$moderechan \002a été ajouté à la liste."
ajouter:donnee $::mod::fichier(modchan)$moderechan}bindpub o|o ".-chan"[namespace current]::-chan
proc -chan {nick uhost handle chan text}{set moderechan [lindex$text0]if{$moderechan eq "" ||[string index $chan0] ne "#"}{putserv"PRIVMSG $chan :\002Erreur :\002 .-chan <#Salon>"return}if{![verify:b $::mod::fichier(modchan)$moderechan]}{putserv"PRIVMSG $chan :\002Erreur :\02$moderechan \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Moderation Salon\02]\002 \02$moderechan \002 est supprimé de la liste."
effacer:donnee $::mod::fichier(modchan)$moderechan}bindpub o|o ".listchan"[namespace current]::pub:listchan
procpub:listchan {nick uhost hand chan args}{set fp [open$::mod::fichier(modchan)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"PRIVMSG $nick :\0032Liste des Salons\0032"putserv"PRIVMSG $nick :\0034 $fc - $data \0034"}
unset data
}close$fpputserv"PRIVMSG $nick :\0032Fin de liste\0032"}binddcc n "+modmot"[namespace current]::+modmot
proc +modmot {handidx arg}{set mot [lindex$arg0]if{$mot eq ""}{putdcc$idx"\002Erreur :\002 .+modmot <mot>"return}if{[verify:b $::mod::fichier(modmot)$mot]}{putdcc$idx"\002Erreur :\002 $mot est déjà enregistré."return}putdcc$idx"\002+modmot :\002 $mot a été mis dans la liste."
ajouter:donnee $::mod::fichier(modmot)$mot}binddcc n "-modmot"[namespace current]::-modmot
proc -modmot {handidx arg}{set mot [lindex$arg0]if{$mot eq ""}{putdcc$idx"\002Erreur :\002 .-modmot <mot>"return}if{![verify:b $::mod::fichier(modmot)$mot]}{putdcc$idx"\002Erreur :\002 Le mot $mot n'est pas enregistré."return}putdcc$idx"\002-modmot :\002 $mot n'est plus enregistré."
effacer:donnee $::mod::fichier(modmot)$mot}binddcc n "modmot"[namespace current]::modmotproc modmot {handidx arg}{putdcc$idx"---\002 Liste des mots interdit \002---"
liste:donnee $idx$::mod::fichier(modmot)}bindpub o|o ".+badmot"[namespace current]::+badmot
proc +badmot {nick uhost handle chan text}{set mot [lindex$text0]if{$mot eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .+badmot <mot>"putserv"PRIVMSG $chan :\002Exemple :\002 .+badmot con"return}if{[verify:b $::mod::fichier(modmot)$mot]}{putserv"PRIVMSG $chan :\002Erreur :\002 $mot est déjà enregistré."return}putserv"PRIVMSG $chan :\02\[\002Système Badmot\02]\002 \02$mot \002a été ajouté à la liste."
ajouter:donnee $::mod::fichier(modmot)$mot}bindpub o|o ".-badmot"[namespace current]::-badmot
proc -badmot {nick uhost handle chan text}{set mot [lindex$text0]if{$mot eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .-badmot <mot>"return}if{![verify:b $::mod::fichier(modmot)$mot]}{putserv"PRIVMSG $chan :\002Erreur :\02$mot \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Système Badmot\02]\002 \02$mot \002 est supprimé de la liste."
effacer:donnee $::mod::fichier(modmot)$mot}bindpub o|o ".badmotlist"[namespace current]::pub:badmotlist
procpub:badmotlist {nick uhost hand chan args}{set fp [open$::mod::fichier(modmot)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"PRIVMSG $nick :\0032Liste des Badmot\0032"putserv"PRIVMSG $nick :\0034 $fc - $data \0034"}
unset data
}close$fpputserv"PRIVMSG $nick :\0032Fin de liste\0032"}binddcc n "+modnick"[namespace current]::+modnick
proc +modnick {handidx arg}{setnick[lindex$arg0]if{$nick eq ""}{putdcc$idx"\002Erreur :\002 .+modnick <nick>"putdcc$idx"\002Exemple :\002 .+modnick *.*.com*"return}if{[verify:b $::mod::fichier(modnick)$nick]}{putdcc$idx"\002Erreur :\002 $nick est déjà enregistré."return}putdcc$idx"\002+modnick :\002 $nick a été mis dans la liste."
ajouter:donnee $::mod::fichier(modnick)$nick}binddcc n "-modnick"[namespace current]::-modnick
proc -modnick {handidx arg}{setnick[lindex$arg0]if{$nick eq ""}{putdcc$idx"\002Erreur :\002 .-modnick <nick>"return}if{![verify:b $::mod::fichier(modnick)$nick]}{putdcc$idx"\002Erreur :\002 Le nick $nick n'est pas enregistré."return}putdcc$idx"\002-modnick :\002 $nick n'est plus enregistré."
effacer:donnee $::mod::fichier(modnick)$nick}binddcc n "modnick"[namespace current]::dcc:modnick
procdcc:modnick {handidx arg}{putdcc$idx"---\002 Liste des nicks \002---"
liste:donnee $idx$::mod::fichier(modnick)}bindpub o|o ".+badnick"[namespace current]::+badnick
proc +badnick {nick uhost handle chan text}{setnick[lindex$text0]if{$nick eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .+badnick <pseudo>"putserv"PRIVMSG $chan :\002Exemple :\002 .+badnick h_pour_cam*!*@*"return}if{[verify:b $::mod::fichier(modnick)$nick]}{putserv"PRIVMSG $chan :\002Erreur :\002 $nick est déjà enregistré."return}putserv"PRIVMSG $chan :\02\[\002Système Badnick\02]\002 \02$nick \002a été ajouté à la liste."
ajouter:donnee $::mod::fichier(modnick)$nick}bindpub o|o ".-badnick"[namespace current]::-badnick
proc -badnick {nick uhost handle chan text}{setnick[lindex$text0]if{$nick eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .-badnick <pseudo>"return}if{![verify:b $::mod::fichier(modnick)$nick]}{putserv"PRIVMSG $chan :\002Erreur :\02$nick \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Système badnick\02]\002 \02$nick \002 est supprimé de la liste."
effacer:donnee $::mod::fichier(modnick)$nick}bindpub o|o ".badnicklist"[namespace current]::pub:badnicklist
procpub:badnicklist {nick uhost hand chan args}{set fp [open$::mod::fichier(modnick)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"PRIVMSG $nick :\0032Liste des Badnick\0032"putserv"PRIVMSG $nick :\0034 $fc - $data \0034"}
unset data
}close$fpputserv"PRIVMSG $nick :\0032Fin de liste\0032"}bindjoin - "*"[namespace current]::modnickproc modnick {nick uhost handle channel}{set hostv $nick!$uhostif{[verify:a $::mod::fichier(protect)$hostv]}{return}if{[string equal -nocase $nick$::botnick]}{return}if{![verify:b $::mod::fichier(modchan)$channel]}{return}if{![verify:a $::mod::fichier(modnick)$nick]}{return}putnow"MODE $channel +b $nick*!*"putquick"KICK $channel $nick :[::msgcat::mc KickNic]"}bindnick - "*"[namespace current]::modnicksuiteproc modnicksuite {nick uhost handle chan newnick }{set hostv $nick!$uhostif{[verify:a $::mod::fichier(protect)$hostv]}{return}if{[string equal -nocase $nick$::botnick]}{return}if{![verify:b $::mod::fichier(modchan)$chan]}{return}if{![verify:a $::mod::fichier(modnick)$nick]}{return}putnow"MODE $chan +b $newnick*!*"putquick"KICK $channel $nick :[::msgcat::mc KickNic]"}bindpub o|o ".+bav"[namespace current]::+bav
proc +bav {nick uhost handle chan text}{set host [lindex$text0]set pseudo [lindex$text0]if{$host eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .+bav <host>"putserv"PRIVMSG $chan :\002Exemple :\002 .+bav *!*@0000000.com"putserv"PRIVMSG $chan :\002Exemple :\002 .+bav alias_angelius*!*"return}if{$pseudo eq "" || ![string match **!*@*$pseudo]}{putserv"PRIVMSG $chan :\0034Erreur\0034 : \0031.+bav <\0034host\0034\0031> ou <\0034pseudo*!*@*\0034\0031>"putserv"PRIVMSG $chan :\0031Exemple : \0031\0034.+bav *!*@0000000.com\0034"putserv"PRIVMSG $chan : \0031Exemple : \0031\0034.+bav bOulet*!*@*\0034"return}if{[verify:b $::mod::fichier(protect)$host]}{putserv"PRIVMSG $chan :\0034Refusé : \0034\002 Tu ne peux pas Blacklisté un host ou pseudo protégé.\002"putserv"PRIVMSG $::salonm :\0034\|Mode.Alerte.Admin\|\003\ \0034ATTENTION: \00314$nick \0034Host: \00314$uhost \0034a tenté de Blacklister \00314$pseudo \0034Host: \00314$host \0034sur: \00314$chan"return1}if{[verify:b $::mod::fichier(blacklist)$host]}{putserv"PRIVMSG $chan :\002Erreur :\002 $host est déjà enregistré."return}putserv"PRIVMSG $chan :\002\[\002Système BAV\002]\002 \002$host \002à été mis dans la liste.\002"
ajouter:donnee $::mod::fichier(blacklist)$host}bindpub o|o ".-bav"[namespace current]::-bav
proc -bav {nick uhost handle chan text}{set host [lindex$text0]if{$host eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .-bav <host>"return}if{![verify:b $::mod::fichier(blacklist)$host]}{putserv"PRIVMSG $chan :\002Erreur :\02$host \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Système BAV\02]\002 \02$host \002 n'est plus BAV."
effacer:donnee $::mod::fichier(blacklist)$host}bindpub o|o ".bavlist"[namespace current]::pub:bavlist
procpub:bavlist {nick uhost hand chan args}{set fp [open$::mod::fichier(blacklist)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"PRIVMSG $nick :\0032Liste des Blacklistés\0032"putserv"PRIVMSG $nick :\0034 $fc - $data \0034"}
unset data
}close$fpputserv"PRIVMSG $nick :\0032Fin de liste\0032"}binddcc m "+blacklist"[namespace current]::+blacklist
proc +blacklist {handidx arg}{set host [lindex$arg0]if{$host eq ""}{putdcc$idx"\002Erreur :\002 .+blacklist <host>"putdcc$idx"\002Exemple :\002 .+blacklist toto*!*@*.ru"return}if{[verify:b $::mod::fichier(blacklist)$host]}{putdcc$idx"\002Erreur :\002 $host est déjà enregistré."return}putdcc$idx"\002+blacklist :\002 $host a été mis dans la liste."
ajouter:donnee $::mod::fichier(blacklist)$host}binddcc m "-blacklist"[namespace current]::-blacklist
proc -blacklist {handidx arg}{set host [lindex$arg0]if{$host eq ""}{putdcc$idx"\002Erreur :\002 .-blacklist <host>"return}if{![verify:b $::mod::fichier(blacklist)$host]}{putdcc$idx"\002Erreur :\002 Le host $host n'est pas enregistré."return}putdcc$idx"\002-blacklist :\002 $host n'est plus enregistré."
effacer:donnee $::mod::fichier(blacklist)$host}binddcc m "blacklist"[namespace current]::dcc:blacklist
procdcc:blacklist {handidx arg}{putdcc$idx"\002 Liste des Ban à Vue\002"
liste:donnee $idx$::mod::fichier(blacklist)}bindjoin - "*"[namespace current]::modblacklistproc modblacklist {nick host handle channel}{set hostv $nick!$hostset userhost [getchanhost$nick]set userhost "*!*[string range $userhost [string first @ $userhost] e]"set expire "expire le [clock format [expr 3600 + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"set heure "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"if{[string equal -nocase $nick$::botnick]}{return}if{![verify:b $::mod::fichier(modchan)$channel]}{return}if{![verify:a $::mod::fichier(blacklist)$hostv]}{return}putquick"KICK $channel $nick :[::msgcat::mc KickBlack] $expire"putquick"MODE $channel +b $nick*!*@*"putquick"MODE $channel +b $userhost"putserv"PRIVMSG $::salonm :\0034\|Mod.KickBan.Blacklist\|\003\ \0034KickBan pour: \00314$nick \0034Host: \00314$userhost \0034(Raison: \00314$::kick(blacklist) ($expire)\0034) \0034sur: \00314$channel"}binddcc o|o "+xprotect"[namespace current]::+xprotect
proc +xprotect {handidx arg}{set host [lindex$arg0]if{$host eq ""}{putdcc$idx"\002Erreur :\002 .+protect <host>"putdcc$idx"\002Exemple :\002 .+protect alias_angelius*!*@*"return}if{[verify:b $::mod::fichier(protect)$host]}{putdcc$idx"\002Erreur :\002 $host est déjà enregistré."return}putdcc$idx"\002+protect :\002 Le host $host est maintenant protégé."
ajouter:donnee $::mod::fichier(protect)$host}binddcc o|o "-xprotect"[namespace current]::-xprotect
proc -xprotect {handidx arg}{set host [lindex$arg0]if{$host eq ""}{putdcc$idx"\002Erreur :\002 .-protect <host>"return}if{![verify:b $::mod::fichier(protect)$host]}{putdcc$idx"\002Erreur :\002 Le host $host n'est pas enregistré."return}putdcc$idx"\002-protect :\002 Le host $host n'est plus protégé."
effacer:donnee $::mod::fichier(protect)$host}binddcc o|o "xprotect"[namespace current]::xprotectproc xprotect {handidx arg}{putdcc$idx"---\002 Liste des protégé contre la modération \002---"
liste:donnee $idx$::mod::fichier(protect)}bindpub o|o ".+protect"[namespace current]::+protect
proc +protect {nick uhost handle chan text}{set host [lindex$text0]if{$host eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .+protect <pseudo/host>"putserv"PRIVMSG $chan :\002Exemple :\002 .+protect alias_angelius*!*@*"return}if{[verify:b $::mod::fichier(protect)$host]}{putserv"PRIVMSG $chan :\002Erreur :\002 $host est déjà enregistré."return}putserv"PRIVMSG $chan :\02\[\002Système Protect\02]\002 \02$host \002a été ajouté à la liste."
ajouter:donnee $::mod::fichier(protect)$host}bindpub m ".-protect"[namespace current]::-protect
proc -protect {nick uhost handle chan text}{set host [lindex$text0]if{$host eq ""}{putserv"PRIVMSG $chan :\002Erreur :\002 .-protect <pseudo/host>"return}if{![verify:b $::mod::fichier(protect)$host]}{putserv"PRIVMSG $chan :\002Erreur :\02$host \002n'est pas dans la liste."return}putserv"PRIVMSG $chan :\02\[\002Système Protect\02]\002 \02$host \002 est supprimé de la liste."
effacer:donnee $::mod::fichier(protect)$host}bindpub o|o ".protectlist"[namespace current]::pub:protectlist
procpub:protectlist {nick uhost hand chan args}{set fp [open$::mod::fichier(protect)"r"]set fc -1while{![eof$fp]}{set data [gets$fp]incr fc
if{$data!=""}{putserv"NOTICE $nick :\0032Liste des Protégés\0032"putserv"NOTICE $nick :\0034 $fc - $data\0034"}
unset data
}close$fpputserv"NOTICE $nick :\0032Fin de liste"}proc verify:a {fichierss arg}{set liste [open$fichierss r]while{![eof$liste]}{gets$liste a
regsub -all -- {\{|\}|\\{|[}{|]}}$a"" a
if{$a ne ""}{if{[string match -nocase *$a*$arg]}{close$listereturn1}}}close$listereturn0}proc verify:b {fichierss arg}{set liste [open$fichierss r]while{![eof$liste]}{gets$liste a
regsub -all -- {\{|\}|\\{|[}{|]}}$a"" a
if{$a ne ""}{if{[string equal -nocase $a$arg]}{close$listereturn1}}}close$listereturn0}proc ajouter:donnee {fichierss arg}{set liste [open$fichierss a]puts$liste"$arg"close$liste}proc effacer:donnee {fichierss arg}{set fichier(back)"$fichierss.back"setload[open$fichier(back) w+]close$loadset liste [open$fichierss r]set bcloseback [open$fichier(back) a]while{![eof$liste]}{gets$liste a
if{$a ne ""}{if{[string equal -nocase [lindex$a0]$arg]}{}else{puts$bcloseback"[lindex $a]"}}}close$listeclose$bclosebackfile delete $fichierssfilerename$fichier(back)$fichierss}proc liste:donnee {idx fichierss}{set liste [open$fichierss r]set num 0while{![eof$liste]}{gets$liste a
if{$a ne ""}{incr num 1putdcc$idx"(\002$num\002) [lindex $a 0]"}}if{$num eq "0"}{putdcc$idx"Aucun enregistrement."}putdcc$idx"---\002 FIN DE LA LISTE \002--- Total (\002$num\002)"close$liste
unset num
}}
Si JAMAIS tu as encore une erreur dit le moi ici, et je te filerais un autre code de modération complétement différent codé d'une autre manière différente !
AAh pas vus ta réponse CC, en effet ta solution es meilleurs :)
Merci alias_angelius.
J ai essayé mais au bout d'un moment, j ai eut ceci en PL:
[10:53:10] Tcl error in script for 'timer111':
[10:53:10] can't unset "0": no such variable
[10:53:12] Tcl error in script for 'timer108':
[10:53:12] can't unset "modmajuscule(Luffy@Pirate.King.One.Piece)": no such variable
[10:53:17] Tcl error in script for 'timer113':
[10:53:17] can't unset "0": no such variable
[10:53:19] Tcl error in script for 'timer117':
[10:53:19] can't unset "0": no such variable
[10:53:19] Tcl error in script for 'timer115':
[10:53:19] can't unset "0": no such variable
[10:53:22] Tcl error in script for 'timer119':
[10:53:22] can't unset "0": no such variable
[10:53:30] Tcl error in script for 'timer121':
[10:53:30] can't unset "0": no such variable
namespaceeval moderation {variable moderation
#Salon logsset ::chanbotlog"#back-eggdrop"#Rasion du kickban BAVset ::raisonbav"\037\0031Blackliste - Indesirable !!\037\0031"#Rasion du kickban Spamset ::raisonspam"\037\0031Spam/Pub Interdit sur le Salon\0037\0031"#Rasion du kickban Badwordset ::raisonbadword"\037\0031BadWord Détecté - Exclus pour mauvais langage !\0037\0031"#Raison du kickban Badnickset ::raisonbadnick"\037\0031BadNick Détecté - Veuillez changer votre pseudo que vous avez mis !\0037\0031"#Raison du kickban BadHostset ::raisonbadhost"\037\0031BadHost Détecté - Votre Host est Blacklisté ...\0037\0031"#Raison du kickban BadRealNameset ::raisonbadname"\037\0031BadName Détecté - Votre RealName est Blacklisté ...\0037\0031"############### Protection ###############binddcc A +xprotect moderation::+xprotect
proc +xprotect {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putdcc$idx"\2Utilisation:\2 .+xprotect <pseudo*!*@*> ou <*!*@host>"putdcc$idx"\0034Exemple:\2 .+xprotect toto*!*@* ou *!*@000000.fr"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="PROTECT"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)[list PROTECT $temp]putdcc$idx"\002$temp est ajouté à la liste des protégés"}else{putdcc$idx"\002Erreur:\002 $temp est déja dans la liste des protégés"}}binddcc A -xprotect moderation::-xprotect
proc -xprotect {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putdcc$idx"\2Utilisation:\2 .-xprotect <pseudo*!*@*> ou <*!*@host>"putdcc$idx"\0034Exemple:\2 .-xprotect toto*!*@* ou ou *!*@000000.fr"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="PROTECT"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putdcc$idx"\002$temp est supprimé de la liste des protégés"}else{putdcc$idx"\002$temp n'est pas dans la liste des protégés"}}# icibindpub A .+protect moderation::.+protect
proc .+protect {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putquick"NOTICE $nick :\2Utilisation:\2 .+protect <pseudo*!*@*> ou <*!*@host>"putquick"NOTICE $nick :\0034Exemple:\2 .+protect toto*!*@* ou *!*@000000.fr"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="PROTECT"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)"PROTECT [join $temp]"putquick"NOTICE $nick :\002$temp est ajouté à la liste des protégés"}else{putquick"NOTICE $nick :\002 $temp est déja dans la liste des protégés"}}bindpub A .-protect moderation::.-protect
proc .-protect {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putquick"NOTICE $nick :\2Utilisation:\2 .-protect <pseudo*!*@*> ou <*!*@host>"putquick"NOTICE $nick :\0034Exemple:\2 .-protect toto*!*@* ou *!*@000000.fr"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="PROTECT"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putquick"NOTICE $nick :\002$temp est supprimé de la liste des protégés"}else{putquick"NOTICE $nick :\002$temp n'est pas dans la liste des protégés"}}bindpub A .protectlist moderation::protectlistproc protectlist {nick host hand chan arg}{variable moderation
set x 0set d ""foreach data $moderation(data){if{[lindex$data0]!="PROTECT"}continueset x 1lappend d [lindex$data1]if{[llength$d]==10}{putquick"NOTICE $nick :[join $d]"set d ""}}if{[llength$d]>0}{putquick"NOTICE $nick :[join $d]"set d ""}if!$x{putquick"NOTICE $nick : Liste Protect vide."}}############ Badword ############binddcc A +xbadword moderation::+xbadword
proc +xbadword {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putdcc$idx"\2Utilisation:\2 .+xbadword <mot>"putdcc$idx"\0034Exemple:\2 .+xbadword connard"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="BADWORD"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)[list BADWORD $temp]putdcc$idx"\002$temp est ajouté à la liste des Badwords"}else{putdcc$idx"\002Erreur:\002 $temp est déja dans la liste des Badwords"}}binddcc A -xbadword moderation::-xbadword
proc -xbadword {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putdcc$idx"\2Utilisation:\2 .-xbadword <mot>"putdcc$idx"\0034Exemple:\2 .-xbadword connard"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="BADWORD"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putdcc$idx"\002$temp est supprimé de la liste des Badwords"}else{putdcc$idx"\002$temp n'est pas dans la liste des Badwords"}}bindpub A .+badword moderation::.+badword
proc .+badword {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putquick"NOTICE $nick :\2Utilisation:\2 .+badword <mot>"putquick"NOTICE $nick :\0034Exemple:\2 .+badword connard"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="BADWORD"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)[list BADWORD $temp]putquick"NOTICE $nick :\002$temp est ajouté à la liste des Badwords"}else{putquick"NOTICE $nick :\002 $temp est déja dans la liste des Badwords"}}bindpub A .-badword moderation::.-badword
proc .-badword {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putquick"NOTICE $nick :\2Utilisation:\2 .-badword <mot>"putquick"NOTICE $nick :\0034Exemple:\2 .-badword connard"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="BADWORD"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putquick"NOTICE $nick :\002$temp est supprimé de la liste des Badwords"}else{putquick"NOTICE $nick :\002$temp n'est pas dans la liste des Badwords"}}bindpub A .badwordlist moderation::badwordlistproc badwordlist {nick host hand chan arg}{variable moderation
set x 0set d ""foreach data $moderation(data){if{[lindex$data0]!="BADWORD"}continueset x 1lappend d [lindex$data1]if{[llength$d]==10}{puthelp"NOTICE $nick :[join $d]"set d ""}}if{[llength$d]>0}{puthelp"NOTICE $nick :[join $d]"set d ""}if!$x{puthelp"NOTICE $nick : Liste BadWord vide."}}############ Badhost ############binddcc A +xbadhost moderation::+xbadhost
proc +xbadhost {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putdcc$idx"\2Utilisation:\2 .+xbadhost <*!*@host>"putdcc$idx"\0034Exemple:\2 .+xbadhost *!*@*.biz"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="BADHOST"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)[list BADHOST $temp]putdcc$idx"\002$temp est ajouté à la liste des BadHosts"}else{putdcc$idx"\002Erreur:\002 $temp est déja dans la liste des BadHosts"}}binddcc A -xbadhost moderation::dcc:-xbadhost
procdcc:-xbadhost {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putdcc$idx"\2Utilisation:\2 .-xbadhost <*!*@host>"putdcc$idx"\0034Exemple:\2 .-xbadhost *!*@*.biz"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="BADHOST"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putdcc$idx"\002$temp est supprimé des BadHosts"}else{putdcc$idx"\002$temp n'est pas dans la liste des BadHosts"}}bindpub A .+badhost moderation::.+badhost
proc .+badhost {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putquick"NOTICE $nick :\2Utilisation:\2 .+badhost <*!*@host>"putquick"NOTICE $nick :\0034Exemple:\2 .+badhost *!*@*.biz"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="BADHOST"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)[list BADHOST $temp]putquick"NOTICE $nick :\002$temp ajouté aux BadHosts"}else{putquick"NOTICE $nick :\002 $temp est déja dans la liste des BadHosts"}}bindpub L .-badhost moderation::.-badhost
proc .-badhost {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putquick"NOTICE $nick :\2Utilisation:\2 .-badhost <*!*@host>"putquick"NOTICE $nick :\0034Exemple:\2 .-badhost *!*@*.biz"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="BADHOST"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putquick"NOTICE $nick :\002$temp est supprimé des BadHosts"}else{putquick"NOTICE $nick :\002$temp n'est pas dans la liste des BadHosts"}}bindpub A .badhostlist moderation::badhostlistproc badhostlist {nick host hand chan arg}{variable moderation
set x 0set d ""foreach data $moderation(data){if{[lindex$data0]!="BADHOST"}continueset x 1lappend d [lindex$data1]if{[llength$d]==10}{puthelp"NOTICE $nick :[join $d]"set d ""}}if{[llength$d]>0}{puthelp"NOTICE $nick :[join $d]"set d ""}if!$x{puthelp"NOTICE $nick : Liste Badhost vide."}}############### Blackliste ###############binddcc A +xblackliste moderation::+xblackliste
proc +xblackliste {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putdcc$idx"\2Utilisation:\2 .+xblackliste <pseudo*!*@*> ou <*!*@host>"putdcc$idx"\0034Exemple:\2 .+xblackliste toto*!*@* ou *!*@000000.fr"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="BLACKLISTE"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)[list BLACKLISTE $temp]putdcc$idx"\002$temp est ajouté à la Blackliste"}else{putdcc$idx"\002Erreur:\002 $temp est déja dans la Blackliste"}}binddcc A -xblackliste moderation::-xblackliste
proc -xblackliste {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putdcc$idx"\2Utilisation:\2 .-xblackliste <pseudo*!*@*> ou <*!*@host>"putdcc$idx"\0034Exemple:\2 .-xblackliste toto*!*@* ou *!*@000000.fr"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="BLACKLISTE"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putdcc$idx"\002$temp est supprimé de la Blackliste"}else{putdcc$idx"\002$temp n'est pas dans la Blackliste"}}bindpub A .bavlist moderation::bavproc bav {nick host hand chan arg}{variable moderation
set x 0set d ""foreach data $moderation(data){if{[lindex$data0]!="BLACKLISTE"}continueset x 1lappend d [lindex$data1]if{[llength$d]==10}{puthelp"NOTICE $nick :[join $d]"set d ""}}if{[llength$d]>0}{puthelp"NOTICE $nick :[join $d]"set d ""}if!$x{puthelp"NOTICE $nick :bavlist vide."}}bindpub A .+bav moderation::.+bav
proc .+bav {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putquick"NOTICE $nick :\2Utilisation:\2 .+bav <pseudo*!*@*> ou <*!*@host>"putquick"NOTICE $nick :\0034Exemple:\2 .+bav toto*!*@* ou *!*@000000.fr"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="BLACKLISTE"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)"BLACKLISTE [join $temp]"putquick"NOTICE $nick :\002$temp est ajouté à la Blackliste"}else{putquick"NOTICE $nick :\002 $temp déja dans la Blackliste"}}bindpub A .-bav moderation::.-bav
proc .-bav {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putquick"NOTICE $nick :\2Utilisation:\2 .-bav <pseudo*!*@*> ou <*!*@host>"putquick"NOTICE $nick :\0034Exemple:\2 .-bav toto*!*@* ou *!*@000000.fr"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="BLACKLISTE"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putquick"NOTICE $nick :\002$temp supprimé de la Blackliste"}else{putquick"NOTICE $nick :\002$temp n'est pas dans la Blackliste"}}######### Spam #########binddcc A +xspam moderation::+xspam
proc +xspam {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putdcc$idx"\2Utilisation:\2 .+xspam <mot>"putdcc$idx"\0034Exemple:\2 .+xspam www.*"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="SPAM"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)[list SPAM $temp]putdcc$idx"\002$temp est ajouté à la liste des Spams"}else{putdcc$idx"\002Erreur:\002 $temp est déja dans la liste des Spams"}}binddcc A -xspam moderation::-xspam
proc -xspam {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putdcc$idx"\2Utilisation:\2 .-xspam <mot>"putdcc$idx"\0034Exemple:\2 .-xspam www.*"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="SPAM"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putdcc$idx"\002$temp est supprimé de la liste des Spams"}else{putdcc$idx"\002$temp n'est pas dans la liste des Spams"}}bindpub A .+spam moderation::.+spam
proc .+spam {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putquick"NOTICE $nick :\2Utilisation:\2 .+spam <mot>"putquick"NOTICE $nick :\0034Exemple:\2 .+spam www.*"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="SPAM"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)[list SPAM $temp]putquick"NOTICE $nick :\002$temp est ajouté à la liste des Spams"}else{putquick"NOTICE $nick :\002 $temp est déja dans la liste des Spams"}}bindpub A .-spam moderation::.-spam
proc .-spam {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putquick"NOTICE $nick :\2Utilisation:\2 .-spam <mot>"putquick"NOTICE $nick :\0034Exemple:\2 .-spam *www*"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="SPAM"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putquick"NOTICE $nick :\002$temp est supprimé de la liste des Spams"}else{putquick"NOTICE $nick :\002$temp n'est pas dans la liste des Spams"}}bindpub A .spamlist moderation::spamlistproc spamlist {nick host hand chan arg}{variable moderation
set x 0set d ""foreach data $moderation(data){if{[lindex$data0]!="SPAM"}continueset x 1lappend d [lindex$data1]if{[llength$d]==10}{putquick"NOTICE $nick :[join $d]"set d ""}}if{[llength$d]>0}{putquick"NOTICE $nick :[join $d]"set d ""}if!$x{putquick"NOTICE $nick : Liste Spam/Pub vide."}}############ BADNICK ############binddcc A +xbadnick moderation::+xbadnick
proc +xbadnick {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putdcc$idx"\2Utilisation:\2 .+xbadnick <pseudo>"putdcc$idx"\0034Exemple:\2 .+xbadnick h-ch-f"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="BADNICK"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)[list BADNICK $temp]putdcc$idx"\002$temp est ajouté en badnick"}else{putdcc$idx"\002Erreur:\002 $temp est déja en Badnick"}}binddcc A -xbadnick moderation::-xbadnick
proc -xbadnick {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putdcc$idx"\2Utilisation:\2 .-xbadnick <pseudo>"putdcc$idx"\0034Exemple:\2 .-xbadnick h-ch-f"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="BADNICK"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putdcc$idx"\002$temp est supprimé des Badnicks"}else{putdcc$idx"\002$temp n'est pas dans les Badnicks"}}binddcc A .xbadnicklist moderation::xbadnicklistproc xbadnicklist {nick host hand chan arg}{variable moderation
set x 0set d ""foreach data $moderation(data){if{[lindex$data0]!="BADNICK"}continueset x 1lappend d [lindex$data1]if{[llength$d]==10}{putdcc$idx"[join $d]"set d ""}}if{[llength$d]>0}{putdcc$idx"[join $d]"set d ""}if!$x{putdcc$idx"BadnickListe vide."}}bindpub A .+badnick moderation::.+badnick
proc .+badnick {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putquick"NOTICE $nick :\2Utilisation:\2 .+badnick <pseudo>"putquick"NOTICE $nick :\0034Exemple:\2 .+badnick h-ch-f"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="BADNICK"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)"BADNICK [join $temp]"putquick"NOTICE $nick :\002$temp est ajouté en Badnick"}else{putquick"NOTICE $nick :\002 $temp est déja en Badnick"}}bindpub A .-badnick moderation::.-badnick
proc .-badnick {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putquick"NOTICE $nick :\2Utilisation:\2 .-badnick <pseudo>"putquick"NOTICE $nick :\0034Exemple:\2 .-badnick h-ch-f"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="BADNICK"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putquick"NOTICE $nick :\002$temp est supprimé des Badnicks"}else{putquick"NOTICE $nick :\002$temp n'est pas dans les Badnicks"}}bindpub A .badnicklist moderation::badnicklistproc badnicklist {nick host hand chan arg}{variable moderation
set x 0set d ""foreach data $moderation(data){if{[lindex$data0]!="BADNICK"}continueset x 1lappend d [lindex$data1]if{[llength$d]==10}{putquick"NOTICE $nick :[join $d]"set d ""}}if{[llength$d]>0}{putquick"NOTICE $nick :[join $d]"set d ""}if!$x{putquick"NOTICE $nick : Liste Badnick vide."}}############## EXTENSION ##############bindpub A .addanim moderation::.addanim
proc .addanim {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putquick"NOTICE $nick :\2Utilisation:\2 .addanim <pseudo*!*@*>"putquick"NOTICE $nick :\0034Exemple:\2 .addanim toto*!*@*"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="EXTENSION"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)"EXTENSION [join $temp]"putquick"NOTICE $nick :\002$temp est ajouté à la liste"}else{putquick"NOTICE $nick :\002 $temp est déja dans la liste"}}bindpub A .delanim moderation::.delanim
proc .delanim {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp=="" || ![string match *@*$temp]}{putquick"NOTICE $nick :\2Utilisation:\2 .delanim <pseudo*!*@*>"putquick"NOTICE $nick :\0034Exemple:\2 .delanim toto*!*@*"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="EXTENSION"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putquick"NOTICE $nick :\002$temp est supprimé de la liste"}else{putquick"NOTICE $nick :\002$temp n'est pas dans la liste"}}bindpub A .extensionlist moderation::extensionlistproc extensionlist {nick host hand chan arg}{variable moderation
set x 0set d ""foreach data $moderation(data){if{[lindex$data0]!="EXTENSION"}continueset x 1lappend d [lindex$data1]if{[llength$d]==10}{putquick"NOTICE $nick :[join $d]"set d ""}}if{[llength$d]>0}{putquick"NOTICE $nick :[join $d]"set d ""}if!$x{putquick"NOTICE $nick : Liste Extension vide."}}################ BADREALNAME ################binddcc A +xbadname moderation::+xbadname
proc +xbadname {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putdcc$idx"\2Utilisation:\2 .+xbadname <realname>"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="BADNAME"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)[list BADNAME $temp]putdcc$idx"\002$temp est ajouté en BadRealName"}else{putdcc$idx"\002Erreur:\002 $temp est déja en BadRealName"}}binddcc A -xbadname moderation::-xbadname
proc -xbadname {nickidx arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putdcc$idx"\2Utilisation:\2 .-xbadname <realname>"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="BADNAME"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putdcc$idx"\002$temp est supprimé des BadRealNames"}else{putdcc$idx"\002$temp n'est pas dans les BadRealNames"}}bindpub A .+badname moderation::.+badname
proc .+badname {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putquick"NOTICE $nick :\2Utilisation:\2 .+badname <realname>"return0}set x 0foreach data $moderation(data){if{[lindex$data0]=="BADNAME"&&[string tolower [lindex$data1]]==[string tolower [lindex$arg0]]}{set x 1}}if!$x{lappend moderation(data)"BADNAME [join $temp]"putquick"NOTICE $nick :\002$temp est ajouté en BadRealName"}else{putquick"NOTICE $nick :\002 $temp est déja en BadRealName"}}bindpub A .-badname moderation::.-badname
proc .-badname {nickhand host chan arg}{variable moderation
set temp [lindex$arg0]if{$temp==""}{putquick"NOTICE $nick :\2Utilisation:\2 .-badname <realname>"return0}set x 0set y 0foreach data $moderation(data){if{[lindex$data0]=="BADNAME"&&[string tolower [lindex$data1]]==[string tolower $temp]}{set moderation(data)[lreplace$moderation(data)$x$x]set y 1}incr x
}if$y{putquick"NOTICE $nick :\002$temp est supprimé des BadRealNames"}else{putquick"NOTICE $nick :\002$temp n'est pas dans les BadRealNames"}}bindpub A .badnamelist moderation::badnamelistproc badnamelist {nick host hand chan arg}{variable moderation
set x 0set d ""foreach data $moderation(data){if{[lindex$data0]!="BADNAME"}continueset x 1lappend d [lindex$data1]if{[llength$d]==10}{putquick"NOTICE $nick :[join $d]"set d ""}}if{[llength$d]>0}{putquick"NOTICE $nick :[join $d]"set d ""}if!$x{putquick"NOTICE $nick : Liste RealName vide."}}#iciset moderation(file)[filejoin scripts moderation.db]if![file exists $moderation(file)]{catch{open$moderation(file) w+} p
catch{close$p}}bindevnt - save moderation::moderation_save_fileproc moderation_save_file {type}{variable moderation
if{$moderation(data)==""}returncatch{open$moderation(file) w+} p
foreach data $moderation(data){if{$data!=""}{puts$p$data}}catch{close$p}putlog"sauvegarde de moderation.db"}set moderation(data)""catch{open$moderation(file) r} p
while{![eof$p]}{lappend moderation(data)[gets$p]}catch{close$p}proc mirc:strip{text}{regsub -all -- "\003(\[0-9\]\[0-9\]?(,\[0-9\]\[0-9\]?)?)?"$text"" text
set text [string map -nocase [list \002 "" \017 "" \026 "" \037 ""]$text]return$text}proc hostcomp {host1 host2}{string match -nocase [string map {"\["".""\]"","}[join$host1]][string map {"\["".""\]"","}[join$host2]]}proc getdata {type arg}{variable moderation
set arg [split$arg]foreach data $moderation(data){switch$type{
BADNICK {if{[lindex$data0]=="BADNICK"&&[string match -nocase *[lindex$data1]*$arg]}{return1}}
BADWORD {foreach a $arg{if{[lindex$data0]=="BADWORD"&&[string match -nocase [lindex$data1]$a]}{return1}}}
BADIDENT {if{[lindex$data0]=="BADIDENT"&&[string match -nocase *[lindex$data1]*$arg]}{return1}}
BADHOST {if{[lindex$data0]=="BADHOST"&&[hostcomp [lindex$data1]$arg]}{return1}}
BADNAME {if{[lindex$data0]=="BADNAME"&&[string match -nocase *[lindex$data1]*$arg]}{return1}}
BLACKLISTE {if{[lindex$data0]=="BLACKLISTE"&&[hostcomp [lindex$data1]$arg]}{return1}}
PROTECT {if{[lindex$data0]=="PROTECT"&&[hostcomp [lindex$data1]$arg]}{return1}}
EXTENSION {if{[lindex$data0]=="EXTENSION"&&[hostcomp [lindex$data1]$arg]}{return1}}
SPAM {foreach a $arg{if{[lindex$data0]=="SPAM"&&[string match -nocase [lindex$data1]$a]}{return1}}}}}return0}bindjoin - * moderation::joinchanproc joinchan {nick host hand chan}{variable iswho
variable raison
set host [getchanhost$nick]set host "*!*[string range $host [string first @ $host] e]"if[getdata PROTECT $nick!$host]returnif[getdata EXTENSION $nick!$host]returnif[getdata BLACKLISTE $nick!$host]{putquick"MODE $chan +b $host";putquick"KICK $chan $nick : $::raisonbav \0034$nick\0034";#putquick "notice Robot :Oui \0034B.A.V. Detect:\2 \03pour $nick!$host sur $chan\03"} if[getdata BADNICK $nick]{putquick"MODE $chan +b $host";putquick"KICK $chan $nick : $::raisonbadnick \0034$nick\0034";#putquick "notice Robot :Oui \0034Badnick Detect:\2 \03pour $nick sur $chan\03 ---> \0034Pseudo Bani:\2 $nick"}if[getdata BADHOST $nick!$host]{putquick"MODE $chan +b $host";putquick"KICK $chan $nick : $::raisonbadhost \0034host\0034";#putquick "notice Robot :Oui \0034Badhost Detect:\2 \03pour $nick sur $chan\03 ---> \0034Host Bani:\2 $host"} set iswho $chanputserv"who $nick"}bindraw - 352 moderation::whoproc who {f k a}{variable iswho
variable raison
if{$iswho!=""}{setnick[lindex$a5]set host *![lindex$a2]@[lindex$a3]set chan $iswhoset host [getchanhost$nick$chan]set host "*!*[string range $host [string first @ $host] e]"if[getdata PROTECT $nick!$host]returnif[getdata BADNAME [lrange[lindex[split$a :]1]1 end]]{putquick"MODE $chan +b $host";putquick"KICK $chan $nick : $::raisonbadname \0034$host\0034";#putquick "notice Robot :Oui \0034Badname Detect:\2 \03pour $nick sur $chan\03 ---> \0034Realname Bani:\2 [lrange [lindex [split $a :] 1] 1 end]"}set iswho ""}}bindpubm - * moderation::badspamproc badspam {nick host hand chan arg }{set arg [mirc:strip$arg]set arg [stripcodes bcruag $arg]set host [getchanhost$nick$chan]set host "*!*[string range $host [string first @ $host] e]"if[getdata PROTECT $nick!$host]returnif[getdata SPAM $arg]{putquick"MODE $chan +b $host";putquick"KICK $chan $nick : $::raisonspam \0034Interdit sur $chan\0034";#putquick "notice Robot :Oui \0034Spam/Pub Detect:\2 \03pour $nick sur $chan\03 ---> \0034Spam/Pub Bani:\2 $arg"} if[getdata BADWORD $arg]{putquick"MODE $chan +b $host";putquick"KICK $chan $nick : $::raisonbadword \0034$arg\0034";#putquick "notice Robot :Oui \0034Badword Detect:\2 \03pour $nick sur $chan\03 ---> \0034Mot Bani:\2 $arg"}}bindnick - * moderation::newnickproc newnick {nick host hand arg newnick}{if[getdata PROTECT $nick!$host]returnif[getdata EXTENSION $nick!$host]returnforeach chan [channels]{if{[onchan$newnick$chan]&&[getdata BADNICK $newnick]}{set host [getchanhost$nick]set host "*!*[string range $host [string first @ $host] e]"putquick"MODE $chan +b $host";putquick"KICK $chan $newnick : $::raisonbadnick \0034$newnick\0034";#putquick "notice Robot :Oui \0034On-AiR Detect:\2 \03pour $nick sur $chan\03"} }}}putlog"\0031\[\0034Moderation.tcl\0031\] Loaded"
NB regarde le code entier pour connaître les commandes, si le code fonctionne correctement, je vais le mettre en téléchargement sur le site avec un système d'aide et explicatifs des commandes au TCL
Fait un retour du code dès que tu peut merci !
Vous interdisez les erreurs, vous empêchez ainsi la victoire.