Soyez le premier à donner votre avis sur cette source.
Snippet vu 13 334 fois - Téléchargée 27 fois
;;;; Anti Flood ;;;; menu menubar { Anti Flood:.dialog -m Tom_mlkj.antiflood Tom_mlkj.antiflood } dialog Tom_mlkj.antiflood { title .:: Anti Flood :: Tom_mlkj ::. size -1 -1 145 113 option dbu tab "Canaux", 7, 0 2 144 95 text "Kicker la personne après", 8, 4 32 60 8, tab 7 edit "", 9, 64 32 12 10, tab 7 autohs text "lignes en", 10, 77 32 24 8, tab 7 edit "", 11, 99 32 12 10, tab 7 autohs text "secondes", 12, 111 32 25 8, tab 7 check "Activer", 13, 4 44 28 10, tab 7 box "Action", 23, 2 57 140 34, tab 7 text "Kicker la personne après", 24, 4 66 59 8, tab 7 edit "", 25, 64 66 12 10, tab 7 autohs text "lignes en", 26, 77 66 23 8, tab 7 edit "", 27, 99 66 12 10, tab 7 autohs text "secondes", 28, 111 66 25 8, tab 7 check "Activer", 29, 4 77 29 10, tab 7 box "Texte", 22, 2 23 140 34, tab 7 edit "", 42, 73 44 66 10, tab 7 autohs center text "Raison du kick :", 43, 34 45 40 8, tab 7 text "Raison du kick :", 44, 34 78 40 8, tab 7 edit "", 45, 73 77 66 10, tab 7 autohs center tab "PV", 14 box "Texte", 15, 2 23 140 34, tab 14 text "Ignoré la personne après", 16, 4 32 60 8, tab 14 edit "", 17, 64 32 12 10, tab 14 autohs text "lignes en", 18, 77 32 24 8, tab 14 edit "", 19, 99 32 12 10, tab 14 autohs text "secondes", 20, 111 32 25 8, tab 14 check "Activer", 30, 4 44 50 10, tab 14 box "Action", 31, 2 57 140 34, tab 14 text "Ignoré la personne après", 32, 4 66 59 8, tab 14 edit "", 33, 64 66 12 10, tab 14 autohs text "lignes en", 34, 77 66 23 8, tab 14 edit "", 35, 99 66 12 10, tab 14 autohs text "secondes", 1, 111 66 25 8, tab 14 check "Activer", 2, 4 77 29 10, tab 14 text "Message a lui envoyer :", 46, 33 46 57 8, tab 14 edit "", 47, 90 45 49 10, tab 14 autohs center text "Message a lui envoyer :", 48, 33 79 57 8, tab 14 edit "", 49, 90 78 49 10, tab 14 autohs center tab "Notices", 21 box "Notices", 3, 2 37 140 34, tab 21 text "Ignoré la personne après", 4, 4 47 60 8, tab 21 edit "", 5, 64 47 12 10, tab 21 autohs text "notices en", 6, 77 47 25 8, tab 21 edit "", 36, 102 47 12 10, tab 21 autohs text "secondes", 37, 114 48 24 8, tab 21 check "Activer", 38, 4 58 28 10, tab 21 text "Message a lui envoyer :", 50, 33 59 58 8, tab 21 edit "", 51, 90 58 49 10, tab 21 autohs center button "ok", 39, 43 101 25 9, ok button "Note", 40, 72 101 25 9 } On *:dialog:Tom_mlkj.antiflood:init:*:{ if ( $group(#Tom_mlkj.flood.chan.texte) = on ) { did -c Tom_mlkj.antiflood 13 } if ( $group(#Tom_mlkj.flood.chan.texte) = off ) { did -u Tom_mlkj.antiflood 13 } if ( $group(#Tom_mlkj.flood.chan.action) = on ) { did -c Tom_mlkj.antiflood 29 } if ( $group(#Tom_mlkj.flood.chan.action) = off ) { did -u Tom_mlkj.antiflood 29 } if ( $group(#Tom_mlkj.flood.pv.texte) = on ) { did -c Tom_mlkj.antiflood 30 } if ( $group(#Tom_mlkj.flood.pv.texte) = off ) { did -u Tom_mlkj.antiflood 30 } if ( $group(#Tom_mlkj.flood.pv.action) = on ) { did -c Tom_mlkj.antiflood 2 } if ( $group(#Tom_mlkj.flood.pv.action) = off ) { did -u Tom_mlkj.antiflood 2 } if ( $group(#Tom_mlkj.flood.notice) = on ) { did -c Tom_mlkj.antiflood 38 } if ( $group(#Tom_mlkj.flood.notice) = off ) { did -u Tom_mlkj.antiflood 38 } if ( %tps.flood.text != $null ) { did -a Tom_mlkj.antiflood 11 %tps.flood.text } if ( %ligne.flood.text != $null ) { did -a Tom_mlkj.antiflood 9 %ligne.flood.text } if ( %ligne.flood.action != $null ) { did -a Tom_mlkj.antiflood 25 %ligne.flood.action } if ( %tps.flood.action != $null ) { did -a Tom_mlkj.antiflood 27 %tps.flood.action } if ( %Tom_mlkj.flood.chan.text != $null ) { did -a Tom_mlkj.antiflood 42 %Tom_mlkj.flood.chan.text } if ( %Tom_mlkj.flood.chan.action != $null ) { did -a Tom_mlkj.antiflood 45 %Tom_mlkj.flood.chan.action } if ( %ligne.flood.pv.text != $null ) { did -a Tom_mlkj.antiflood 17 %ligne.flood.pv.text } if ( %tps.flood.pv.text != $null ) { did -a Tom_mlkj.antiflood 19 %tps.flood.pv.text } if ( %ligne.flood.pv.action != $null ) { did -a Tom_mlkj.antiflood 33 %ligne.flood.pv.action } if ( %tps.flood.pv.action != $null ) { did -a Tom_mlkj.antiflood 35 %tps.flood.pv.action } if ( %raison.ignor.pv.text != $null ) { did -a Tom_mlkj.antiflood 47 %raison.ignor.pv.text } if ( %raison.ignor.pv.action != $null ) { did -a Tom_mlkj.antiflood 49 %raison.ignor.pv.action } if ( %tps.flood.notice != $null ) { did -a Tom_mlkj.antiflood 36 %tps.flood.notice } if ( %ligne.flood.notice != $null ) { did -a Tom_mlkj.antiflood 5 %ligne.flood.notice } if ( %raison.ignor.notice != $null ) { did -a Tom_mlkj.antiflood 51 %raison.ignor.notice } } On *:dialog:Tom_mlkj.antiflood:sclick:13:{ if ($did(13).state = 1 ) { .enable #Tom_mlkj.flood.chan.texte } else { .disable #Tom_mlkj.flood.chan.texte } } On *:dialog:Tom_mlkj.antiflood:sclick:29:{ if ($did(29).state = 1 ) { .enable #Tom_mlkj.flood.chan.action } else { .disable #Tom_mlkj.flood.chan.action } } On *:dialog:Tom_mlkj.antiflood:sclick:30:{ if ($did(30).state = 1 ) { .enable #Tom_mlkj.flood.pv.texte } else { .disable #Tom_mlkj.flood.pv.texte } } On *:dialog:Tom_mlkj.antiflood:sclick:2:{ if ($did(2).state = 1 ) { .enable #Tom_mlkj.flood.pv.action } else { .disable #Tom_mlkj.flood.pv.action } } On *:dialog:Tom_mlkj.antiflood:sclick:38:{ if ($did(38).state = 1 ) { .enable #Tom_mlkj.flood.notice } else { .disable #Tom_mlkj.flood.notice } } On *:dialog:Tom_mlkj.antiflood:sclick:39:{ if ( $did(11) != $null ) { .set %tps.flood.text $did(11) } if ( $did(9) != $null ) { .set %ligne.flood.text $did(9) } if ( $did(25) != $null ) { .set %ligne.flood.action $did(25) } if ( $did(27) != $null ) { .set %tps.flood.action $did(27) } if ( $did(42) != $null ) { .set %Tom_mlkj.flood.chan.text $did(42) } if ( $did(45) != $null ) { .set %Tom_mlkj.flood.chan.action $did(45) } if ( $did(17) != $null ) { .set %ligne.flood.pv.text $did(17) } if ( $did(19) != $null ) { .set %tps.flood.pv.text $did(19) } if ( $did(33) != $null ) { .set %ligne.flood.pv.action $did(33) } if ( $did(35) != $null ) { .set %tps.flood.pv.action $did(35) } if ( $did(47) != $null ) { .set %raison.ignor.pv.text $did(47) } if ( $did(49) != $null ) { .set %raison.ignor.pv.action $did(49) } if ( $did(36) != $null ) { .set %tps.flood.notice $did(36) } if ( $did(5) != $null ) { .set %ligne.flood.notice $did(5) } if ( $did(51) != $null ) { .set %raison.ignor.notice $did(51) } } On *:dialog:Tom_mlkj.antiflood:sclick:40:{ dialog -m Tom_mlkj.flood.note Tom_mlkj.flood.note } #Tom_mlkj.flood.chan.texte off on *:text:*:#: { /inc %flood-chan-text [ $+ [ $nick ] ] if ((%flood-chan-text [ $+ [ $nick ] ] == %ligne.flood.text ) && ( $me isop $chan )) { kick $chan $nick %Tom_mlkj.flood.chan.text | /unset %flood-chan-text [ $+ [ $nick ] ] } if (%flood-chan-text [ $+ [ $nick ] ] == 1) { /.timer 1 %tps.flood.action /unset %flood-chan-text [ $+ [ $nick ] ] } } #Tom_mlkj.flood.chan.texte end #Tom_mlkj.flood.chan.action off on *:action:*:#: { /inc %flood-chan-action [ $+ [ $nick ] ] if ((%flood-chan-action [ $+ [ $nick ] ] == %ligne.flood.action ) && ( $me isop $chan )) { kick $chan $nick %Tom_mlkj.flood.chan.action | /unset %flood-chan-action [ $+ [ $nick ] ] } if (%flood-chan-action [ $+ [ $nick ] ] == 1) { /.timer 1 %tps.flood.action /unset %flood-chan-action [ $+ [ $nick ] ] } } #Tom_mlkj.flood.chan.action end #Tom_mlkj.flood.pv.texte off on *!:text:*:?: { /inc %flood-pv-text [ $+ [ $nick ] ] if (%flood-pv-text [ $+ [ $nick ] ] == %ligne.flood.pv.text ) { /.ignore -pu $+ %timer $nick | echo -a - | echo -a T12u peux maintenant fermée ce PV. | echo -a - | .notice $nick %raison.ignor.pv.text 12( Anti Flood Par Tom_mlkj ) | /unset %flood-pv-text [ $+ [ $nick ] ] } if (%flood-pv-text [ $+ [ $nick ] ] == 1) { /.timer 1 %tps.flood.pv.text /unset %flood-pv-text [ $+ [ $nick ] ] } } #Tom_mlkj.flood.pv.texte end #Tom_mlkj.flood.pv.action off on *!:text:*:?: { /inc %flood-pv-text [ $+ [ $nick ] ] if (%flood-pv-text [ $+ [ $nick ] ] == %ligne.flood.pv.action ) { /.ignore -pu $+ %timer $nick | echo -a - | echo -a T12u peux maintenant fermée ce PV. | echo -a - | .notice $nick %raison.ignor.pv.action 12( Anti Flood Par Tom_mlkj ) | /unset %flood-pv-text [ $+ [ $nick ] ] } if (%flood-pv-text [ $+ [ $nick ] ] == 1) { /.timer 1 %tps.flood.pv.action /unset %flood-pv-text [ $+ [ $nick ] ] } } #Tom_mlkj.flood.pv.action end #Tom_mlkj.flood.notice off On *:notice:*:*:{ if (( $nick == chanserv ) || ( $nick == botserv ) || ( $nick == nickserv )) { halt } /inc %noticefloodtext [ $+ [ $nick ] ] if (%noticefloodtext [ $+ [ $nick ] ] == %ligne.flood.notice ) { /.ignore -nu $+ %timer $nick | echo -a - | echo -a 12 $+ $nick a été ignoré : FLOOD Par NOTICE | echo -a - | .notice $nick %raison.ignor.notice 12( Anti Flood Par Tom_mlkj ) | /unset %%noticefloodtext [ $+ [ $nick ] ] } if (%noticefloodtext [ $+ [ $nick ] ] == 1) { /.timer 1 %tps.flood.notice /unset %%noticefloodtext [ $+ [ $nick ] ] } } #Tom_mlkj.flood.notice end dialog Tom_mlkj.flood.note { title .:: Anti Flood ::. size -1 -1 103 88 option dbu text "Ignorer les pv des floodeurs", 1, 1 7 67 8 edit "", 2, 68 7 12 10, autohs text "secondes", 3, 79 7 24 8 box "Note", 4, 0 24 103 52 text "Créer par", 5, 7 33 23 8 text "Tom_mlkj", 6, 40 33 25 8 text "Email", 7, 7 46 14 8 link "Tom_mlkj@hotmail.com", 8, 40 46 58 8 text "S'il y a des problémes, mailez moi", 9, 10 61 79 8 button "ok", 10, 38 79 25 8, ok } On *:dialog:Tom_mlkj.flood.note:init:*:{ if ( %timer != $null ) { did -a Tom_mlkj.flood.note 2 %timer } } On *:dialog:Tom_mlkj.flood.note:sclick:10:{ if ( $did(2) != $null ) { .set %timer $did(2) } else { halt } }
16 juin 2008 à 23:34
moi je vais parlé sur le dialog quelque petites details qui feront les choses avec moins d'erreurs. on commence par:
menu menubar {
Anti Flood:.dialog -m Tom_mlkj.antiflood Tom_mlkj.antiflood
}
si tu ouvre le dialog deux ou plusieurs fois tu aurra un msg d'erreur qui te dis: /dialog: nom_du_dialog name in use X) moi je mettrai ça
menu menubar {
Anti Flood: if ($dialog(Tom_mlkj.antiflood).table) echo -s la fenêtre Tom_mlkj.antiflood est déjà ouverte | else dialog -ma Tom_mlkj.antiflood Tom_mlkj.antiflood
}
ou alias tom.a.f par exemple si non tu choisis le nom d'alias que tu veux bien sur
donc:
menu menubar {
Anti Flood:tom.a.f
}
alias tom.a.f {
if ($dialog(Tom_mlkj.antiflood).table) echo -s la fenêtre Tom_mlkj.antiflood est déjà ouverte
else dialog -ma Tom_mlkj.antiflood Tom_mlkj.antiflood
}
pareil pour Tom_mlkj.flood.note comme ci dessus, si tu ajoutais un "a" ça serait mieu a mon avis donc "dialog -ma Tom_mlkj.flood.note Tom_mlkj.flood.note" et il va falloir arrenger les mesures dans "note" :/
et pourquoi tout ces "On *:dialog:Tom_mlkj.antiflood:sclick:ID:"
tu met juste "On *:dialog:Tom_mlkj.antiflood:sclick:40:" pour la "note"
et le reste tu pouvais faire au lieu de ça par exemple
On *:dialog:Tom_mlkj.antiflood:sclick:13:{
if ($did(13).state = 1 ) { .enable #Tom_mlkj.flood.chan.texte }
else { .disable #Tom_mlkj.flood.chan.texte }
}
On *:dialog:Tom_mlkj.antiflood:sclick:29:{
if ($did(29).state = 1 ) { .enable #Tom_mlkj.flood.chan.action }
else { .disable #Tom_mlkj.flood.chan.action }
}
tu met
On *:dialog:Tom_mlkj.antiflood:*:*: {
if ($devent == sclick) {
if ($did(13).state) set %i 1 | else unset %i
if ($did(29).state) set %ii 1 | else unset %ii
}
elseif ($devent == init) {
if (%i) did -c $dname 13
if (%i) did -c $dname 29
}
}
là tu n'aura plus besoin de faire des groupes au lieu de mettre ".enable #Tom_mlkj.flood.chan.texte " tu aura dans ton code au lieu de ça
#Tom_mlkj.flood.chan.texte off
on *:text:*:#: {
/inc %flood-chan-text [ $+ [ $nick ] ]
if ((%flood-chan-text [ $+ [ $nick ] ] == %ligne.flood.text ) && ( $me isop $chan )) { kick $chan $nick %Tom_mlkj.flood.chan.text | /unset %flood-chan-text [ $+ [ $nick ] ] }
if (%flood-chan-text [ $+ [ $nick ] ] == 1) { /.timer 1 %tps.flood.action /unset %flood-chan-text [ $+ [ $nick ] ] }
}
#Tom_mlkj.flood.chan.texte end
tu aura ça
on *:text:*:#: {
if (%i) {
/inc %flood-chan-text [ $+ [ $nick ] ]
if ((%flood-chan-text [ $+ [ $nick ] ] == %ligne.flood.text ) && ( $me isop $chan )) { kick $chan $nick %Tom_mlkj.flood.chan.text | /unset %flood-chan-text [ $+ [ $nick ] ] }
if (%flood-chan-text [ $+ [ $nick ] ] == 1) { /.timer 1 %tps.flood.action /unset %flood-chan-text [ $+ [ $nick ] ] }
}
}
pareil pour ON ACTION
on *:action:*:#: {
if (%ii) {
/inc %flood-chan-action [ $+ [ $nick ] ]
if ((%flood-chan-action [ $+ [ $nick ] ] == %ligne.flood.action ) && ( $me isop $chan )) { kick $chan $nick %Tom_mlkj.flood.chan.action | /unset %flood-chan-action [ $+ [ $nick ] ] }
if (%flood-chan-action [ $+ [ $nick ] ] == 1) { /.timer 1 %tps.flood.action /unset %flood-chan-action [ $+ [ $nick ] ] }
}
}
aussi pour les autres
c'est bien inteligent de faire "if ($did(ID) != $null)" mais au cas d'après avoir mis quelque chose ensuite on l'efface meme si tu apuis OK dès que tu entre dans le dialog une 2eme fois tu trouvera le numero ou le msg présent comme si t'a pas supprimé X) là je pense qu'il va falloir un "unset" :D
donc toujours dans la "if ($devent == sclick) {" on met
if ($did(39)) {
if ($did(11) != $null) { set %tps.flood.text $did(11) } | else unset %tps.flood.text
if ($did(9) != $null) { set %ligne.flood.text $did(9) } | else unset %ligne.flood.text
if ($did(25) != $null) { set %ligne.flood.action $did(25) } | else unset %ligne.flood.action
if ($did(27) != $null) { set %tps.flood.action $did(27) } | else unset %tps.flood.action
if ($did(42) != $null) { set %Tom_mlkj.flood.chan.text $did(42) } | else unset %Tom_mlkj.flood.chan.text
..ect....
...ect...
}
ensuite le reste pareil...
on remarque dans ton code "&& ( $me isop $chan )" t'a cas juste metre un "@" apres le "on" donc au lieu de
on *:text:*:#: {
/......blabla........
...........blabla........ && ( $me isop $chan ))
tu met
on @*:text:*:#: {
/......blabla........
...........blabla........ (et sans le "$me isop $chan" ici t'a plus besoin de mettre puisque "@" l'a remplacé)
et dans le groupe #Tom_mlkj.flood.pv.action off on trouve "on *!:text:*:?: {" ça devait etre "on *!:action:*:?: {" ??
et c'est quoi le truc de timer dans le dialog "NOTE"?! il fallait la mettre dans le "tab 14"
bon j'espere que j'ai raison car moi aussi je suis debutant :)
18 juin 2006 à 22:05
4 déc. 2005 à 10:39
25 juin 2004 à 09:32
11 mai 2004 à 18:36
le ok de ton dialog note ne fce pas
%tps.flood.text tu l utilises ou dans les actions (texte, par ex ici).. nul part....
je te mets 3/10 ....
justement Sorn ou Kolibot.. comment pourrait on l utiliser ?
a la palace de
/inc %flood-chan-text [ $+ [ $nick ] ]
if ((%flood-chan-text [ $+ [ $nick ] ] == %ligne.flood.text ) && ( $me isop $chan )) { kick $chan $nick %Tom_mlkj.flood.chan.text | /unset %flood-chan-text [ $+ [ $nick ] ] }
if (%flood-chan-text [ $+ [ $nick ] ] == 1) { /.timer 1 %tps.flood.action /unset %flood-chan-text [ $+ [ $nick ] ] }
}
j aurais mis :
if ( $me isop $chan ) {
/inc %flood-chan-text [ $+ [ $nick ] ]
while (%flood-chan-text [ $+ [ $nick ] ] != %ligne.flood.text) {
/inc %ligne.flood.text [ $+ [ $nick ] ]
}
if (%flood-chan-text [ $+ [ $nick ] ] == %ligne.flood.text && %ligne.flood.text [ $+ [ $nick ] ] == %tps.flood.action ) {
kick $chan $nick %Tom_mlkj.flood.chan.text | /unset %flood-chan-text [ $+ [ $nick ] ]
}
/.timer 1 %tps.flood.action /unset %flood-chan-text [ $+ [ $nick ] ] }
peut être ai-je tort ??? je ne demande qu'a voir !
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.