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
QUELQUES TRUCS INTéRESSANTS (05/09/2010)QUELQUES TRUCS INTéRESSANTS (05/09/2010) par coq
Cette fois-ci : .NET Debug / Performance Sécurité SQL Server .NET Determining if a type is defined in the .NET Framework (blog de Scott Dorman) Ha tiens, je n'avais jamais vraiment pensé à utiliser le jeton de clé publique...
Cliquez pour lire la suite de l'article par coq ENUMERABLECOLLECTIONENUMERABLECOLLECTION par Matthieu MEZIL
Prenons le scénario suivant. On utilise MVVM. On a les deux classes suivantes dans le model : public class Child { } public class Parent { private ObservableCollection < Child > _children; public ObservableCollection < Child > Children { get {...
Cliquez pour lire la suite de l'article par Matthieu MEZIL [HS] CHROME 6 + MOI = COUP DE GUEULE ![HS] CHROME 6 + MOI = COUP DE GUEULE ! par JeremyJeanson
Attention, le poste qui suit n'est pas la complainte d'une personne : Qui n'aime pas Chrome. D'un anti Google. D'un développeur qui a un poil énorme dans la main. Ceux qui me fréquentent savent que je change de navigateur favori tous les 2 ou 3 mois afin ...
Cliquez pour lire la suite de l'article par JeremyJeanson [WP7] UTILISER UN WRAPPANEL DANS UNE APPLICATION WINDOWS PHONE 7[WP7] UTILISER UN WRAPPANEL DANS UNE APPLICATION WINDOWS PHONE 7 par Audrey
Lors de la réalisation de ma 2ème application Windows Phone 7, j'ai souhaité utiliser un WrapPanel pour afficher plusieurs photos. Mais le contrôle WrapPanel ne fait pas parti de la liste des contrôles inclus dans le SDK de la version Beta des outils pour...
Cliquez pour lire la suite de l'article par Audrey
Logiciels
WebLogAndPass (1.0.0)WEBLOGANDPASS (1.0.0)WebLogAndPass est un logiciel permettant de mémoriser vos sites préférés et pour chacun d'entre-e... Cliquez pour télécharger WebLogAndPass uTorrent (2.0.4)UTORRENT (2.0.4)C'est un client BitTorrent très puissant et très performant. Comme son nom l'indique, uTorrent (m... Cliquez pour télécharger uTorrent Bureau de Gestion - ERP Devis Facturation (2.02)BUREAU DE GESTION - ERP DEVIS FACTURATION (2.02)- Version gratuite du 10/06/2010
Le Bureau de Gestion est un logiciel dédié à la gestion de l'en... Cliquez pour télécharger Bureau de Gestion - ERP Devis Facturation 4Videosoft Transfert iPod Mac (3.2.08)4VIDEOSOFT TRANSFERT IPOD MAC (3.2.08)4Videosoft Transfert iPod-Mac caractérise principalement à transférer les fichiers iPod vers Mac.... Cliquez pour télécharger 4Videosoft Transfert iPod Mac 4Videosoft HD Convertisseur (3.3.08)4VIDEOSOFT HD CONVERTISSEUR (3.3.08)Etant le meilleur HD Vidéo Convertisseur, 4Videosoft HD Convertisseur, vous pouvez regarder la vi... Cliquez pour télécharger 4Videosoft HD Convertisseur
|