begin process at 2012 02 11 01:37:42
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

AddOns

 > PROTECTION ANTI FLOOD PERSONELLES (V2)

PROTECTION ANTI FLOOD PERSONELLES (V2)


 Information sur la source

Note :
8,5 / 10 - par 2 personnes
8,50 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :AddOns Niveau :Débutant Date de création :30/06/2004 Date de mise à jour :08/07/2004 21:37:24 Vu :7 211

Auteur : Asthar

Ecrire un message privé
Commentaire sur cette source (18)
Ajouter un commentaire et/ou une note

 Description

Cliquez pour voir la capture en taille normale
C'est pratiquement la meme que mon ancien code sauf que je l'ai quelque peu remanier.
J'ai ajouter, comme suggérer, une possibilité de mettre les pseudo que vous voulez ignorer, ce qui peut etre pratique je l'avoue =)
Bref, a vous de voir :)

- Le 8 Juillet : Correction de l'erreur sur l'events on *:notice:

Source

  • Menu menubar,channel,query {
  • -
  • Protections Perso:/dialog -m protect protect
  • }
  • dialog protect {
  • title "Protection - Looser !"
  • size -1 -1 170 108
  • option dbu
  • tab "Flood Pvs / Notices", 1, 2 0 165 91
  • box "Flood Pvs :", 2, 7 16 72 69, tab 1
  • box "Flood Notices :", 3, 81 16 80 69, tab 1
  • check "Activé", 4, 12 73 50 10, tab 1
  • text "Nombre max de Pvs :", 5, 10 25 53 8, tab 1
  • edit "", 6, 65 24 10 10, tab 1
  • text "Nombre de Notice :", 7, 85 25 48 8, tab 1
  • edit "", 8, 147 24 10 10, tab 1
  • text "Limite de temps (sec) :", 9, 85 37 56 8, tab 1
  • check "Activé", 11, 86 73 50 10, tab 1
  • edit "", 10, 147 36 10 10, tab 1
  • tab "Flood CTCP / Invitations", 12
  • box "Flood CTCP :", 13, 8 16 71 69, tab 12
  • box "Flood Invitations :", 14, 81 16 80 69, tab 12
  • text "Nombre de CTCP :", 15, 11 25 46 8, tab 12
  • edit "", 16, 66 24 10 10, tab 12
  • text "Limite de temps (sec) :", 17, 11 37 54 8, tab 12
  • check "Activé", 19, 12 73 50 10, tab 12
  • text "Nombre d'invitations :", 20, 85 25 53 8, tab 12
  • edit "", 21, 148 24 10 10, tab 12
  • text "Limite de temps (sec) :", 22, 85 37 58 8, tab 12
  • edit "", 23, 148 36 10 10, tab 12
  • check "Activé", 24, 86 73 50 10, tab 12
  • edit "", 18, 66 36 10 10, tab 12
  • tab "Divers", 25
  • box "Flood DCCs :", 26, 8 16 78 69, tab 25
  • text "Nombre de DCCs :", 27, 12 26 46 8, tab 25
  • edit "", 28, 73 25 10 10, tab 25
  • text "Limite de temps (sec) :", 29, 12 37 54 8, tab 25
  • edit "", 30, 73 36 10 10, tab 25
  • check "Activé", 31, 12 72 50 10, tab 25
  • text "Temps général d'ignore :", 33, 92 20 64 8, tab 25
  • edit "", 34, 92 30 20 10, tab 25 limit 15
  • text "secondes.", 35, 114 31 25 8, tab 25
  • button "Pseudo", 36, 93 44 21 10, tab 25
  • text "Pseudo a ignoré", 37, 118 45 42 8, tab 25
  • button "Valider", 32, 131 94 37 12, ok
  • }
  • on *:dialog:protect:*:*:{
  • if ($devent == init) {
  • if (%noon) { did -c protect 4 }
  • if (%pvon) { did -c protect 11 }
  • if (%ctcpon) { did -c protect 19 }
  • if (%invon) { did -c protect 24 }
  • if (%dccon) { did -c protect 31 }
  • did -a protect 6 %nb.pv
  • did -a protect 8 %nb.no
  • did -a protect 10 %no.tps
  • did -a protect 16 %nb.ctcp
  • did -a protect 18 %ctcp.tps
  • did -a protect 21 %nb.inv
  • did -a protect 23 %inv.tps
  • did -a protect 28 %nb.dcc
  • did -a protect 30 %dcc.tps
  • did -a protect 34 %i.tps
  • }
  • if ($devent == sclick) {
  • if ($did == 32) {
  • set %noon $did(4).state
  • set %pvon $did(11).state
  • set %ctcpon $did(19).state
  • set %invon $did(24).state
  • set %dccon $did(31).state
  • set %nb.pv $did(6)
  • set %nb.no $did(8)
  • set %no.tps $did(10)
  • set %nb.ctcp $did(16)
  • set %ctcp.tps $did(18)
  • set %nb.inv $did(21)
  • set %inv.tps $did(23)
  • set %nb.dcc $did(28)
  • set %dcc.tps $did(30)
  • set %i.tps $did(34)
  • }
  • if ($did == 36) dialog -m floodign floodign
  • }
  • }
  • on 1:open:?:{
  • if (%noon) {
  • if ($query(0) > %nb.pv) {
  • ignore -pu $+ %i.tps *!*@*
  • eprotect
  • }
  • else { halt }
  • }
  • }
  • on *:notice:*:*:{
  • if (%pvon) {
  • if ($nick isin $read(Pseudo.txt,w,$nick)) goto end
  • else {
  • inc -u $+ [ %no.tps ] %floodnoti
  • if (%floodnoti > %nb.no) {
  • ignore -nu $+ %i.tps *!*@
  • eprotect
  • }
  • }
  • :end
  • }
  • }
  • on *:ctcp:*:*:{
  • if (ctcpon) {
  • inc -u $+ [ %ctcp.tps ] %floodctcp
  • if (%floodctcp > %nb.ctcp) {
  • ignore -tu $+ %i.tps *!*@*
  • eprotect
  • }
  • }
  • }
  • on *:invite:#:{
  • if (%invon) {
  • inc -u $+ [ %inv.pts ] %floodinv
  • if (%floodinv > %nb.inv) {
  • ignore -iu $+ %i.tps *!*@*
  • eprotect
  • }
  • }
  • }
  • on *:dccserver:*:{
  • if (%dccon) {
  • inc -u [ %inv.tps ] %flooddcc
  • if (%flooddcc > %nb.dcc) {
  • ignore -iu $+ %i.tps *!*@
  • eprotect
  • }
  • }
  • }
  • dialog floodign {
  • title "Pseudo - Looser !"
  • size -1 -1 137 108
  • option dbu
  • box "Liste des pseudos :", 1, 1 1 64 105
  • list 2, 3 8 59 95, size vsbar
  • box "Ajout :", 3, 66 1 70 31
  • text "Pseudo :", 4, 70 9 25 8
  • edit "", 5, 70 18 50 10
  • button "Add", 6, 121 18 12 10
  • button "Supprimer", 7, 66 33 37 12
  • button "Fermer", 8, 98 94 37 12, ok
  • }
  • on *:dialog:floodign:*:*:{
  • if ($devent == init) {
  • loadbuf -o floodign 2 Pseudo.txt
  • }
  • if ($devent == sclick) {
  • if ($did == 6) {
  • write Pseudo.txt $did(5)
  • did -a floodign 2 $did(5)
  • }
  • if ($did == 7) {
  • write -dl $+ $did(2).sel Pseudo.txt
  • did -d floodign $did(2).sel
  • }
  • }
  • }
  • Alias eprotect { echo 4 -a  $+ $timestamp [ Flood Protection ]7 $nick 4tente de te flooder (ignoré %i.tps secondes) - 3F124 Pour enlever l'ignore ! }
Menu menubar,channel,query {
  -
  Protections Perso:/dialog -m protect protect
}

dialog protect {
  title "Protection - Looser !"
  size -1 -1 170 108
  option dbu
  tab "Flood Pvs / Notices", 1, 2 0 165 91
  box "Flood Pvs :", 2, 7 16 72 69, tab 1
  box "Flood Notices :", 3, 81 16 80 69, tab 1
  check "Activé", 4, 12 73 50 10, tab 1
  text "Nombre max de Pvs :", 5, 10 25 53 8, tab 1
  edit "", 6, 65 24 10 10, tab 1
  text "Nombre de Notice :", 7, 85 25 48 8, tab 1
  edit "", 8, 147 24 10 10, tab 1
  text "Limite de temps (sec) :", 9, 85 37 56 8, tab 1
  check "Activé", 11, 86 73 50 10, tab 1
  edit "", 10, 147 36 10 10, tab 1
  tab "Flood CTCP / Invitations", 12
  box "Flood CTCP :", 13, 8 16 71 69, tab 12
  box "Flood Invitations :", 14, 81 16 80 69, tab 12
  text "Nombre de CTCP :", 15, 11 25 46 8, tab 12
  edit "", 16, 66 24 10 10, tab 12
  text "Limite de temps (sec) :", 17, 11 37 54 8, tab 12
  check "Activé", 19, 12 73 50 10, tab 12
  text "Nombre d'invitations :", 20, 85 25 53 8, tab 12
  edit "", 21, 148 24 10 10, tab 12
  text "Limite de temps (sec) :", 22, 85 37 58 8, tab 12
  edit "", 23, 148 36 10 10, tab 12
  check "Activé", 24, 86 73 50 10, tab 12
  edit "", 18, 66 36 10 10, tab 12
  tab "Divers", 25
  box "Flood DCCs :", 26, 8 16 78 69, tab 25
  text "Nombre de DCCs :", 27, 12 26 46 8, tab 25
  edit "", 28, 73 25 10 10, tab 25
  text "Limite de temps (sec) :", 29, 12 37 54 8, tab 25
  edit "", 30, 73 36 10 10, tab 25
  check "Activé", 31, 12 72 50 10, tab 25
  text "Temps général d'ignore :", 33, 92 20 64 8, tab 25
  edit "", 34, 92 30 20 10, tab 25 limit 15
  text "secondes.", 35, 114 31 25 8, tab 25
  button "Pseudo", 36, 93 44 21 10, tab 25
  text "Pseudo a ignoré", 37, 118 45 42 8, tab 25
  button "Valider", 32, 131 94 37 12, ok
}

on *:dialog:protect:*:*:{
  if ($devent == init) {
    if (%noon) { did -c protect 4 }
    if (%pvon) { did -c protect 11 }
    if (%ctcpon) { did -c protect 19 }
    if (%invon) { did -c protect 24 }
    if (%dccon) { did -c protect 31 }
    did -a protect 6 %nb.pv
    did -a protect 8 %nb.no
    did -a protect 10 %no.tps
    did -a protect 16 %nb.ctcp
    did -a protect 18 %ctcp.tps
    did -a protect 21 %nb.inv
    did -a protect 23 %inv.tps
    did -a protect 28 %nb.dcc
    did -a protect 30 %dcc.tps
    did -a protect 34 %i.tps
  }

  if ($devent == sclick) {
    if ($did == 32) {
      set %noon $did(4).state
      set %pvon $did(11).state
      set %ctcpon $did(19).state
      set %invon $did(24).state
      set %dccon $did(31).state
      set %nb.pv $did(6)
      set %nb.no $did(8)
      set %no.tps $did(10)
      set %nb.ctcp $did(16)
      set %ctcp.tps $did(18)
      set %nb.inv $did(21)
      set %inv.tps $did(23)
      set %nb.dcc $did(28)
      set %dcc.tps $did(30)
      set %i.tps $did(34)
    }
    if ($did == 36) dialog -m floodign floodign
  }
}
on 1:open:?:{
  if (%noon) {
    if ($query(0) > %nb.pv) {
      ignore -pu $+ %i.tps *!*@*
      eprotect
    }
    else { halt }
  }
}

on *:notice:*:*:{
  if (%pvon) {
    if ($nick isin $read(Pseudo.txt,w,$nick)) goto end
    else {
      inc -u $+ [ %no.tps ] %floodnoti
      if (%floodnoti > %nb.no) {
        ignore -nu $+ %i.tps *!*@
        eprotect
      }
    }
    :end
  }
}

on *:ctcp:*:*:{
  if (ctcpon) {
    inc -u $+ [ %ctcp.tps ] %floodctcp
    if (%floodctcp > %nb.ctcp) {
      ignore -tu $+ %i.tps *!*@*
      eprotect
    }
  }
}

on *:invite:#:{
  if (%invon) {
    inc -u $+ [ %inv.pts ] %floodinv
    if (%floodinv > %nb.inv) {
      ignore -iu $+ %i.tps *!*@*
      eprotect
    }
  }
}

on *:dccserver:*:{
  if (%dccon) {
    inc -u [ %inv.tps ] %flooddcc
    if (%flooddcc > %nb.dcc) {
      ignore -iu $+ %i.tps *!*@
      eprotect
    }
  }
}

dialog floodign {
  title "Pseudo - Looser !"
  size -1 -1 137 108
  option dbu
  box "Liste des pseudos :", 1, 1 1 64 105
  list 2, 3 8 59 95, size vsbar
  box "Ajout :", 3, 66 1 70 31
  text "Pseudo :", 4, 70 9 25 8
  edit "", 5, 70 18 50 10
  button "Add", 6, 121 18 12 10
  button "Supprimer", 7, 66 33 37 12
  button "Fermer", 8, 98 94 37 12, ok
}

on *:dialog:floodign:*:*:{
  if ($devent == init) {
    loadbuf -o floodign 2 Pseudo.txt
  }
  if ($devent == sclick) {
    if ($did == 6) { 
      write Pseudo.txt $did(5)
      did -a floodign 2 $did(5)
    }
    if ($did == 7) { 
      write -dl $+ $did(2).sel Pseudo.txt
      did -d floodign $did(2).sel
    }
  }
}

Alias eprotect { echo 4 -a  $+ $timestamp [ Flood Protection ]7 $nick 4tente de te flooder (ignoré %i.tps secondes) - 3F124 Pour enlever l'ignore ! }


 Conclusion

Une seule chose que je n'ai pas faite :
Il faut placer un fichier appelé "Pseudo.txt" (vide) a la racine de votre script.
Voila voila =)


 Sources du même auteur

Source avec Zip TUTORIEL SUR LES DIALOGS MIRC
Source avec Zip Source avec une capture PROTECTS - ANTIFLOOD PERSO
Source avec une capture AUTH / INVITATION PAR IRIX
Source avec une capture SYSTEM DE PROTECTIONS PERSONNELLES - ANTIFLOOD
SCANNER DE HOST / BANLIST EN ECHO / STATS CHAN

 Sources de la même categorie

PACMAN MULTI-JOUEUR EN LIGNE par wims
PROXY&SOCKS SCANNER+LEECHER par independentt
GESTIONNAIRE DE HIGHLIGHT AVANCÉ AVEC IGNORE SALON OU PSEUDO par doob666
AUTOJOIN HTABLE MULTISERVER par doob666
TCL - AJOUT SUPPRESSION DE LOGS par Atok

Commentaires et avis

Commentaire de Kerrigan le 30/06/2004 20:59:00

c pas compliqué de rajouter le texte automatiquement .. t'aurais pu le faire ça n'a rien de sorcier. lol
suffit de faire un write, c'est pas compliqué ;)

rajoute le ok ?! :D

sinon Kolibot avait fait un antiflood tres méchant va jeter un coup d'oeil .

Commentaire de viko le 01/07/2004 02:26:13

Nice addon :)

Commentaire de SornDrixer le 01/07/2004 10:14:26 administrateur CS

Au lieu d'utiliser autant de variables pour enregistrer la config de l'addon, utilise les hashtables, ou si tu veux faire plus simple, un fichier .ini
Quand le nombre de variables utilisés par un seul addon est assez conséquent, je trouve que cela ne fait pas propre x)

Bien réalisé sinon :)

Commentaire de Asthar le 01/07/2004 20:02:24

Merci des commentaires =)
Sinon j'ai énormément de mal avec les .ini et je connais pas des masses les hashtables, mais je vais m'y mettre :p

Commentaire de winwarrior le 02/07/2004 13:55:21

Pareil que SornDrixer!
Enfin un code qui sert =]
Bonne continuation!

Commentaire de tofu le 02/07/2004 15:37:02

je vois que tu utilises "inc -u" , look aussi avec "inc -z" c'est assez utile aussi ;)

Commentaire de winwarrior le 02/07/2004 15:46:23

sinon ... heu ça sert a quoi "else { halt }" ?

Commentaire de Asthar le 07/07/2004 19:15:07

Le else { halt } sert au cas ou la gestion de ton evenement correspondant a l'ouverture de ton pv soit faite ailleurs. C'est une simple précaution =)
En tout cas, ca déconnais un peu chez moi :p

Commentaire de Le_Corse le 08/07/2004 16:33:04

Salut,
on *:notice:*:*:{
    if (%pvon) {
    if ($nick isin Peudo.txt)) echo -a test
    else {
        inc -u $+ [ %no.tps ] %floodnoti
        if (%floodnoti > %nb.no) {
        ignore -nu $+ %i.tps *!*@
        eprotect
        }
    }
    :end
    }
}

Petite faute toute bête ! dans " if ($nick isin Peudo.txt)) echo -a test " < c'est " if ($nick isin Pseudo.txt)) echo -a test "

Voilà sinon jolie addon pour un débutant ( comme moi :p ) ++ .

Commentaire de tofu le 08/07/2004 16:59:23

le_corse:
"Petite faute toute bête ! dans " if ($nick isin Peudo.txt)) echo -a test " < c'est " if ($nick isin Pseudo.txt)) echo -a test ""

je vois pas de différence entre son code, et le tien ? -_-`

if $nick isin pseudo.txt echo -a test

je crois que c'est faisable ;)

Commentaire de winwarrior le 08/07/2004 20:35:18

hummm
apar si le pseudo du gars est "pseudo" il y a aucune chance qu'il marche ce code :\

Commentaire de Asthar le 08/07/2004 21:29:01

Oups ... désolé erreur de ma part, je met a jour de suite =)
Merci du rapport d'erreur :)

Commentaire de Asthar le 08/07/2004 21:38:11

Et voila :)

Commentaire de itzelien le 11/06/2005 03:37:09

Salut :)
Et ben en fait , quand on est la fenetre pour ignorer un pseudo,
quand on clik sur add , ca ne l'ajoute pas visuelement, ca l'ajoute en fond mais  il faut fermer le dialogue et le réouvrir pour voir qu'il a bien était ajouté.
Y a t'il une solution à ca , merci

Bonne continuation bye :)

Commentaire de Asphere le 12/07/2005 04:18:54

Nickel chrome !
Juste un petit soucis (qui vient peut etre de moi) :

Lorsque j'ajoute un pseudo à ignorer, aucun soucis, mais dès lors que je veux le supprimer j'obtiens le message suivant :
* /did: insufficient parameters (line 168, script7.mrc)

Néanmoins, le pseudo a bien été enlever, il faut recharger la fenêtre pour ça !

Très pratique en tout cas ! GG !

Commentaire de XavSniper le 09/01/2007 23:15:09

Il reste quand même quelques erreurs. Par exemple ici:

on *:ctcp:*:*:{
if (ctcpon) {
  inc -u $+ [ %ctcp.tps ] %floodctcp
  if (%floodctcp > %nb.ctcp) {
    ignore -tu $+ %i.tps *!*@*
    eprotect
  }
}
}

il manque un % à la variable ctcpon

Et une autre erreur, concernant l'ignore cette fois, euh... où l'alias pour annulé l'ignore ? J'ai beau appuyer sur F12 l'ignore reste lol

Sinon, l'add-on est pas mal fichu ;)
Bravo ;)

Commentaire de lebaronrouge le 14/04/2007 17:05:10

Trop relou pas de zip , copier coller la sources me fou systématiquement des # devant chaques lignes a effacer une a une,non merci ><

Commentaire de lebaronrouge le 27/07/2007 20:58:01

il y a une erreur d'accolade avec un } en trop et un autre } manquant, le probleme est de savoir a quel endroit exact des remotes dans lesquels l'erreur est detectée.....

 Ajouter un commentaire




Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

Photothèque

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,889 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales