Je regarde après mais la sa risque de chier pour toi.
Si tu détruit tout en moins de 5 minutes sa va être chiant..
Je pense ta voulut faire des trucs mais que tu as du mal compris certaines choses, donc ont en reparle après.
De plus je t'avais dit d'oublier le truc de modération hein !! "Tu n'a pas vue ?"
Et le tcl faut pas non plus lui mettre des truc de bombe etc.. un tcl de bombe, un autre de modération, et celui ci pour la gestion à la rigueur.
Ont en reparle après et je vais corrigé le code en te disant les erreurs. mais touche à plus rien ABSOLUMENT PLUS RIEN.
Jusqu'à que j'intervienne.
24/03/2014, 21:30 (Modification du message : 24/03/2014, 21:32 par aliasangelius.)
Re,
Demain, TCL modération mis à disposition en téléchargement, Ton code refait, et un tcl de bombe séparer du code que tu a fait.
PS : Evite les code de modération de Platine ils sont bugs :).
Demain je te refait tout ça au propre, avec des choses correctes et bien faites..
Avec des explications, mais avant tout je pense va falloir que tu comprenne certaines choses.
Tu n'a pas du tout comprendre "si tu a des questions même les plus stupides dis les moi", je t'aiderais à mieux comprendre.
C'est faisant des questions, et avec ça moi je ferait des exemples etc..
Et là tu comprendrais mieux je pense, Ne fonce pas tête baisser comme je l'ai fais y'a une époque.. Sois pas aussi stupide que moi, prend ton temps de comprendre, demande, poses des questions, demande de l'aide, fait des post, renseigne toi dans les codes, regarde le wiki..
Ont sera toujours là pour te guider et t'aider s'il le faut ! Alors fait pas le têtu :p
A demain pour repartir sur de très bonne bases avec 3 codes remis au propres.
PS : "Le code de modération" sera mis ici je vais peut-être le mettre en téléchargement mais pas sur.
NB : Les codes mirc aussi, faudrais je te file un lien de ceci demain.
Code TCL utilisé les codes couleurs propres au TCL.
Nous voyons tout cela demain ;)
Donc voici les code TCL, je vais te les mettre tous, ainsi que des liens dont 2 pour télécharger des tcl.
Premièrement, j'ai enlever tout ce qui et ta partie modération, car franchement je la trouver pas terrible, la maintenant tu aura un truc de correct.
Ensuite, tu utilise des trucs comme bière etc.. sache que CrazyCat, avais fait un tcl qui se nomme "Joke.tcl", il et parfait pour ce type de chose.
Donc tu ira le télécharger je te mais le lien plus bas.
Après pour ce qui et des couleurs dans t'es codes sous format "mirc", bof.. TCL doit avoir c'est propres couleurs !
Je vais donc te donner le lien d'un TCL de MenzAgitat, qui et très utilise et te dira quoi faire, tu lira la description et tu verra que le code et sympa pour les débutant.
Ensuite, pour ce qui et de l'identification à nickserv, je t'ai mis le code de CrazyCat, simple et efficace.
Je n'es pas toucher à ton truc de oper par contre.
Pour ce qui et du tcl de bombe, Idem dans un autre code tcl.
Lorsque tu fait un TCL, ne regroupe pas tout les tcl en un seul.. sinon sa risque de pas mal merder.
De plus la tu fait par exemple : aurore.tcl "Pour ce qui et la gestion des sockets, commande voice, kick..",
Joke.tcl "pour tout ce qui et !bière etc..",
Bombe.tcl "pour tout ce qui et de !bombe" etc..
Différencie t'es tcl, fait en plusieurs.
Maintenant un truc à savoir.
tu va rajouter dans le tcl de socket par exemple ceci :
tcl
bind pub n "!xdevoice"[namespace current]::xdevoiceproc xdevoice { nick handle uhost chan text }{
putdcc $aurore(idx)":$aurore(nick) MODE $chan -v $nick"
putdcc $aurore(idx)":$aurore(nick) NOTICE $nick Merci d'avoir animé $nick"}
La le code va planter.. Pourquoi ?
tu appel la variable "$aurore", hors tu ne la déclara pas dans la proc.
Toi tu avais fait ceci :
tcl
bind pub n "!xdevoice"[namespace current]::xdevoiceproc xdevoice { nick handle uhost chan text }{global aurore
putdcc $aurore(idx)":$aurore(nick) MODE $chan -v $nick"
putdcc $aurore(idx)":$aurore(nick) NOTICE $nick Merci d'avoir animé $nick"}
Là tu avais rajouter global, hors ceci et faux.
Tu ne fait pas global lorsque tu fait du namespace, car le namespace gère deja le global.
Comme si tu faisait "global botnick", pour ensuite appeler "$botnick".
Maintenant regarde comment ont fait :
tcl
bind pub n "!xdevoice"[namespace current]::xdevoiceproc xdevoice { nick handle uhost chan text }{variable aurore
putdcc $aurore(idx)":$aurore(nick) MODE $chan -v $nick"
putdcc $aurore(idx)":$aurore(nick) NOTICE $nick Merci d'avoir animé $nick"}
Je ne fait que mettre "variable aurore", et sa résous ton soucis.
Bon maintenant voici le code socket refait :
tcl
#*************************************************## Système de sockets pour le réseaux Aurel-Tchat. ## Fait par alias_angelius avec BaGrift. ##*************************************************#namespaceeval ::socks{variable aurore
#********************## Service.Socket 1.0 ##********************#
#**************************## Information link reseau. ##**************************#set aurore(serv)"Aurore.Aurel-Tchat.fr"set aurore(ip)"91.121.193.88"set aurore(port)"7000"set aurore(pwdlink)"12345678"set aurore(info)"Aurore Services"
#****************************## Configuration des sockets. ##****************************#set aurore(nick)"Aurore"set aurore(identd)"Aurore"set aurore(host)"Aurore.Aurel-Tchat.fr"set aurore(nom)"Aurore Service Moderation"
#***************************## Salon de log des sockets. ##***************************#set aurore(log)"#Anonymes"set aurore(salon)"#Accueil"set aurore(staff)"#Staff"set aurore(quit01)"Redemarage Aurore-Service."set aurore(quit02)"Fermeture Aurore-Service."
#****************************************## Lancement de la procédure des sockets. ##****************************************#proc checkconnect {}{if{![info exists aurore(idx)]}{ utimer 30[namespace current]::checkconnect}else{ xconnect:serv }}proc xconnect:serv {}{variable aurore
if[catch{set aurore(idx)[connect $aurore(ip)$aurore(port)]} err]{
putlog "Connection error :$err"return}
putdcc $aurore(idx)"PASS $aurore(pwdlink)"
putdcc $aurore(idx)"SERVER $aurore(serv) 1 [unixtime] :$aurore(info)"
putdcc $aurore(idx)":$aurore(serv) NICK $aurore(nick) '' '' $aurore(identd) $aurore(host) $aurore(serv) '' :$aurore(nom)"
putdcc $aurore(idx)":$aurore(nick) MODE $aurore(nick) +oOSqsw"
putdcc $aurore(idx)":$aurore(nick) JOIN $aurore(log)"
putdcc $aurore(idx)":$aurore(nick) JOIN $aurore(salon)"
putdcc $aurore(idx)":$aurore(nick) MODE $aurore(log) +ntsv $aurore(nick)"
control $aurore(idx)[namespace current]::controling_server
utimer 10[namespace current]::verify}
#***********************************## Verify si le serveur est Connecté ##***********************************#proc verify {}{variable aurore
if[valididx [set[namespace current]::aurore(idx)]]{
utimer 30[namespace current]::verify}else{
xconnect:serv
}}proc controling_server {idx arg}{variable aurore
set arg1 [lindex[split$arg" "]0]set arg2 [lindex[split$arg" "]1]set arg3 [lindex[split$arg" "]2]set arg4 [lindex[split$arg" "]3]set arg5 [lindex[split$arg" "]4]set arg6 [lindex[split$arg" "]5]set arg7 [lindex[split$arg" "]6]set arg8 [lindex[split$arg" "]7]set arg10 [string trim [lrange[split$arg" "]3 end] :]if{$arg2=="PING"}{
putdcc $aurore(idx)":$aurore(serv) PONG $aurore(ip) :$aurore(serv)"}}
#**********************## Restart des sockets. ##**********************#
bind evnt - prerestart [namespace current]::eva:restart
proc eva:restart {args}{variable aurore
putdcc $aurore(idx)":$aurore(serv) SQUIT $aurore(serv) :Restart Sockets."catch{close$aurore(idx)}}
#********************## Rehash du Service. ##********************#
bind dcc n xrehash [namespace current]::eggy:xrehash
proc eggy:xrehash {nick idx arg}{variable aurore
putdcc $idx"\002Rehash de Aurore-Service et des fichiers\002"
utimer 4 rehash
}
#*********************## Restart du Service. ##*********************#
bind dcc n xrestart [namespace current]::eggy:xrestart
proc eggy:xrestart {nick idx arg}{variable aurore
putdcc $idx"\002Redémarrage de Laura-service\002"if[valididx [set[namespace current]::aurore(idx)]]{
putdcc $aurore(idx)":$aurore(nick) QUIT :$aurore(quit01)"
putdcc $aurore(idx)":$aurore(serv) SQUIT :$aurore(serv)"catch{close$aurore(idx)}foreach kill [utimers]{if{[lindex$kill1]=="[namespace current]::verify"}{ killutimer [lindex$kill2]}}}
xconnect:serv
}
#*****************## Die du Service. ##*****************#
bind dcc n xdie [namespace current]::eggy:xdie
proc eggy:xdie {nick idx arg}{variable aurore
putdcc $idx"\002Arrêt de Aurore-Service\002"if[valididx [set[namespace current]::aurore(idx)]]{
putdcc $aurore(idx)":$aurore(nick) QUIT : $aurore(quit02)"
putdcc $aurore(idx)":$aurore(serv) SQUIT :$aurore(quit02)"catch{close$aurore(idx)}foreach kill [utimers]{if{[lindex$kill1]=="[namespace current]::verify"}{ killutimer [lindex$kill2]}}}}
#**********************## Xvoice pour anim ##**********************#
bind pub n "!xvoice"[namespace current]::xvoiceproc xvoice { nick handle uhost chan text }{variable aurore
putdcc $aurore(idx)":$aurore(nick) MODE $chan +v $nick"
putdcc $aurore(idx)":$aurore(nick) NOTICE $nick Bonne Moderation !"
putdcc $aurore(idx)":$aurore(nick) NOTICE $nick Pour savoir mais commandes de modération tape !modere"
putdcc $aurore(idx)":$aurore(nick) NOTICE $nick Pence Bien a te devoice quand tu anim plus ! => !xdevoice Merci"
putquick "SAJOIN $nick $aurore(staff)"}
#********************## Xdevoice pour anim ##********************#
bind pub n "!xdevoice"[namespace current]::xdevoiceproc xdevoice { nick handle uhost chan text }{variable aurore
putdcc $aurore(idx)":$aurore(nick) MODE $chan -v $nick"
putdcc $aurore(idx)":$aurore(nick) NOTICE $nick Merci d'avoir animé $nick"}
#**************## Kick Pseudo. ##**************#
bind pub n "!kick"[namespace current]::kickproc kick { nick hand host chan arg }{variable aurore
set nick [lindex$arg0]
putdcc $aurore(idx)":$aurore(nick) KICK $chan $nick Merci de rester calme !"return0}
#*************## Ban Pseudo. ##*************#
bind pub n "!kb" pub:kb
proc pub:kb { nick hand host chan arg }{variable aurore
# Ici j'ai changer ton set, pour split sur un host.set nik [lindex[split$nick!]0] # Ici je re split sur l'host.set host [lindex[split$nick!]1] # Ici je re set arg, au cas ou plus tard faudra faire une modification.set arg [lindex[split$args]1 end] # Maintenant ont ban sur le nick et le host.
putdcc $aurore(idx)":$aurore(nick) $chan +b $nik!$host"
putdcc $aurore(idx)":$aurore(nick) KICK $chan $nick Reste Cool Banni !"}
#**************## Appel Ircop. ##**************#
bind pub n "!appel"[namespace current]::appelproc appel { nick uhost handle chan arg }{variable aurore
putdcc $aurore(idx)":$aurore(nick) PRIVMSG $aurore(log) $nick Appel un IRCop sur $chan"
putdcc $aurore(idx)":$aurore(nick) NOTICE $nick Les IRCops on ete appelé"}
#****************## Help Commande. ##****************#
bind pub X "!modere"[namespace current]::helpproc help { nick uhost handle chan arg }{variable aurore
set commande [lindex$arg1]set commande [stripcodes abcu [lindex$arg0]]if{$commande == ""}{
putdcc $aurore(idx)":$aurore(nick) privmsg $nick :\00314Commande Help du Robot \002\0034$::botnick\002\0034"
putdcc $aurore(idx)":$aurore(nick) privmsg $nick :\017"
putdcc $aurore(idx)":$aurore(nick) privmsg $nick :\0034!xvoice\0034 \0031a utilisé que quand vous moderé sous peine de sanction!\0031"
putdcc $aurore(idx)":$aurore(nick) privmsg $nick :\0034!xdevoice\0034 \0031a faire quand vous avez fini de moderé !\0031"
putdcc $aurore(idx)":$aurore(nick) privmsg $nick :\0034!kick\0034 \0031sert a kické un user du salon !\0031"
putdcc $aurore(idx)":$aurore(nick) privmsg $nick :\0034!kb\0034 \0031Sert a kick/ban un user du salon !\0031"
putdcc $aurore(idx)":$aurore(nick) privmsg $nick :\0034!appel\0034 \0031sert a appelé les IRCop en cas de grosse perturbation sur le salon !\0031"
putdcc $aurore(idx)":$aurore(nick) privmsg $nick :\0034!chut\0034 \0031sert a coupé la parole a un user pendant 3minute !\0031"
putdcc $aurore(idx)":$aurore(nick) privmsg $nick :\00314Fin Help du Robot \002\0034$::botnick\002\0034"}}
#****************************## Fin du Service Sockets 1.0 ##****************************## connection [namespace current]::xconnect:serv
}
putlog "\0031Service Sockets 1.0 \0034Chargé."
Le tcl de modération :
tcl
namespaceeval moderation {variable moderation
#Salon logsset ::chanbotlog"#ircops"
#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 ###############
bind dcc A +xprotect moderation::+xprotect
proc +xprotect {nick idx 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"}}
bind dcc A -xprotect moderation::-xprotect
proc -xprotect {nick idx 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"}}
# ici
bind pub L .+protect moderation::.+protect
proc .+protect {nick hand 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"}}
bind pub L .-protect moderation::.-protect
proc .-protect {nick hand 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"}}
bind pub L .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 ############
bind dcc A +xbadword moderation::+xbadword
proc +xbadword {nick idx 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"}}
bind dcc A -xbadword moderation::-xbadword
proc -xbadword {nick idx 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"}}
bind pub L .+badword moderation::.+badword
proc .+badword {nick hand 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"}}
bind pub L .-badword moderation::.-badword
proc .-badword {nick hand 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"}}
bind pub L .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 ############
bind dcc A +xbadhost moderation::+xbadhost
proc +xbadhost {nick idx 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"}}
bind dcc A -xbadhost moderation::dcc:-xbadhost
proc dcc:-xbadhost {nick idx 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"}}
bind pub L .+badhost moderation::.+badhost
proc .+badhost {nick hand 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"}}
bind pub L .-badhost moderation::.-badhost
proc .-badhost {nick hand 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"}}
bind pub L .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 ###############
bind dcc A +xblackliste moderation::+xblackliste
proc +xblackliste {nick idx 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"}}
bind dcc A -xblackliste moderation::-xblackliste
proc -xblackliste {nick idx 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"}}
bind pub L .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."}}
bind pub L .+bav moderation::.+bav
proc .+bav {nick hand 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"}}
bind pub L .-bav moderation::.-bav
proc .-bav {nick hand 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 #########
bind dcc A +xspam moderation::+xspam
proc +xspam {nick idx 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"}}
bind dcc A -xspam moderation::-xspam
proc -xspam {nick idx 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"}}
bind pub L .+spam moderation::.+spam
proc .+spam {nick hand 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"}}
bind pub L .-spam moderation::.-spam
proc .-spam {nick hand 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"}}
bind pub L .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 ############
bind dcc A +xbadnick moderation::+xbadnick
proc +xbadnick {nick idx 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"}}
bind dcc A -xbadnick moderation::-xbadnick
proc -xbadnick {nick idx 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"}}
bind pub L .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}{
puthelp "NOTICE $nick :[join $d]"set d ""}}if{[llength$d]>0}{
puthelp "NOTICE $nick :[join $d]"set d ""}if!$x{puthelp "NOTICE $nick :BadnickListe vide."}}
bind pub L .+badnick moderation::.+badnick
proc .+badnick {nick hand 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"}}
bind pub L .-badnick moderation::.-badnick
proc .-badnick {nick hand 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"}}
bind pub L .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 ##############
bind pub L .addanim moderation::.addanim
proc .addanim {nick hand 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"}}
bind pub L .delanim moderation::.delanim
proc .delanim {nick hand 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"}}
bind pub L .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 ################
bind dcc A +xbadname moderation::+xbadname
proc +xbadname {nick idx 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"}}
bind dcc A -xbadname moderation::-xbadname
proc -xbadname {nick idx 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"}}
bind pub L .+badname moderation::.+badname
proc .+badname {nick hand 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"}}
bind pub L .-badname moderation::.-badname
proc .-badname {nick hand 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"}}
bind pub L .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}}
bind evnt - 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}
bind join - * moderation::joinchanproc joinchan {nick host hand chan}{variable iswho
variable raison
set host [getchanhost $nick$chan]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"; 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"; 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"; putquick "notice Robot :Oui \0034Badhost Detect:\2\03pour $nick sur $chan\03 ---> \0034Host Bani:\2 $host"}set iswho $chan
putserv "who $nick"}
bind raw - 352 moderation::whoproc who {f k a}{variable iswho
variable raison
if{$iswho!=""}{set nick [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"; putquick "notice Robot :Oui \0034Badname Detect:\2\03pour $nick sur $chan\03 ---> \0034Realname Bani:\2 [lrange [lindex [split $a :] 1] 1 end]"}set iswho ""}}
bind pubm - * 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"; 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"; putquick "notice Robot :Oui \0034Badword Detect:\2\03pour $nick sur $chan\03 ---> \0034Mot Bani:\2 $arg"}}
bind nick - * 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$chan]set host "*!*[string range $host [string first @ $host] e]"
putquick "MODE $chan +b $host"; putquick "KICK $chan $newnick : $::raisonbadnick"; putquick "notice Robot :Oui \0034On-AiR Detect:\2\03pour $nick sur $chan\03"}}}}
Le tcl de oper :
tcl
#******## OPER ##******#
### config ##### Mettre ici le nick d'ircop de votre Robot##set opernick "Aurore"## Mettre ici le password de l'oline de votre robot##set password "12345678"
################################### BIND ###################################
bind raw - "001" opernick
################################### Proc ###################################proc opernick {from key text}{global opernick password
putserv "OPER $opernick $password"
putserv "WALLOPS :Je Suis Désormais Un IRCOP"return0}
#********************## Register NickServ ##********************#namespaceeval AnopIdent {variable nickserv "NickServ"variable chanserv "ChanServ"variable nspass "12345678"
bind notc - "*IDENTIFY*" AnopIdent::ident}proc AnopIdent::ident{nick uhost handle text {dest ""}}{if{$dest == ""}{set dest $::botnick}if{[string tolower $nick]!=[string tolower $AnopIdent::nickserv]}{return0}
putserv "PRIVMSG $AnopIdent::nickserv :identify $AnopIdent::nspass"return0}
putlog "Initialization loaded"[/tcl
Le tcl de bombe :
[tcl]# bombe.tcl# !bomb <pseudo># !cut <couleur>
bind pub - !bomb bombe:pub
bind pub - !cut cut:pub
set fils(couleur){
jaune
rouge
marron
bleu
vert
noir
violet
orange
gris
cyan
blanc
fushia
}set bombe(set)0set bombe(nick)""set bombe(kickeur)""set bombe(good)""set bombe(list)""set bombe(timer)""set bombe(chan)""set bombe(antifloodt)""set bombe(antiflood)0set bombe(antiflood2)0proc antiflood:bomb {chan}{global bombe
if{$bombe(antiflood)>= 3}{if{$bombe(antiflood2) == 1}{return0}
putserv "PRIVMSG $chan :Contrôle de flood activé pour la commande !bomb : pas plus de 3 requête(s) toutes les 200 secondes."set bombe(antiflood2)1set bombe(antifloodt)[utimer 200{set bombe(antiflood)0;set bombe(antiflood2)0}]return0}else{incr bombe(antiflood)}}proc filtout {chan text}{if[string match "*c*"[getchanmode $chan]]{return[stripcodes abcgru $text]}else{return$text}}proc bombe:pub {nick uhost hand chan arg}{global fils bombe botnick
if{[string tolower [lindex$arg0]] == [string tolower $botnick]}{
putkick $chan$nick[filtout $chan"\00313O\0031wned \00313<3"]return0}if{$bombe(set) == 1}{set msg [filtout $chan"\00314Bombe \|\0034Le jeu est deja en cours d'utilisation."]
putserv "PRIVMSG $chan :$msg"return0}if{[lindex$arg0] == ""}{set msg [filtout $chan"\00314Bombe\003 \| !bomb PSEUDO"]
putserv "PRIVMSG $chan :$msg"return0}if{![antiflood:bomb $chan]}{return0}set bombe(set)1set bombe(nick)[lindex$arg0]set bombe(kickeur)$nickset cdf [rand 4]incr cdf
set x 0set bombe(chan)$chanset bombe(timer)[utimer 30{putkick $bombe(chan)$bombe(nick)[filtout $bombe(chan)"\002Boum !!!\002 Temps écoulé !"];set bombe(set)0}]while{$x<=$cdf}{if{$x == 0}{set bombe(list)""}set bombe(list)"$bombe(list) [lindex $fils(couleur) [rand [llength $fils(couleur)]]]"incr x
}set bombe(good)[lindex$bombe(list)[rand [llength$bombe(list)]]]
putlog "$bombe(list) + $bombe(good)"set msg [filtout $chan"\00314Bombe \|\0031Attention\0034 $bombe(nick) \0031Tu dois couper le bon fil tu as 30 secondes :\0034 $bombe(list) \0031( !cut couleur )"]
putserv "PRIVMSG $chan :$msg"}proc cut:pub {nick uhost hand chan arg}{global bombe
if{$bombe(set) == 1}{if{$nick == $bombe(nick)}{if{[lindex$arg0] == $bombe(good)}{set msg [filtout $chan"\00314Bombe \|\0031Joli\0034 $nick !! Tu as trouvé le bon fil \0031:D"]
putserv "PRIVMSG $chan :$msg"}else{set msg
putkick $chan$nick[filtout $chan"\00314Boum !! Dtc !! Le bon fil était\0034 $bombe(good)"]}set bombe(set)0
killutimer $bombe(timer)}else{set msg [filtout $chan"\00314Bombe\003 \| C'est a $bombe(nick) de couper le fil !"]
putserv "PRIVMSG $chan :$msg"}}}
putlog "\[bomb\] a été chargé."
Maintenant, j'ai enlever ton code de shun, car j'ai trouver un code tcl idem de MenzAgitat bien plus sympa.
Test et tu verra, qu'il et plus sympa que le shun ce code ci : http://scripts.eggdrop.fr/details-Auto+S...-s167.html
Tu fait tout celà ensuite tu test le tout, et SURTOUT ne mélange pas tout les codes TCL ensemble.
Nous sommes là pour vous aidez, mais essayer de nous aidez en retour en ne faisant pas ce genres de choses lol..
Si tu ne comprend pas certaines choses, que tu aurais un doute, ou que tu serais pas faire ou autres choses..
Surtout n'hésite pas, demande je serait content de pouvoir t'aider, au contraire je ne demande que cela d'aider.
Et c'est en posant des questions, en essayant ou autres, que l'ont apprend.
Tu fait des erreurs ce n'es pas grave, Mais HESITE PAS ! à poser des questions :)
Voila bon test avec tout les codes transmis, avec un beau code de moderation etc.
Lorsque tu es sur ton server, tu reçois une notice "comme quoi le link se fait ?".
Et tu appel quoi par il se connecte pas ?
Sois précis sinon je pourrais pas t'aider avec si peux d'informations, comme si tu faisait un TCl et que je te disait "sa fonctionne pas".