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
[RIA SERVICES] MAITRE - DéTAIL ET DOMAINDATASOURCE[RIA SERVICES] MAITRE - DéTAIL ET DOMAINDATASOURCE par Audrey
A l'occasion d'un projet client, j'ai utilisé RIA Services avec Silverlight 3 (mais cela fonctionne aussi avec la version 4), et je l'ai utilisé pour une interface façon Maitre / Détail. Voici comment j'ai procédé pour arriver à mes fins. Nous allons pren...
Cliquez pour lire la suite de l'article par Audrey CSDL FUNCTIONCSDL FUNCTION par Matthieu MEZIL
Dans mon post précédent , j'ai utilisé une CSDL Function afin de générer une requête SQL avec un DateDiff utilisant la date courante sur la BD à partir d'une requête LINQ. Dans le cadre de ce post , vous avez probablement remarqué que dans le cadre de plu...
Cliquez pour lire la suite de l'article par Matthieu MEZIL LINQ TO ENTITIESLINQ TO ENTITIES par Matthieu MEZIL
Cette semaine je suis à Montréal en tant que speaker sur Entity Framework pour l'évènement confoo . J'en profite pour remercier les organisateurs de cet évènement de m'avoir fait confiance et Access-IT de m'avoir permis d'y participer. En parallèle, j'ai ...
Cliquez pour lire la suite de l'article par Matthieu MEZIL FAIRE APPARAITRE L'ONGLET 'DéVELOPPEUR' DANS OFFICE 2010FAIRE APPARAITRE L'ONGLET 'DéVELOPPEUR' DANS OFFICE 2010 par neodante
La nouvelle interface d'Office 2010 à amener quelques modifications par rapport à celle de 2007. Certes mineures, ces modifications ont fait disparaître la case à cocher de l'onglet 'Développeur' en première page du panneau du 'bouton Office' (dans Office...
Cliquez pour lire la suite de l'article par neodante [ASTUCE] PATCH POUR MICROSOFT FORUMS NNTP BRIDGE V1[ASTUCE] PATCH POUR MICROSOFT FORUMS NNTP BRIDGE V1 par pierre
Si vous avez téléchargé comme moi Microsoft Forums NNTP Bridge V1 avant le 11 mars 2010 (voir [Astuce] Disponibilité de Microsoft Forum NNTP Bridge Version 1.0), un problème de date localisée pour les non anglais était présent. Un patch est disponibl...
Cliquez pour lire la suite de l'article par pierre
Logiciels
Xilisoft Convertisseur Vidéo Ultimate (5.1.39.0305)XILISOFT CONVERTISSEUR VIDéO ULTIMATE (5.1.39.0305)Xilisoft Convertisseur Vidéo Ultimate est un outil puissant de conversion vidéo, facile à utilise... Cliquez pour télécharger Xilisoft Convertisseur Vidéo Ultimate Xilisoft DVD Ripper Ultimate (5.0.64.0304)XILISOFT DVD RIPPER ULTIMATE (5.0.64.0304)Xilisoft DVD Ripper Ultimate est un logiciel excellent pour copier et convertir DVD vers presque ... Cliquez pour télécharger Xilisoft DVD Ripper Ultimate Rigs of Rods (63.3)RIGS OF RODS (63.3)c'est un jeu de multi-simulation camions,autobus voitures, avions, bateaux, hélicoptère avec défo... Cliquez pour télécharger Rigs of Rods Konvertor (4.00)KONVERTOR (4.00)Le logiciel est un gestionnaire multimedia affichant, jouant et convertissant plus de 2000 format... Cliquez pour télécharger Konvertor
|