begin process at 2012 02 12 04:46:41
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

AddOns

 > SYSTEM DE PROTECTIONS PERSONNELLES - ANTIFLOOD

SYSTEM DE PROTECTIONS PERSONNELLES - ANTIFLOOD


 Information sur la source

Note :
Aucune note
Catégorie :AddOns Niveau :Débutant Date de création :01/06/2004 Date de mise à jour :19/06/2004 21:08:52 Vu :4 756

Auteur : Asthar

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

 Description

Cliquez pour voir la capture en taille normale
Simple system pour eviter de se faire flooder trop longtemps.
Simple mais efficace.

Source

  • Menu menubar,channel,query {
  • -
  • Protections Perso:/dia protect
  • }
  • dialog protect {
  • title "Protections"
  • 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 "Valider", 32, 131 94 37 12, ok
  • }
  • on *:dialog:protect:init:0:{
  • if (%noon != $null) { did -c protect 4 }
  • if (%pvon != $null) { did -c protect 11 }
  • if (%ctcpon != $null) { did -c protect 19 }
  • if (%invon != $null) { did -c protect 24 }
  • if (%dccon != $null) { 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
  • }
  • on *:dialog:protect:sclick:32:{
  • if ($did(4).state == 1) { set %noon on }
  • if ($did(11).state == 1) { set %pvon on }
  • if ($did(19).state == 1) { set %ctcpon on }
  • if ($did(24).state == 1) { set %invon on }
  • if ($did(31).state == 1) { set %dccon on }
  • if ($did(4).state == 0) { unset %noon }
  • if ($did(11).state == 0) { unset %pvon }
  • if ($did(18).state == 0) { unset %ctcpon }
  • if ($did(24).state == 0) { unset %invon }
  • if ($did(31).state == 0) { unset %dccon }
  • 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)
  • }
  • on 1:open:?:{
  • if (%pvon == on) {
  • if ($query(0) > %nb.pv) {
  • ignore -pu $+ %i.tps *!*@*
  • /eprotect
  • }
  • else { halt }
  • }
  • }
  • on *:notice:*:*:{
  • if ((IriX isin $nick) || (systak isin $nick)) { goto end }
  • else {
  • inc -u $+ [ %no.tps ] %floodnoti
  • if (%floodnoti > %nb.no) {
  • ignore -nu $+ %i.tps *!*@
  • /eprotect
  • }
  • }
  • :end
  • }
  • on *:ctcp:*:*:{
  • inc -u $+ [ %ctcp.tps ] %floodctcp
  • if (%floodctcp > %nb.ctcp) {
  • ignore -tu $+ %i.tps *!*@*
  • /eprotect
  • }
  • }
  • on *:invite:#:{
  • inc -u $+ [ %inv.pts ] %floodinv
  • if (%floodinv > %nb.inv) {
  • ignore -iu $+ %i.tps *!*@*
  • /eprotect
  • }
  • }
  • on *:dccserver:*:{
  • inc -u [ %inv.tps ] %flooddcc
  • if (%flooddcc > %nb.dcc) {
  • ignore -iu $+ %i.tps *!*@
  • /eprotect
  • }
  • }
  • Alias dia { dialog -m $$1 $$1 }
  • Alias eprotect { echo 4 -a  $+ $timestamp [ Flood Protection ]7 $nick 4tente de te flooder (ignoré %i.tps secondes) - 3F124 Pour enlever l'ignore ! }
  • Alias F12 { .ignore -r *!*@* | /perso Toutes les ignores sont enlevées }
  • Alias perso { echo 12 -a $timestamp 14[ Info ]4 $1- }
Menu menubar,channel,query {
  -
  Protections Perso:/dia protect
}

dialog protect {
  title "Protections"
  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 "Valider", 32, 131 94 37 12, ok
}

on *:dialog:protect:init:0:{
  if (%noon != $null) { did -c protect 4 }
  if (%pvon != $null) { did -c protect 11 }
  if (%ctcpon != $null) { did -c protect 19 }
  if (%invon != $null) { did -c protect 24 }
  if (%dccon != $null) { 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
}

on *:dialog:protect:sclick:32:{
  if ($did(4).state == 1) { set %noon on }
  if ($did(11).state == 1) { set %pvon on }
  if ($did(19).state == 1) { set %ctcpon on }
  if ($did(24).state == 1) { set %invon on }
  if ($did(31).state == 1) { set %dccon on }
  if ($did(4).state == 0) { unset %noon }
  if ($did(11).state == 0) { unset %pvon }
  if ($did(18).state == 0) { unset %ctcpon }
  if ($did(24).state == 0) { unset %invon }
  if ($did(31).state == 0) { unset %dccon }
  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)
}

on 1:open:?:{
  if (%pvon == on) {
    if ($query(0) > %nb.pv) {
      ignore -pu $+ %i.tps *!*@*
      /eprotect
    }
    else { halt }
  }
}

on *:notice:*:*:{
  if ((IriX isin $nick) || (systak isin $nick)) { goto end }
  else {
    inc -u $+ [ %no.tps ] %floodnoti
    if (%floodnoti > %nb.no) {
      ignore -nu $+ %i.tps *!*@
      /eprotect
    }
  }
  :end
}

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

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

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

Alias dia { dialog -m $$1 $$1 }
Alias eprotect { echo 4 -a  $+ $timestamp [ Flood Protection ]7 $nick 4tente de te flooder (ignoré %i.tps secondes) - 3F124 Pour enlever l'ignore ! }
Alias F12 { .ignore -r *!*@* | /perso Toutes les ignores sont enlevées }
Alias perso { echo 12 -a $timestamp 14[ Info ]4 $1- }

 Conclusion

Voila, je ne suis pas un pro du codage mIRC, je débute, je sais pas ce que ca vaut.
A vous de juger =)
(A charger dans les remotes)


 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 PROTECTION ANTI FLOOD PERSONELLES (V2)
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 Asthar le 01/06/2004 01:40:23

Désolé pour les pseudos contenus dans l'event on *:notice mais bon, on ne peu pas plaire a tout le monde :)

Commentaire de PaDa le 01/06/2004 07:05:20

les variables d'activation/désactivation servent a rien , tu utilises que celle du pv dans la suite

ta gestion des variables d'options peut etre simplifiée :
   if ($did(4).state == 1) { set %noon on }
    if ($did(4).state == 0) { unset %noon }
fais plutot : set %noon $did(4).State . Ainsi la variable est forcément a 1 ou a 0 , et quand tu veux la tester
if (%noon == 1) ou if (%noon == 0) devient en raccourci if (%noon) et if (!%noon) respectivement ... ca choque au début mais c très facile a lire quand on est habitué .
(ptite explication if (!gnagna) signifie : "gnagna vaut $null , 0 ou $false" et ca marche pour les identifieurs et les variables...)

le reste j'ai pas eu les boulets pour tester  et un peu la flemme mais ca doit marcher :p

bonne continuazion hésite pas si souci :p

Pada/PaDawAN

Commentaire de SornDrixer le 01/06/2004 07:07:05 administrateur CS

if ((IriX isin $nick) || (systak isin $nick))
Si on se trouve sur un serveur où ces bots ne sont pas, quelqu'un prends l'un de ces nicks, et peut nous flooder alors.
Rajoute une liste quelque part sur ton dialog, pour spécifier des pseudos à ignorer en cas de tentative de flood.

if (%noon != $null) > en version plus courte peut devenir :
if (%noon)
idem pour les autres.

Pense à regrouper tes événements DIALOG.

/eprotect > à quoi il te sert le / ? Tout se qui est en début de ligne dans un remote est automatiquement considéré comme une commande, donc en aucun cas il est nécéssaire de mettre des / en début de ligne.

Voila, bon boulot

Commentaire de Mick52 le 05/06/2004 22:24:30

ben j'vois qu'le bro il a fait des progres en dialog :Ppp
tu sais c'que j'en pense =)
Bonne continuation =)

 Ajouter un commentaire




Nos sponsors


Sondage...

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,998 sec (4)

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