aIRC — File Browser
aIRCv0.8.69 / aIRCv0.8.69 / script / pprotsetup.mrc
pprotsetup.mrc — 9 KB — Download this file
;/**********************************************************************
; *
; * aIRC
; * Personal Protection Setup
; *
; **********************************************************************/
alias _pprot {
_prot.init
_dialog -m pprot pprot
}
dialog pprot {
size -1 -1 260 227
option dbu
title "Personal Protection"
check "Text Flood",10,10 15 60 8
edit "",11,75 13 17 10,autohs
text "lines or",12,95 15 25 10
edit "",13,122 13 17 10,autohs
text "bytes in",14,142 15 25 10
edit "",15,170 13 17 10,autohs
text "seconds",16,190 15 25 10
button "Actions",17,215 13 35 12
check "Notice Flood",20,10 28 60 8
edit "",21,75 26 17 10,autohs
text "notices or",22,95 28 25 10
edit "",23,122 26 17 10,autohs
text "bytes in",24,142 28 25 10
edit "",25,170 26 17 10,autohs
text "seconds",26,190 28 25 10
button "Actions",27,215 26 35 12
check "Invite Flood",30,10 41 60 8
edit "",31,75 39 17 10,autohs
text "invites in",32,95 41 25 10
edit "",33,122 39 17 10,autohs hide
text "bytes in",34,142 41 25 10,hide
edit "",35,170 39 17 10,autohs
text "seconds",36,190 41 25 10
button "Actions",37,215 39 35 12
check "CTCP Flood",40,10 54 60 8
edit "",41,75 52 17 10,autohs
text "ctcps in",42,95 54 25 10
edit "",43,122 52 17 10,autohs hide
text "bytes in",44,142 54 25 10,hide
edit "",45,170 52 17 10,autohs
text "seconds",46,190 54 25 10
button "Actions",47,215 52 35 12
check "DCC Flood",50,10 67 60 8
edit "",51,75 65 17 10,autohs
text "dccs in",52,95 67 25 10
edit "",53,122 65 17 10,autohs hide
text "bytes in",54,142 67 25 10,hide
edit "",55,170 65 17 10,autohs
text "seconds",56,190 67 25 10
button "Actions",57,215 65 35 12
check "Query Flood",60,10 80 60 8
edit "",61,75 78 17 10,autohs
text "queries in",62,95 80 25 10
edit "",63,122 78 17 10,autohs hide
text "bytes in",64,142 80 25 10,hide
edit "",65,170 78 17 10,autohs
text "seconds",66,190 80 25 10
button "Actions",67,215 78 35 12
check "DCC Chat Text Flood",70,10 93 60 8
edit "",71,75 91 17 10,autohs
text "lines or",72,95 93 25 10
edit "",73,122 91 17 10,autohs
text "bytes in",74,142 93 25 10
edit "",75,170 91 17 10,autohs
text "seconds",76,190 93 25 10
button "Actions",77,215 91 35 12
check "Fserve Text Flood",80,10 106 60 8
edit "",81,75 104 17 10,autohs
text "lines or",82,95 106 25 10
edit "",83,122 104 17 10,autohs
text "bytes in",84,142 106 25 10
edit "",85,170 104 17 10,autohs
text "seconds",86,190 106 25 10
button "Actions",87,215 104 35 12
text "Botnet",200,10 118 230 6,center
check "Text Flood",210,10 128 60 8
edit "",211,75 126 17 10,autohs
text "lines or",212,95 128 25 10
edit "",213,122 126 17 10,autohs
text "bytes in",214,142 128 25 10
edit "",215,170 126 17 10,autohs
text "seconds",216,190 128 25 10
button "Actions",217,215 126 35 12
check "Notice Flood",220,10 141 60 8
edit "",221,75 139 17 10,autohs
text "notices or",222,95 141 25 10
edit "",223,122 139 17 10,autohs
text "bytes in",224,142 141 25 10
edit "",225,170 139 17 10,autohs
text "seconds",226,190 141 25 10
button "Actions",227,215 139 35 12
check "Invite Flood",230,10 154 60 8
edit "",231,75 152 17 10,autohs
text "invites in",232,95 154 25 10
edit "",233,122 152 17 10,autohs hide
text "bytes in",234,142 154 25 10,hide
edit "",235,170 152 17 10,autohs
text "seconds",236,190 154 25 10
button "Actions",237,215 152 35 12
check "CTCP Flood",240,10 167 60 8
edit "",241,75 165 17 10,autohs
text "ctcps in",242,95 167 25 10
edit "",243,122 165 17 10,autohs hide
text "bytes in",244,142 167 25 10,hide
edit "",245,170 165 17 10,autohs
text "seconds",246,190 167 25 10
button "Actions",247,215 165 35 12
check "DCC Flood",250,10 180 60 8
edit "",251,75 178 17 10,autohs
text "dccs in",252,95 180 25 10
edit "",253,122 178 17 10,autohs hide
text "bytes in",254,142 180 25 10,hide
edit "",255,170 178 17 10,autohs
text "seconds",256,190 180 25 10
button "Actions",257,215 178 35 12
check "Query Flood",260,10 193 60 8
edit "",261,75 191 17 10,autohs
text "queries in",262,95 193 25 10
edit "",263,122 191 17 10,autohs hide
text "bytes in",264,142 193 25 10,hide
edit "",265,170 191 17 10,autohs
text "seconds",266,190 193 25 10
button "Actions",267,215 191 35 12
box "",440,5 2 250 115
box "",441,5 113 250 92
box "",442,5 201 145 25
text "Presets:",450,10 213 25 10
combo 451,35 211 50 100,drop
button "All ON",452,90 208 25 14
button "All OFF",453,120 208 25 14
button "Ok",490,155 208 30 15,ok
button "Cancel",491,190 208 30 15,cancel
button "Help",492,225 208 30 15
}
ON *:DIALOG:pprot:init:0:{
_mdx.init $_icofile(pprot.ico)
did -r $dname 451
did -a $dname 451 Permissive
did -a $dname 451 Normal
did -a $dname 451 Strict
_pprot.devent.refresh
_dummy $_lang.loaddialog($dname,_pprot,00086969,main.lang,$scriptdir)
}
ON *:DIALOG:pprot:sclick:10,20,30,40,50,60,70,80,210,220,230,240,250,260:{ _pprot.devent.groupEB $did }
ON *:DIALOG:pprot:sclick:451:{
if ($did($did).sel == 1) { _pprot.devent.refresh -.15.1500.10_-.18.1800.10_-.4.0.10_-.4.0.10_-.4.0.10_-.4.0.10_-.70.5000.10_-.10.200.10 -.30.3000.10_-.36.3600.10_-.8.0.10_-.8.0.10_-.8.0.10_-.8.0.10 }
if ($did($did).sel == 2) { _pprot.devent.refresh -.12.1200.10_-.15.1500.10_-.3.0.10_-.3.0.10_-.3.0.10_-.3.0.10_-.50.4000.10_-.8.160.10 -.24.2400.10_-.30.3000.10_-.6.0.10_-.6.0.10_-.6.0.10_-.6.0.10 }
if ($did($did).sel == 3) { _pprot.devent.refresh -.9.900.10_-.12.1200.10_-.2.0.10_-.2.0.10_-.2.0.10_-.2.0.10_-.30.3000.10_-.6.120.10 -.18.1800.10_-.24.2400.10_-.4.0.10_-.4.0.10_-.4.0.10_-.4.0.10 }
}
ON *:DIALOG:pprot:sclick:452,453:{
did $iif($did == 452,-c,-u) $dname 10,20,30,40,50,60,70,80,210,220,230,240,250,260
var %i = 10
while (%i <= 80) {
_pprot.devent.groupEB %i
inc %i 10
}
var %i = 210
while (%i <= 260) {
_pprot.devent.groupEB %i
inc %i 10
}
}
ON *:DIALOG:pprot:sclick:490:{
var %i = 1,%m,%l,%t,%d = pprot
_prot.init
while (%i <= 8) {
%m = $calc(%i * 10)
%t = $did(%d,%m).state
inc %m
%t = %t $+ . $+ $iif($_isint($did(%d,%m)),$round($did(%d,%m),0),0)
inc %m 2
%t = %t $+ . $+ $iif($_isint($did(%d,%m)),$round($did(%d,%m),0),0)
inc %m 2
%t = %t $+ . $+ $iif($_isint($did(%d,%m)),$round($did(%d,%m),0),0)
%l = %l %t
inc %i
}
_hadd _aircprot personal %l
var %i = 1,%m,%l,%t,%d = pprot
while (%i <= 6) {
%m = $calc((%i * 10) + 200)
%t = $did(%d,%m).state
inc %m
%t = %t $+ . $+ $iif($_isint($did(%d,%m)),$round($did(%d,%m),0),0)
inc %m 2
%t = %t $+ . $+ $iif($_isint($did(%d,%m)),$round($did(%d,%m),0),0)
inc %m 2
%t = %t $+ . $+ $iif($_isint($did(%d,%m)),$round($did(%d,%m),0),0)
%l = %l %t
inc %i
}
_hadd _aircprot personalbotnet %l
_prot.save
_unloadpprotsetupmrc
}
ON *:DIALOG:pprot:sclick:491:{ _unloadpprotsetupmrc }
ON *:DIALOG:pprot:sclick:17:{ _protaction 0 0 0 putext }
ON *:DIALOG:pprot:sclick:27:{ _protaction 0 0 0 punotice }
ON *:DIALOG:pprot:sclick:37:{ _protaction 0 0 0 puinvite }
ON *:DIALOG:pprot:sclick:47:{ _protaction 0 0 0 puctcp }
ON *:DIALOG:pprot:sclick:57:{ _protaction 0 0 0 pudcc }
ON *:DIALOG:pprot:sclick:67:{ _protaction 0 0 0 puquery }
ON *:DIALOG:pprot:sclick:77:{ _protaction 0 1 0 puchat }
ON *:DIALOG:pprot:sclick:87:{ _protaction 0 1 0 pufserve }
ON *:DIALOG:pprot:sclick:217:{ _protaction 0 0 1 pbtext }
ON *:DIALOG:pprot:sclick:227:{ _protaction 0 0 1 pbnotice }
ON *:DIALOG:pprot:sclick:237:{ _protaction 0 0 1 pbinvite }
ON *:DIALOG:pprot:sclick:247:{ _protaction 0 0 1 pbctcp }
ON *:DIALOG:pprot:sclick:257:{ _protaction 0 0 1 pbdcc }
ON *:DIALOG:pprot:sclick:267:{ _protaction 0 0 1 pbquery }
alias -l _pprot.devent.refresh {
var %i = 1,%m,%l = $iif($1,$replace($1,_,$chr(32)),$hget(_aircprot,personal)),%b = $iif($2,$replace($2,_,$chr(32)),$hget(_aircprot,personalbotnet)),%d = pprot
while (%i <= 8) {
tokenize 46 $gettok(%l,%i,32)
%m = $calc(%i * 10)
if ($1 != -) { did $iif($1,-c,-u) %d %m }
did -o %d $calc(%m + 1) 1 $iif($_isint($2),$round($2,0),0)
did -o %d $calc(%m + 3) 1 $iif($_isint($3),$round($3,0),0)
did -o %d $calc(%m + 5) 1 $iif($_isint($4),$round($4,0),0)
_pprot.devent.groupEB %m
inc %i
}
%i = 1
while (%i <= 6) {
tokenize 46 $gettok(%b,%i,32)
%m = $calc((%i * 10) + 200)
if ($1 != -) { did $iif($1,-c,-u) %d %m }
did -o %d $calc(%m + 1) 1 $iif($_isint($2),$round($2,0),0)
did -o %d $calc(%m + 3) 1 $iif($_isint($3),$round($3,0),0)
did -o %d $calc(%m + 5) 1 $iif($_isint($4),$round($4,0),0)
_pprot.devent.groupEB %m
inc %i
}
}
alias -l _pprot.devent.groupEB {
if ($dialog(pprot) == $null) { return }
did $iif($did(pprot,$1).state,-e,-b) pprot $replace(+1.+2.+3.+4.+5.+6.+7,+,$left($1,-1),.,$chr(44))
}
;;;;;;
;;;;;;
alias -l _unloadpprotsetupmrc { _quickunload pprot $script }