Module complet de protection de salon. (pour bot etant ircop)
Source / Exemple :
;
;
; MProtection v1.0 by juki (juki@noos.fr)
; Commentaire, aide ou amelioration sur http://forum.invitia.com/ Parti IRC,discussion irc.
; Permet :
; - Interdire certain pseudo
; - Autolimite pour eviter une attaque de clone
; - Protection anti masse action (message en /me)
; - Protection anti flood/pub sur action et text
; - Interdiction d'ecrire en couleur
; - Interdiction d'ecrire en gras
; ...
; v1.1 arrivera avec : optimisation au maximum du code (plus rapide), detection crasheur dcc (proximativement), anti MAJUSCULES...
; Projet conçut en 5 heures (TOUT SEUL pendant les vacances(faut bien se posser)) .
; N'enelver pas les droit d'auteur, faite vivre l'OPEN SOURCE sans copyright sans licence... et sourtout respecter mon travaille pour l'aide de tous.
; Si vous avez des ameliorations à me dire => http://forum.invitia.com/
; Pour la gestion des pseudos interdit il faut modifier le code sinon être ircop .
; USAGE PREFERABLE POUR BOT ETANT IRCOP (plus le mode +q) &OP UN PEU PARTOUT, et noubliez pas de faire /ignore -wd* .
; Faite en bon usage :)
;
;
alias ifsoutiloper {
dialog -m ifsoutiloper ifsoutiloper
}
dialog ifsoutiloper {
title "oper"
size -1 -1 132 86
option dbu
text "Login :", 1, 1 1 18 8
text "Pass :", 2, 1 11 18 8
edit "", 3, 20 0 49 10
edit "", 4, 20 10 49 10
button "Connexion", 5, 69 1 31 18
button "Fermer", 6, 100 1 31 18, ok
box "Memo des onlines tapez", 7, 1 21 129 64
list 8, 2 37 47 47, size vsbar
list 9, 49 37 47 47, size vsbar
text "Login", 10, 17 28 14 8
text "Pass", 11, 65 28 13 8
button "Ajouter", 13, 96 26 31 56
}
on *:dialog:ifsoutiloper:sclick:5:{
if ($did(ifsoutiloper, 3) != $null) && ($did(ifsoutiloper, 4) != $null) { echo -a Tentative de oper avec login : $did(ifsoutiloper, 3) pass : $did(ifsoutiloper, 4) ... | oper $did(ifsoutiloper, 3) $did(ifsoutiloper, 4) | write online_login.txt $did(ifsoutiloper, 3) | write online_pass.txt $did(ifsoutiloper, 4) | halt }
else { echo -a Vous n'avez pas remplit les deux chan pour vous oper | halt }
}
on *:dialog:ifsoutiloper:sclick:13:{
write online_login.txt $$?="Entrer le login à memoriser :"
write online_pass.txt $$?="Entrer le passe qui est associer à ce login :"
echo -a Nouvel online memoriser
}
alias ifsoutiloperactu {
did -r ifsoutiloper 8
loadbuf -o ifsoutiloper 8 online_login.txt
did -r ifsoutiloper 9
loadbuf -o ifsoutiloper 9 online_pass.txt
}
on *:dialog:ifsoutiloper:init:0:{
ifsoutiloperactu
}
on *:join:#:{
if ($nick == $me) { halt }
else {
if ($chan == $read(al_chan.txt,w,$chan)) { timeraljoine [ $+ [ $chan ] ] 1 %alconft mode $chan +l $calc($nick($chan,0)+%alconfl) }
if ($nick == $read(mn_list.txt,w,$nick)) { kill $nick Pseudo interdit, merci de le changer. | halt }
else { halt }
}
}
on ^1:nick:{
if ($newnick == $read(mn_list.txt,w,$newnick)) { kill $newnick Pseudo interdit, merci de le changer. | halt }
else { halt }
}
; PANEL DES PSEUDO INTERDIT
alias madnickpanel {
dialog -m madnickpanel madnickpanel
}
dialog madnickpanel {
title "MadNick"
size -1 -1 154 66
option dbu
box "Liste des pseudos interdit", 1, 1 1 81 64
list 2, 2 7 79 45, size vsbar
button "Ajouter", 3, 3 52 38 11
button "Enlever", 4, 42 52 38 11
box "Aide", 5, 83 1 70 64
text "Ce module permet d'interdire certain pseudo incorect . Ont les reperes de deux façon : -Changement de nick et -Lors d'un JOIN. Imediatement la personne est kill .", 6, 85 7 66 56
}
on *:dialog:madnickpanel:sclick:4: {
write $+(-dl,$did(madnickpanel,2).sel) mn_list.txt
madnickpanelactuc
}
on *:dialog:madnickpanel:sclick:3: {
set -u2 %tempmnlistadd $$?"Entrez le nick :"
write mn_list.txt %tempmnlistadd
echo -a Configuration mise à jour sur le module 'madnick', pseudo interdit %tempmnlistadd ajouter .
madnickpanelactuc
}
alias madnickpanelactuc {
loadbuf -o madnickpanel 2 mn_list.txt
}
on *:dialog:madnickpanel:init:0:{
madnickpanelactuc
}
; PANEL DE L'AUTO-LIMITE
alias alpanel {
dialog -m alpanel alpanel
}
dialog alpanel {
title "AutoLimite"
size -1 -1 142 96
option dbu
box "Configuration", 1, 1 1 74 38
text "Limite :", 2, 3 8 19 8
edit "", 3, 23 7 50 9
text "Temps :", 4, 3 17 19 8
edit "", 5, 23 16 50 9
button "Valider ce parametre", 6, 2 26 71 11
box "Salon proteger (max 10)", 7, 1 39 74 56
list 8, 2 46 71 36, size vsbar
button "Ajouter", 9, 2 82 35 11
button "Enlever", 10, 38 82 35 11
box "Aide", 11, 76 1 65 94
text "L autolimite permet de ralentir fortement une attaque soubite de clone. Elle doit être bien configurer pour ne pas laisser des gens dehors ou laisser trop d espace. Il est conseiller de fixer la limite du mode +l incremente a environ Limite : 3, Temps : 9.", 12, 78 8 61 85
}
alias alpanelactuc {
loadbuf -o alpanel 8 al_chan.txt
}
on *:dialog:alpanel:init:0:{
alpanelactuc
}
on *:dialog:alpanel:sclick:6:{
if ($did(alpanel, 3) != $null) && ($did(alpanel, 5) != $null) { set %alconfl $did(alpanel, 3) | set %alconft $did(alpanel, 5) | echo -a 4|5Spamite4|3Configuration mise à jour sur le module 'autolimite', valeur de la protection mise à jour à L : $did(alpanel, 3) T : $did(alpanel, 5) | halt }
else { echo -a non! ta oublier de remplir en moin un des champs ! | halt }
}
on *:dialog:alpanel:sclick:10: {
write $+(-dl,$did(alpanel,8).sel) al_chan.txt
alpanelactuc
}
on *:dialog:alpanel:sclick:9: {
set -u2 %tempalchanadd $$?"Entrez le salon :"
write al_chan.txt %tempalchanadd
echo -a Configuration mise à jour sur le module 'autolimite', salon ajouter à la protection %tempalchanadd .
alpanelactuc
}
on 1:action:*:#:{
if (www. isin $1-) { ban $chan $nick | notice $nick La publicité est interdite. }
if (http. isin $1-) { ban $chan $nick | notice $nick La publicité est interdite. }
if (/server isin $1-) { ban $chan $nick | notice $nick La publicité est interdite. }
if (%aactionstatut == on) {
if (%floodaction [ $+ [ $nick ] ] >= 1) {
if (%floodaction [ $+ [ $nick ] ] <= 4) { inc %floodaction [ $+ [ $nick ] ] 1 | halt }
if (%floodaction [ $+ [ $nick ] ] >= 5) { unset %floodaction [ $+ [ $nick ] ] | ban $chan $address($nick,2) | notice $nick Cesse de flooder en 'action' | halt }
}
else { set -u10 %floodaction [ $+ [ $nick ] ] 1 | halt }
}
else { halt }
}
alias aaction {
dialog -m aactionpanel aactionpanel
}
dialog aactionpanel {
title "Anti-Mass-Action"
size -1 -1 94 24
option dbu
button "Activé", 1, 1 1 46 11
button "Desactivé", 2, 47 1 46 11
button "Fermer", 3, 1 12 92 11, ok
}
on *:dialog:aactionpanel:sclick:1:{
if (%aactionstatut == on) { echo -a Le protection anti-mass-action est deja activé ! | halt }
else { set %aactionstatut on | echo -a La protection anti-mass-action vient d'etre activé . | ame : Protection anti-mass-action activé... | halt }
}
on *:dialog:aactionpanel:sclick:2:{
if (%aactionstatut == off) { echo -a Le protection anti-mass-action est deja desactivé ! | halt }
else { set %aactionstatut off | echo -a La protection anti-mass-action vient d'etre desactivé . | ame : Protection anti-mass-action desactivé. | halt }
}
on *:text:*:#:{
if (www. isin $1-) { ban $chan $nick | notice $nick La publicité est interdite. }
if (http: isin $1-) { ban $chan $nick | notice $nick La publicité est interdite. }
if (/server isin $1-) { ban $chan $nick | notice $nick La publicité est interdite. }
if ( isin $1-) {
if (%acouleurstatut == on) { ban $chan $nick | notice $nick Les couleurs sont interdite sur $chan | halt }
else { halt }
}
if ( isin $1-) {
if (%agrasstatut == on) { ban $chan $nick | notice $nick Le texte en gras est interdit sur $chan | halt }
else { halt }
}
if ($len($1-) > 200) {
if (%alongstatut == on) { kick $chan $nick Fait des phrases plus courtes, svp | halt }
else { halt }
}
if (%atxtfloodstatut == on) {
if (%floodtxt [ $+ [ $nick ] ] >= 1) {
if (%floodtxt [ $+ [ $nick ] ] <= 4) { inc %floodtxt [ $+ [ $nick ] ] 1 | halt }
if (%floodtxt [ $+ [ $nick ] ] >= 5) { unset %floodtxt [ $+ [ $nick ] ] | ban $chan $address($nick,2) | notice $nick Cesse de flooder ! | halt }
}
else { set -u10 %floodtxt [ $+ [ $nick ] ] 1 | halt }
}
else { halt }
}
alias atxtfood {
dialog -m atxtfoodpanel atxtfoodpanel
}
dialog atxtfoodpanel {
title "Anti-Texte-Flood"
size -1 -1 94 24
option dbu
button "Activé", 1, 1 1 46 11
button "Desactivé", 2, 47 1 46 11
button "Fermer", 3, 1 12 92 11, ok
}
on *:dialog:atxtfoodpanel:sclick:1:{
if (%atxtfloodstatut == on) { echo -a Le protection anti-texte-flood est deja activé ! | halt }
else { set %atxtfloodstatut on | echo -a La protection anti-texte-flood vient d'etre activé . | ame : Protection anti-texte-flood activé... | halt }
}
on *:dialog:atxtfoodpanel:sclick:2:{
if (%atxtfloodstatut == off) { echo -a Le protection anti-texte-flood est deja desactivé ! | halt }
else { set %atxtfloodstatut off | echo -a La protection anti-texte-flood vient d'etre desactivé . | ame : Protection anti-texte-flood desactivé. | halt }
}
alias acouleur {
dialog -m acouleurpanel acouleurpanel
}
dialog acouleurpanel {
title "Anti-Couleur"
size -1 -1 94 24
option dbu
button "Activé", 1, 1 1 46 11
button "Desactivé", 2, 47 1 46 11
button "Fermer", 3, 1 12 92 11, ok
}
on *:dialog:acouleurpanel:sclick:1:{
if (%acouleurstatut == on) { echo -a Le protection anti-couleur est deja activé ! | halt }
else { set %acouleurstatut on | echo -a La protection anti-couleur vient d'etre activé . | ame : Protection anti-couleur activé... | halt }
}
on *:dialog:acouleurpanel:sclick:2:{
if (%acouleurstatut == off) { echo -a Le protection anti-couleur est deja desactivé ! | halt }
else { set %acouleurstatut off | echo -a La protection anti-couleur vient d'etre desactivé . | ame : Protection anti-couleur desactivé. | halt }
}
alias agras {
dialog -m agraspanel agraspanel
}
dialog agraspanel {
title "Anti-Gras"
size -1 -1 94 24
option dbu
button "Activé", 1, 1 1 46 11
button "Desactivé", 2, 47 1 46 11
button "Fermer", 3, 1 12 92 11, ok
}
on *:dialog:agraspanel:sclick:1:{
if (%agrasstatut == on) { echo -a Le protection anti-gras est deja activé ! | halt }
else { set %agrasstatut on | echo -a La protection anti-gras vient d'etre activé . | ame : Protection anti-gras activé... | halt }
}
on *:dialog:agraspanel:sclick:2:{
if (%agrasstatut == off) { echo -a Le protection anti-gras est deja desactivé ! | halt }
else { set %agrasstatut off | echo -a La protection anti-gras vient d'etre desactivé . | ame : Protection anti-gras desactivé. | halt }
}
alias alongeueur {
dialog -m alongeueurpanel alongeueurpanel
}
dialog alongeueurpanel {
title "Anti-Longueur"
size -1 -1 94 24
option dbu
button "Activé", 1, 1 1 46 11
button "Desactivé", 2, 47 1 46 11
button "Fermer", 3, 1 12 92 11, ok
}
on *:dialog:alongeueurpanel:sclick:1:{
if (%alongstatut == on) { echo -a Le protection anti-longeueur est deja activé ! | halt }
else { set %alongstatut on | echo -a La protection anti-longeueur vient d'etre activé . | ame : Protection anti-longeueur activé... | halt }
}
on *:dialog:alongeueurpanel:sclick:2:{
if (%agrasstatut == off) { echo -a Le protection anti-longeueur est deja desactivé ! | halt }
else { set %agrasstatut off | echo -a La protection anti-longeueur vient d'etre desactivé . | ame : Protection anti-longeueur desactivé. | halt }
}
menu menubar {
Oper:/ifsoutiloper
MP by juki (juki@noos.fr)
.Config Anti-Couleur:/acouleur
.Config Anti-Gras:/agras
.Config Anti-Longeueur:/alongeueur
.Config Anti-Mass-Action:/aaction
.Config Pseudo interdit:/madnickpanel
.Config Auto-Limite:/alpanel
MP Forum:/run http://forum.invitia.com/
MP Pub:/ame J'utilise MProtection v1.0 by juki (juki@noos.fr) trouvable sur http://forum.invitia.com/
}
Conclusion :
P'tit code fait pendant les vacances avec mon p'tit mIRC script server.
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.