Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum. Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

ANTIBAN SIMPLE


Information sur la source

Catégorie :Tutoriaux Niveau : Débutant Date de création : 18/01/2004 Vu : 7 269

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

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

Commentaire sur cette source (15)
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/scripting/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 :)
 

Commentaires et avis

signaler à un administrateur
Commentaire de ReMi34 le 18/01/2004 16:10:02

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

signaler à un administrateur
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 :)

signaler à un administrateur
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

signaler à un administrateur
Commentaire de ChAnG-Fu le 18/01/2004 19:41:56

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

8,5/10

signaler à un administrateur
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...)

signaler à un administrateur
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

signaler à un administrateur
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 :)

signaler à un administrateur
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 !

signaler à un administrateur
Commentaire de Narion le 25/04/2005 21:17:57

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

signaler à un administrateur
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

signaler à un administrateur
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

signaler à un administrateur
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'

signaler à un administrateur
Commentaire de 307WRC le 11/07/2005 15:26:31

ok merci TOFU j essaye ca

signaler à un administrateur
Commentaire de gloupsy le 14/07/2005 01:04:46

bon boulot mais ca me convient pas :/

signaler à un administrateur
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

Ajouter un commentaire



Nos sponsors

Sondage...

CalendriCode

Janvier 2009
LMMJVSD
   1234
567891011
12131415161718
19202122232425
262728293031 

Consulter la suite du CalendriCode



Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel BAÏSE, 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
Temps d'éxécution de la page : 0,250 sec

Google Coop CodeS-SourceS Google Coop CodeS-SourceS


Certaines images présentes sur le site (notament certains avatars) sont issues des collections IconShock, donc si vous souhaitez utiliser ces icons vous devez les acheter, ne les copiez pas et ne utilisez pas dans vos sites et applications sans les avoir commandé.