Accueil > > > UN ANTI-CLONES QUI KICKALL
UN ANTI-CLONES QUI KICKALL
Information sur la source
Description
Comme prévu, je poste la nouvelle version de mon premier anti clones sans dialog, sans rien d'ailleurs...
Code completement autonome, pas de confirmation de kick.
Possibilité:
d'ignoré un host/nick ( ilimité)
de régler le nombre de clones
d'avertir ou non avant de kickall/kickbanall
de choisir vos mode lorsque les clones entrent
de choisir vos chan ( ilimité)
choisir la raison du kick
le désactivé :P
Merci de pas etre trop méchant, c'est mon premier dialog :))
Plopman
Laissé donc un pti message ...
Source
- alias anticlones { dialog -m a.c a.c }
- dialog a.c {
- title "Anti-clones"
- size -1 -1 160 312
- option dbu
- box "Général", 1, 8 9 143 23
- button "Ajouter", 3, 57 64 36 12, flat
- button "Supprimer", 2, 57 80 36 12, flat
- radio "off", 7, 42 15 26 10, flat
- radio "on", 6, 14 15 26 10, flat
- box "Salons", 8, 9 33 142 75
- list 4, 98 41 47 64, size
- box "Réglage", 5, 8 111 142 46
- edit "", 9, 45 43 50 10
- text "Chan", 10, 15 44 25 8
-
- text "Quand on dépasse le nombre maximum de clones:", 15, 13 122 123 8
- radio "Kickall", 16, 15 133 27 10
- radio "Kickbanall", 17, 15 144 35 10
- button "Ok / Enregistrer", 18, 8 297 142 12, flat
- radio "Mode +im", 19, 76 134 35 10
- radio "mode+", 20, 76 145 25 10
- edit "", 21, 101 145 36 10
- box "Host/nick a ignoré", 22, 8 159 142 80
- text "Nick/host", 23, 28 172 37 8
- button "Ajouter à la liste", 24, 11 199 65 12, flat
- list 25, 81 166 64 64, size
- edit "", 26, 11 184 65 10
- button "Supprimer de la liste", 27, 11 217 65 12, flat
- text "Anti-clones par Plopman", 28, 85 1 65 8
- edit "", 12, 125 16 22 10
- text "Max clones:", 13, 89 17 35 8
- box "Avertissement / Raisons", 14, 8 242 142 50
- text "raison du kick", 29, 13 255 38 8
- edit "", 30, 54 253 85 10, autohs
- check "Avertir quand max clones ( notice )", 31, 13 267 132 10
-
- }
- ON *:DIALOG:a.c:*:*:{
- if ($devent == init) {
- update.a
- update.h
- did -a a.c 12 %nc.ac
- did -a a.c 30 %raison.a
- if (%ac.e == on) { did -c a.c 6 }
- else {
- did -c a.c 7
- }
- if (%ac.mode == im) {
- did -c a.c 19
- did -b a.c 21
- }
- else { did -c a.c 20
- did -a a.c 21 %ac.mode
- }
- if (%type.a == kba) {
- did -c a.c 17
- }
- else {
- did -c a.c 16
- }
- if (%prev.a == on) {
- did -c a.c 31
- }
- else {
- did -u a.c 31
- }
-
- }
-
- if ($devent == sclick) {
- if ($did == 31) {
- if ($did(31).state == 1) { set %prev.a on }
- else {
- set %prev.a off
-
- }
- }
-
-
- if ($did == 16) {
- set %type.a ka
-
- if (%ac.e == on) {
- did -c a.c 6
- }
- else {
- did -c a.c 7
- }
- if (%ac.mode == im) {
- did -c a.c 19 }
- else { did -c a.c 20
- }
- }
-
- if ($did == 3) {
- set %chan.a $addtok(%chan.a,$did(9),32)
- update.a
- }
-
- if ($did == 17) {
-
- set %type.a kba
- if (%ac.e == on) {
- did -c a.c 6
- }
- else {
- did -c a.c 7
- }
- if (%ac.mode == im) {
- did -c a.c 19 }
- else {
- did -c a.c 20
-
- }
-
- }
-
- if ($did == 7) {
-
- set %ac.e off
- if (%type.a == kba) {
- did -c a.c 17
- }
- else {
- did -c a.c 16
- }
- if (%ac.mode == im) {
- did -c a.c 19 }
- else {
- did -c a.c 20
-
- }
-
- }
- if ($did == 6) {
- set %ac.e on
-
- if (%type.a == kba) {
- did -c a.c 17
- }
- else {
- did -c a.c 16
- }
- if (%ac.mode == im) {
- did -c a.c 19 }
- else {
- did -c a.c 20
- }
- }
-
- if ($did == 2) {
- var %del.a = $did(4).seltext
- set %chan.a $remtok(%chan.a,%del.a,32)
- update.a
- }
- if ($did == 27) {
- var %del.a = $did(25).seltext
- set %chan.h $remtok(%chan.h,%del.a,32)
- update.h
- }
-
- if ($did == 24) { set %chan.h $addtok(%chan.h,$did(26),32)
- update.h
-
- }
-
- if ($did == 20) {
- did -e a.c 21
- set %ac.mode m
- if (%ac.e == on) {
- did -c a.c 6
- }
- else {
- did -c a.c 7
- }
-
- if (%type.a == kba) {
- did -c a.c 17
- }
- else {
- did -c a.c 16
- }
- }
- if ($did == 18) {
- set %nc.ac $did(12)
- set %raison.a $did(30)
- if ( %ac.mode == im ) { halt } else {
- set %ac.mode $did(21)
- }
- dialog -x a.c a.c
- }
-
- if ($did == 19) {
- set %ac.mode im
- did -b a.c 21
- if (%ac.e == on) {
- did -c a.c 6 |
- }
- else {
- did -c a.c 7
- }
-
- if (%type.a == kba) {
- did -c a.c 17
- }
- else {
- did -c a.c 16
- }
-
- }
-
- }
-
- }
- alias update.a {
- did -r a.c 4
- var %update.a = 1
- if ($gettok(%chan.a,%update.a,32) != $null) {
- :update.a
- did -a a.c 4 $gettok(%chan.a,%update.a,32)
- inc %update.a
- if ($gettok(%chan.a,%update.a,32) != $null) {
- goto update.a
- }
- }
- }
- alias update.h {
- did -r a.c 25
- var %update.h = 1
- if ($gettok(%chan.h,%update.h,32) != $null) {
- :update.h
- did -a a.c 25 $gettok(%chan.h,%update.h,32)
- inc %update.h
- if ($gettok(%chan.h,%update.h,32) != $null) { goto update.h
- }
- }
- }
- on *:JOIN:%chan.a: {
- if (%ac.e == on) && ($me isop $chan ) && ($address($nick,2) != $address($me,2)) && ( $ialchan($address($nick,2),$chan,0) >= %nc.ac ) {
- if ($address($nick,2) isin %chan.h) { halt }
- if ($nick isin %chan.h) { halt }
- if (%type.a == kba) {
- ban # $nick 2
- }
- if (%ac.mode == im) {
- mode $chan +im
- }
- if (%ac.mode != im) {
- mode $chan + $+ %ac.mode
- }
-
-
- var %ir 1
- while ($ial($address($nick,2),%ir).nick != $null) {
- kick # $ial($address($nick,2),%ir).nick %raison.a
- inc %ir
-
-
-
- }
- if (%ac.mode == im) {
- mode $chan -m
- timer 1 3 mode $chan -i
- }
- if (%ac.mode != im) {
- mode $chan - $+ %ac.mode
- }
-
-
- }
- set %nc.ac1 $calc(%nc.ac -1)
- if (%ac.e == on) && (%prev.a == on) && ( $me isop $chan ) && ($address($nick,2) != $address($me,2)) && ( $ialchan($address($nick,2),$chan,0) = %nc.ac1 ) {
- if ($address($nick,2) isin %chan.h) { halt }
- if ($nick isin %chan.h) { halt }
- notice $nick 4/!\1 Dernier clones autorisé avant sanction! Attention 4/!\ 1 %nc.ac Clones maximum autorisé sur $chan
- echo -a [Anti-Clones] Info: 4Maximum de clones atteind pour $nick . A recu une notice d'avertissement.
- }
-
- }
alias anticlones { dialog -m a.c a.c }
dialog a.c {
title "Anti-clones"
size -1 -1 160 312
option dbu
box "Général", 1, 8 9 143 23
button "Ajouter", 3, 57 64 36 12, flat
button "Supprimer", 2, 57 80 36 12, flat
radio "off", 7, 42 15 26 10, flat
radio "on", 6, 14 15 26 10, flat
box "Salons", 8, 9 33 142 75
list 4, 98 41 47 64, size
box "Réglage", 5, 8 111 142 46
edit "", 9, 45 43 50 10
text "Chan", 10, 15 44 25 8
text "Quand on dépasse le nombre maximum de clones:", 15, 13 122 123 8
radio "Kickall", 16, 15 133 27 10
radio "Kickbanall", 17, 15 144 35 10
button "Ok / Enregistrer", 18, 8 297 142 12, flat
radio "Mode +im", 19, 76 134 35 10
radio "mode+", 20, 76 145 25 10
edit "", 21, 101 145 36 10
box "Host/nick a ignoré", 22, 8 159 142 80
text "Nick/host", 23, 28 172 37 8
button "Ajouter à la liste", 24, 11 199 65 12, flat
list 25, 81 166 64 64, size
edit "", 26, 11 184 65 10
button "Supprimer de la liste", 27, 11 217 65 12, flat
text "Anti-clones par Plopman", 28, 85 1 65 8
edit "", 12, 125 16 22 10
text "Max clones:", 13, 89 17 35 8
box "Avertissement / Raisons", 14, 8 242 142 50
text "raison du kick", 29, 13 255 38 8
edit "", 30, 54 253 85 10, autohs
check "Avertir quand max clones ( notice )", 31, 13 267 132 10
}
ON *:DIALOG:a.c:*:*:{
if ($devent == init) {
update.a
update.h
did -a a.c 12 %nc.ac
did -a a.c 30 %raison.a
if (%ac.e == on) { did -c a.c 6 }
else {
did -c a.c 7
}
if (%ac.mode == im) {
did -c a.c 19
did -b a.c 21
}
else { did -c a.c 20
did -a a.c 21 %ac.mode
}
if (%type.a == kba) {
did -c a.c 17
}
else {
did -c a.c 16
}
if (%prev.a == on) {
did -c a.c 31
}
else {
did -u a.c 31
}
}
if ($devent == sclick) {
if ($did == 31) {
if ($did(31).state == 1) { set %prev.a on }
else {
set %prev.a off
}
}
if ($did == 16) {
set %type.a ka
if (%ac.e == on) {
did -c a.c 6
}
else {
did -c a.c 7
}
if (%ac.mode == im) {
did -c a.c 19 }
else { did -c a.c 20
}
}
if ($did == 3) {
set %chan.a $addtok(%chan.a,$did(9),32)
update.a
}
if ($did == 17) {
set %type.a kba
if (%ac.e == on) {
did -c a.c 6
}
else {
did -c a.c 7
}
if (%ac.mode == im) {
did -c a.c 19 }
else {
did -c a.c 20
}
}
if ($did == 7) {
set %ac.e off
if (%type.a == kba) {
did -c a.c 17
}
else {
did -c a.c 16
}
if (%ac.mode == im) {
did -c a.c 19 }
else {
did -c a.c 20
}
}
if ($did == 6) {
set %ac.e on
if (%type.a == kba) {
did -c a.c 17
}
else {
did -c a.c 16
}
if (%ac.mode == im) {
did -c a.c 19 }
else {
did -c a.c 20
}
}
if ($did == 2) {
var %del.a = $did(4).seltext
set %chan.a $remtok(%chan.a,%del.a,32)
update.a
}
if ($did == 27) {
var %del.a = $did(25).seltext
set %chan.h $remtok(%chan.h,%del.a,32)
update.h
}
if ($did == 24) { set %chan.h $addtok(%chan.h,$did(26),32)
update.h
}
if ($did == 20) {
did -e a.c 21
set %ac.mode m
if (%ac.e == on) {
did -c a.c 6
}
else {
did -c a.c 7
}
if (%type.a == kba) {
did -c a.c 17
}
else {
did -c a.c 16
}
}
if ($did == 18) {
set %nc.ac $did(12)
set %raison.a $did(30)
if ( %ac.mode == im ) { halt } else {
set %ac.mode $did(21)
}
dialog -x a.c a.c
}
if ($did == 19) {
set %ac.mode im
did -b a.c 21
if (%ac.e == on) {
did -c a.c 6 |
}
else {
did -c a.c 7
}
if (%type.a == kba) {
did -c a.c 17
}
else {
did -c a.c 16
}
}
}
}
alias update.a {
did -r a.c 4
var %update.a = 1
if ($gettok(%chan.a,%update.a,32) != $null) {
:update.a
did -a a.c 4 $gettok(%chan.a,%update.a,32)
inc %update.a
if ($gettok(%chan.a,%update.a,32) != $null) {
goto update.a
}
}
}
alias update.h {
did -r a.c 25
var %update.h = 1
if ($gettok(%chan.h,%update.h,32) != $null) {
:update.h
did -a a.c 25 $gettok(%chan.h,%update.h,32)
inc %update.h
if ($gettok(%chan.h,%update.h,32) != $null) { goto update.h
}
}
}
on *:JOIN:%chan.a: {
if (%ac.e == on) && ($me isop $chan ) && ($address($nick,2) != $address($me,2)) && ( $ialchan($address($nick,2),$chan,0) >= %nc.ac ) {
if ($address($nick,2) isin %chan.h) { halt }
if ($nick isin %chan.h) { halt }
if (%type.a == kba) {
ban # $nick 2
}
if (%ac.mode == im) {
mode $chan +im
}
if (%ac.mode != im) {
mode $chan + $+ %ac.mode
}
var %ir 1
while ($ial($address($nick,2),%ir).nick != $null) {
kick # $ial($address($nick,2),%ir).nick %raison.a
inc %ir
}
if (%ac.mode == im) {
mode $chan -m
timer 1 3 mode $chan -i
}
if (%ac.mode != im) {
mode $chan - $+ %ac.mode
}
}
set %nc.ac1 $calc(%nc.ac -1)
if (%ac.e == on) && (%prev.a == on) && ( $me isop $chan ) && ($address($nick,2) != $address($me,2)) && ( $ialchan($address($nick,2),$chan,0) = %nc.ac1 ) {
if ($address($nick,2) isin %chan.h) { halt }
if ($nick isin %chan.h) { halt }
notice $nick 4/!\1 Dernier clones autorisé avant sanction! Attention 4/!\ 1 %nc.ac Clones maximum autorisé sur $chan
echo -a [Anti-Clones] Info: 4Maximum de clones atteind pour $nick . A recu une notice d'avertissement.
}
}
Conclusion
Pour lancer c'est /anticlones
Je pense que ce code est parfait si vous devez garder un salon lorsque vous etes absent ;o)
Si vous voullez pas changer le mode du salon, cliquer sur mode+ et laissé la case vide.
Plopman
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
TECHDAYS PARIS 2010 : LA BI DANS SHAREPOINT 2010TECHDAYS PARIS 2010 : LA BI DANS SHAREPOINT 2010 par ROMELARD Fabrice
Animé par: Vincent Bellet et Baptiste Giraudier La BI dans SharePoint 2010, Les nouveaux services d'application dans SP2010 et SQL Server Reporting services 2008 R2. La BI dans SharePoint est généralisée pour tous afin de permettre à tous les coll...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2010 : PLAN DE MIGRATION VERS SHAREPOINT 2010TECHDAYS PARIS 2010 : PLAN DE MIGRATION VERS SHAREPOINT 2010 par ROMELARD Fabrice
Animé par: Arnault Nouvel et Antoine Dongois Le processus à prendre : Apprendre (découvrir la plateforme) Préparer (documenter l'historique et choisir la méthode de MAJ) Test (Test de MAJ) Implémenter (Effectuer la MAJ) Valid...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2010 : LA PLEINIèRE DU SECOND JOURTECHDAYS PARIS 2010 : LA PLEINIèRE DU SECOND JOUR par ROMELARD Fabrice
Après un retour sur l'histoire des TechDays de Paris et le fait que ce soit le plus gros event MS au monde (du fait de sa gratuité), le président de MS France (Eric Boustoullier) a fait une présentation de la vision Microsoft pour les années à venir...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Forum
RE : ON RAWMODERE : ON RAWMODE par WorldDMT
Cliquez pour lire la suite par WorldDMT AVERTISSMENT ET KIKKAVERTISSMENT ET KIKK par mouhcine951990
Cliquez pour lire la suite par mouhcine951990
Logiciels
DB-MAIN (9.1.0)DB-MAIN (9.1.0)DB-MAIN is a data-modeling and data-architecture tool. It is designed to help developers and anal... Cliquez pour télécharger DB-MAIN Xilisoft DPG Convertisseur (5.1.37.0120)XILISOFT DPG CONVERTISSEUR (5.1.37.0120)Xilisoft DPG Convertisseur offre aux fans de Nintendo DS une bonne solution leur permettant de dé... Cliquez pour télécharger Xilisoft DPG Convertisseur GraphicsGale (2.01.01)GRAPHICSGALE (2.01.01)GraphicsGale est un logiciel de PixelArt avec de nombreuse fonctionnalités permettant de réalisé ... Cliquez pour télécharger GraphicsGale Architecte 3D (Platinum 2010)ARCHITECTE 3D (PLATINUM 2010)Architecte 3D Platinium vous permet de concevoir facilement les plans votre future maison, de l'é... Cliquez pour télécharger Architecte 3D TeamViewer 5 (TeamViewer 5)TEAMVIEWER 5 (TEAMVIEWER 5)Dépanner un ami,expliquer une manipulation devient un jeu d'enfant.
Prise en main d'un autre ord... Cliquez pour télécharger TeamViewer 5
|