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 2012 : PLEINIèRE SECOND JOURTECHDAYS PARIS 2012 : PLEINIèRE SECOND JOUR par ROMELARD Fabrice
Après une première journée dédiée aux développeurs, cette seconde journée est dédiée au monde des entreprises et de ses applications. Ainsi, cette pleinière est dédiée à faire un 360 de l'évolution des applications Business aux demandes ac...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2012 : RETOUR D'EXPéRIENCE SUR LA MISE EN PLACE D'UN CLOUD PRIVéTECHDAYS PARIS 2012 : RETOUR D'EXPéRIENCE SUR LA MISE EN PLACE D'UN CLOUD PRIVé par ROMELARD Fabrice
Speaker : Guillaume Rochette Cette session est dédiée à fournir le retour sur la mise en place d'un cloud privé (IaaS) par Osiatis pour son compte ou celui de ses clients. Ce projet s'est déroulé sur 4 mois et a permis de faire évoluer...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2012 : COMMENT SHAREPOINT A SAUVé MES TECHDAYSTECHDAYS PARIS 2012 : COMMENT SHAREPOINT A SAUVé MES TECHDAYS par ROMELARD Fabrice
Speakers : Lionel Limozin et Alain Marty La session commence par une découverte de SharePoint à travers la mise en place d'un environnement SharePoint pour la gestion des Sessions animées par BeWise. Le besoin est très ba...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice PERSPECTIVE 3.0 POUR SILVERLIGHT 5.0PERSPECTIVE 3.0 POUR SILVERLIGHT 5.0 par odewit
Je viens de publier la version 3.0 de Perspective pour Silverlight, qui regroupe un portage sous Silverlight 5.0 des fonctionnalités de Perspective 2.0, le framework 3D de haut-niveau introduit récemment et de nouveaux exemples de code. En voici la li...
Cliquez pour lire la suite de l'article par odewit TECHDAYS PARIS 2012 : MYTHES ET RéALITéS VIRTUALISATION ET CLOUD PRIVéTECHDAYS PARIS 2012 : MYTHES ET RéALITéS VIRTUALISATION ET CLOUD PRIVé par ROMELARD Fabrice
Speakers : Christophe Dubos et Fabrice Meillon La Session est dédiée à casser la réputation que Microsoft traine sur son incapacité à fournir des solutions de Cloud privé. La session a commencé par un retour sur la puissance des DataCent...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Forum
RE : AIDERE : AIDE par Nico26000
Cliquez pour lire la suite par Nico26000 RE : AIDERE : AIDE par WorldDMT
Cliquez pour lire la suite par WorldDMT AIDEAIDE par Nico26000
Cliquez pour lire la suite par Nico26000
Logiciels
Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Easy-Planning (1.0.0.1)EASY-PLANNING (1.0.0.1)Basé sur les mêmes principes que MyPlanning, Easy-Planning permet de créer des plannings sous la ... Cliquez pour télécharger Easy-Planning COLLECTOR PLUS (3.00B)COLLECTOR PLUS (3.00B)COLLECTOR PLUS version 3.00B est un logiciel utilisant une base de données alimentée par :
- L... Cliquez pour télécharger COLLECTOR PLUS PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO LettresFaciles 2011 (8.0.0.1)LETTRESFACILES 2011 (8.0.0.1)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles 2011
|