begin process at 2012 02 12 01:30:00
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Tutoriaux

 > ANTIBAN SIMPLE

ANTIBAN SIMPLE


 Information sur la source

Note :
8,38 / 10 - par 8 personnes
8,38 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Tutoriaux Niveau :Débutant Date de création :18/01/2004 Vu :8 420

Auteur : tofu

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

 Description

Me revoila avec tjrs mes snippets sur l'utilisation des hashtables :D
si vous pensez que l'on peut l'améliorer, rajouter des choses ou qu'il bug, je suis ouvert à toute proposition:)
- En voici un sshot:
http://membres.lycos.fr/xdbconcept/scriptin g/antiban.PNG

- Pour avoir le code non coupé à cause du nombre limite de char par ligne sur le site:
http://membres.lycos.fr/xdbconcept/scripting /antiban.txt

Source

  • menu * {
  • Antiban:/antiban
  • }
  • alias antiban dialog -m at at
  • dialog at {
  • title "Antiban"
  • size -1 -1 150 100
  • option dbu
  • tab "Activation", 1,2 1 145 95
  • tab "Messages", 2,3 1 145 95
  • text "Antiban by tofu\\", 3, 100 87 40 7, disable nowrap center tab 1
  • text "Raison du revenge kick:", 4, 5 20 60 10,disable nowrap tab 2
  • edit "" 5,65 19 80 10, autohs limit 900 tab 2
  • text "Raison de l'Anti-Ban:", 6, 5 31 60 10,disable nowrap tab 2
  • edit "" 7,65 30 80 10, autohs limit 900 tab 2
  • text "Raison de l'Anti-Deop:", 8, 5 42 60 10,disable nowrap tab 2
  • edit "" 9,65 41 80 10, autohs limit 900 tab 2
  • box "Aide" , 10, 5 52 140 40, tab 2
  • text "Vous n'avez qu'à taper la raison du revenge kick," , 11, 15 60 120 10, disable nowrap center tab 2
  • text "de l'antiban et de l'antideop, elles s'enregistreront" , 12, 15 70 120 10,disable nowrap center tab 2
  • text "automatiquement." , 13,15 80 120 10,disable nowrap center tab 2
  • box "Activer" , 14, 5 18 140 40, tab 1
  • check "Anti-Ban", 15, 10 28 35 10, tab 1
  • check "Anti-Deop", 16, 10 42 35 10, tab 1
  • check "Anti-(-e)", 17, 80 28 35 10, tab 1
  • check "Revenge kick", 18, 80 42 43 10, tab 1
  • box "Aide" , 19, 5 60 90 35, tab 1
  • text "Cochez la/les case(s) que vous", 20,10 70 80 10, disable nowrap center tab 1
  • text "voulez activer.", 21,25 80 50 10, disable nowrap center tab 1
  • button "Ok", 23, 100 63 37 10, cancel flat tab 1
  • }
  • on *:DIALOG:at:*:*:{
  • if ($devent == init) { if (!$hget(antiban)) { hmake antiban | hadd antiban rkmsg Revenge kick by tofu\\ | hadd antiban atmsg Anti ban by tofu\\ | hadd antiban dpmsg Anti deop by tofu\\ } | if ($hget(antiban,checkat) == 1) { did -c $dname 15 1 } | if ($hget(antiban,checkdp) == 1) { did -c $dname 16 1 } | if ($hget(antiban,checke) == 1) { did -c $dname 17 1 } | if ($hget(antiban,checkrk) == 1) { did -c $dname 18 1 } | $iif($hget(antiban,rkmsg),did -a $dname 5 $hget(antiban,rkmsg),did -a $dname 5 Revenge kick by tofu\\) | $iif($hget(antiban,atmsg),did -a $dname 7 $hget(antiban,atmsg),did -a $dname 7 Anti ban by tofu\\) | $iif($hget(antiban,dpmsg),did -a $dname 9 $hget(antiban,dpmsg),did -a $dname 9 Anti deop by tofu\\) }
  • if ($devent == edit) {
  • if ($did == 5) { hadd antiban rkmsg $did($dname,5) }
  • if ($did == 7) { hadd antiban atmsg $did($dname,7) }
  • if ($did == 9) { hadd antiban dpmsg $did($dname,9) }
  • }
  • if ($devent == sclick) {
  • if ($did($dname,15).state == 1) { hadd antiban checkat 1 }
  • if ($did($dname,15).state == 0) { if ($hget(antiban)) { hdel antiban checkat } }
  • if ($did($dname,16).state == 1) { hadd antiban checkdp 1 }
  • if ($did($dname,16).state == 0) { if ($hget(antiban)) { hdel antiban checkdp } }
  • if ($did($dname,17).state == 1) { hadd antiban checke 1 }
  • if ($did($dname,17).state == 0) { if ($hget(antiban)) { hdel antiban checke } }
  • if ($did($dname,18).state == 1) { hadd antiban checkrk 1 }
  • if ($did($dname,18).state == 0) { if ($hget(antiban)) { hdel antiban checkrk } }
  • }
  • if ($devent == close) { hsave -o antiban antiban.txt }
  • }
  • on 1:START: { hmake antiban | hload antiban antiban.txt }
  • on 1:EXIT: { if($hget(antiban)) { hsave -o antiban antiban.txt } }
  • on *:RAWMODE:#: {
  • if ($nick == $me) { halt }
  • if (-e isin $1-) && ($me isin $1-) && ($hget(antiban,checke) == 1) {
  • raw -q mode $chan +e $me
  • }
  • }
  • on 1:BAN:#: {
  • if ($hget(antiban,checkat) == 1) && ($me isop $chan) {
  • if ($banmask iswm $address($me,5)) {
  • raw -q mode $chan -b-o $banmask $nick
  • raw -q kick $chan $nick : $hget(antiban,atmsg)
  • raw -q mode $chan +b $address($nick,2)
  • }
  • }
  • }
  • on 1:DEOP:#: {
  • if ($nick == $me) { halt }
  • if ($hget(antiban,checkdp) == 1) && ($opnick == $me) {
  • hadd antiban dpnick $nick
  • .msg chanserv op $chan $me
  • }
  • }
  • on 1:OP:#: {
  • if ($hget(antiban,checkdp) == 1) && ($opnick == $me) && ($hget(antiban,dpnick) ison $chan) {
  • raw -q mode $chan -o+b $nick $address($nick,2)
  • raw -q kick $chan $nick : $hget(antiban,dpmsg)
  • hdel antiban dpnick
  • }
  • if ($hget(antiban,checkrk) == 1) && ($opnick == $me) && ($hget(antiban,rknick)) {
  • raw -q mode $hget(antiban,rkchan) -o+b $hget(antiban,rknick) $hget(antiban,rkhost)
  • raw -q kick $hget(antiban,rkchan) $hget(antiban,rknick) : $hget(antiban,rkmsg)
  • hdel antiban rknick
  • hdel antiban rkhost
  • hdel antiban rkchan
  • }
  • }
  • on 1:KICK:#: {
  • if ($nick == $me) { halt }
  • if ($hget(antiban,checkrk) == 1) && ($knick == $me) {
  • hadd antiban rknick $nick
  • hadd antiban rkchan $chan
  • hadd antiban rkhost $address($nick,2)
  • }
  • }
menu * {
Antiban:/antiban
}

alias antiban dialog -m at at

dialog at {
  title "Antiban"
  size -1 -1 150 100
  option dbu
  tab "Activation", 1,2 1 145 95
  tab "Messages", 2,3 1 145 95
  text "Antiban by tofu\\", 3, 100 87 40 7, disable nowrap center tab 1
  text "Raison du revenge kick:", 4, 5 20 60 10,disable nowrap tab 2
  edit "" 5,65 19 80 10, autohs limit 900 tab 2
  text "Raison de l'Anti-Ban:", 6, 5 31 60 10,disable nowrap tab 2
  edit "" 7,65 30 80 10, autohs limit 900 tab 2
  text "Raison de l'Anti-Deop:", 8, 5 42 60 10,disable nowrap tab 2
  edit "" 9,65 41 80 10, autohs limit 900 tab 2
  box "Aide" , 10, 5 52 140 40, tab 2
  text "Vous n'avez qu'à taper la raison du revenge kick," , 11, 15 60 120 10, disable nowrap center tab 2
  text "de l'antiban et de l'antideop, elles s'enregistreront" , 12, 15 70 120 10,disable nowrap center tab 2
  text "automatiquement." , 13,15 80 120 10,disable nowrap center tab 2
  box "Activer" , 14, 5 18 140 40, tab 1
  check "Anti-Ban", 15, 10 28 35 10, tab 1
  check "Anti-Deop", 16, 10 42 35 10, tab 1
  check "Anti-(-e)", 17, 80 28 35 10, tab 1
  check "Revenge kick", 18, 80 42 43 10, tab 1
  box "Aide" , 19, 5 60 90 35, tab 1
  text "Cochez la/les case(s) que vous", 20,10 70 80 10, disable nowrap center tab 1
  text "voulez activer.", 21,25 80 50 10, disable nowrap center tab 1
  button "Ok", 23, 100 63 37 10, cancel flat tab 1
}
on *:DIALOG:at:*:*:{
  if ($devent == init) { if (!$hget(antiban)) { hmake antiban | hadd antiban rkmsg Revenge kick by tofu\\ | hadd antiban atmsg Anti ban by tofu\\ | hadd antiban dpmsg Anti deop by tofu\\ } |  if ($hget(antiban,checkat) == 1) { did -c $dname 15 1 }  | if ($hget(antiban,checkdp) == 1) { did -c $dname 16 1 } |  if ($hget(antiban,checke) == 1) { did -c $dname 17 1 } |  if ($hget(antiban,checkrk) == 1) { did -c $dname 18 1 } | $iif($hget(antiban,rkmsg),did -a $dname 5 $hget(antiban,rkmsg),did -a $dname 5 Revenge kick by tofu\\) | $iif($hget(antiban,atmsg),did -a $dname 7 $hget(antiban,atmsg),did -a $dname 7 Anti ban by tofu\\) | $iif($hget(antiban,dpmsg),did -a $dname 9 $hget(antiban,dpmsg),did -a $dname 9 Anti deop by tofu\\)  }
  if ($devent == edit) { 
    if ($did == 5) { hadd antiban rkmsg $did($dname,5) }
    if ($did == 7) { hadd antiban atmsg $did($dname,7) }
    if ($did == 9) { hadd antiban dpmsg $did($dname,9) }
  }
  if ($devent == sclick) { 
    if ($did($dname,15).state == 1) {  hadd antiban checkat 1 } 
    if ($did($dname,15).state == 0) { if ($hget(antiban)) { hdel antiban checkat } } 
    if ($did($dname,16).state == 1) {  hadd antiban checkdp 1 } 
    if ($did($dname,16).state == 0) { if ($hget(antiban)) { hdel antiban checkdp } }
    if ($did($dname,17).state == 1) {  hadd antiban checke 1 } 
    if ($did($dname,17).state == 0) { if ($hget(antiban)) { hdel antiban checke } }
    if ($did($dname,18).state == 1) {  hadd antiban checkrk 1 } 
    if ($did($dname,18).state == 0) { if ($hget(antiban)) { hdel antiban checkrk } }
  }
  if ($devent == close) { hsave -o antiban antiban.txt }
}
on 1:START: { hmake antiban | hload antiban antiban.txt }
on 1:EXIT: { if($hget(antiban)) { hsave -o antiban antiban.txt } }

on *:RAWMODE:#: {
  if ($nick == $me) { halt }
  if (-e isin $1-) && ($me isin $1-) && ($hget(antiban,checke) == 1) {
    raw -q mode $chan +e $me
  }
}
on 1:BAN:#: {
  if ($hget(antiban,checkat) == 1) && ($me isop $chan) {
    if ($banmask iswm $address($me,5)) {
      raw -q mode $chan -b-o $banmask $nick
      raw -q kick $chan $nick : $hget(antiban,atmsg)
      raw -q mode $chan +b $address($nick,2)
    }
  }
}
on 1:DEOP:#: {
  if ($nick == $me) { halt }
  if ($hget(antiban,checkdp) == 1) && ($opnick == $me) { 
    hadd antiban dpnick $nick
    .msg chanserv op $chan $me
  }
}
on 1:OP:#: {
  if ($hget(antiban,checkdp) == 1) && ($opnick == $me) && ($hget(antiban,dpnick) ison $chan) { 
    raw -q mode $chan -o+b $nick $address($nick,2)
    raw -q kick $chan $nick : $hget(antiban,dpmsg)
    hdel antiban dpnick
  }
  if ($hget(antiban,checkrk) == 1) && ($opnick == $me) && ($hget(antiban,rknick)) {
    raw -q mode $hget(antiban,rkchan) -o+b $hget(antiban,rknick)  $hget(antiban,rkhost)
    raw -q kick $hget(antiban,rkchan) $hget(antiban,rknick) : $hget(antiban,rkmsg)
    hdel antiban rknick
    hdel antiban rkhost
    hdel antiban rkchan
  }
}
on 1:KICK:#: { 
  if ($nick == $me) { halt }
  if ($hget(antiban,checkrk) == 1) && ($knick == $me) {
    hadd antiban rknick $nick
    hadd antiban rkchan $chan
    hadd antiban rkhost $address($nick,2)
  }
}

 Conclusion


voila :)


 Sources du même auteur

MINI TUTO SUR L'OPTIMISATION
Source avec Zip Source avec une capture GESTION HTABLE
MASS MODES
Source avec Zip Source avec une capture MODÉRATION
NEWS K-OTIK.

 Sources de la même categorie

TOUT SAVOIR SUR L'ECRITURE EN COULEUR par SaD_AnG3L
Source avec Zip Source avec une capture [TUTORIAL] LECTEUR MP3 EN DIALOG par fjxokt
Source avec une capture "RESIZE" SANS DLL par IceTempest
MINI TUTO SUR L'OPTIMISATION par tofu
Source avec Zip TUTORIAL PICWIN, APPROFONDISSEMENT par KiNdErMaXi

Commentaires et avis

Commentaire de ReMi34 le 18/01/2004 16:10:02

Hey mais t'es un bon toi ! lol
8/10 :)

Commentaire de Dark-Dragoon le 18/01/2004 19:18:42

pas mal pour qq qui arete pas de fantasmer sur les homo-sexuelle :)
8/10 ossi :)

Commentaire de SornDrixer le 18/01/2004 19:37:57 administrateur CS

lol, tu vas pas commencer à nous ressortir tout les addons existant version hashtable ! ;)

7/10, je me permets de t'enlever 3 points car ce n'est pas une source originale :p

Commentaire de ChAnG-Fu le 18/01/2004 19:41:56

Tres bien codé j'aime :)
surtout avec les hash tables :)

8,5/10

Commentaire de tofu le 18/01/2004 19:57:11

dsl pour l'originalité Sorn, je mattache plus au code en ce moment qu'à l'originalité des choses, dernièrement j'ai vu tellement de "on text" etc... que j'avais envi d'essayer de faire des choses bien codées..
et puis "tout les addons", si plus d'addons étaient fait en hashtables, je pense qu'on verrait moins de gens lagguer à cause de toutes leurs variables (je vois sa très fréquamment...)

Commentaire de Kolibot le 18/01/2004 22:12:05

Je suis en accord avec tous les autres commentaires...
J'ai 2 remarques :
- $did($dname,5) } Vu que tu travailles dans un on dial le $dname est inutile... mais te connaissant ça doit être une manie de coding comme nous en avons tous ...
- quelques alias pour réduire la longueur du code ne ferait pas de mail surtout vu le nombre de fois ou tu appelles la htable antiban
Je te met 9/10

Commentaire de tofu le 18/01/2004 22:28:59

oui, le $dname est une habitude que j'ai depuis que j'ai commencé à coder,il va falloir que jmen sépare... et heu jvais essayer de réduire le code en effet avec des aliases :)

Commentaire de vesparo le 20/01/2004 12:47:56

très beau vive les hash tables. J'ai remarqué que tu les utiliser souvent. 8/10 très bon boulot et bien pour le principe !

Commentaire de Narion le 25/04/2005 21:17:57

ton revenche kick ban c'est bof ...
9/10 pour moi :)

Commentaire de tofu le 25/04/2005 21:47:02

excuses moi ça faisait à peu près un mois que je scriptais à cette époque là .. j'ai un peu évolué depuis.. lol

Commentaire de 307WRC le 11/07/2005 12:53:12

euuu ma question va peut etre paraitre bete, mai j y connait rien moi, comment doit on utiliser ça ???? merci de repondre

Commentaire de tofu le 11/07/2005 15:23:21

faut le load dans les remotes et faire un click droit et cliquer sur 'antiban'

Commentaire de 307WRC le 11/07/2005 15:26:31

ok merci TOFU j essaye ca

Commentaire de gloupsy le 14/07/2005 01:04:46

bon boulot mais ca me convient pas :/

Commentaire de salim190 le 16/07/2006 17:42:29

salut je suis pas un scripteur  je l ai essier  mais ç marche et sur le serveur voila ç refuse de se conecter

Commentaire de thibault49 le 24/07/2009 23:01:37

salut es qu"on pourrait parler en pv sur msn ?

Commentaire de tofu le 25/07/2009 10:42:06

Pour quelle raison?

Envoies moi un pmsg sur le site si tu veux, mais je ne donne pas mon adresse de Messagerie Instantanée ici.

Commentaire de Moitorche le 04/01/2010 18:51:41

Ouais , jai trouvais que c'etais un bon anti-ban mais je voudrais inclure une fonction mais je n'y arrive pas trop je voudrais pouvoir l'activer et le désactiver .
Tu pourrais me le faire , je galere un peu ...

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

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

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