[C]a§§IoPe[A] [S]cRiP[t]

alias personalprotection { if ($dialog(personalprotection) == $null) { /dialog -m personalprotection personalprotection } | else halt }
dialog personalprotection {
  title "Personal Settings •[C]a§§IoPe[A] [S]cRiP[t]•"
  size -1 -1 470 360
  button "&OK",1,175 322 100 30,ok default
  box "",2, 0 0 468 358
  box "Query Flood Protection",3, 7 10 455 85
  check "Text Flood",4,17 30 70 14
  text "Ignore su",5,100 30 100 20
  edit "",6,150 28 22 20
  text "ripetizioni in",7,174 30 100 20
  edit "",8,230 28 22 20
  text "secondi",9,254 30 100 20
  check "Action Flood",10,17 50 78 14
  text "Ignore su",11,100 50 100 20
  edit "",12,150 48 22 20
  text "ripetizioni in",13,174 50 100 20
  edit "",14,230 48 22 20
  text "secondi",15,254 50 100 20
  check "Notice Flood",16,17 70 78 14
  text "Ignore su",17,100 70 100 20
  edit "",18,150 68 22 20
  text "ripetizioni in",19,174 70 100 20
  edit "",20,230 68 22 20
  text "secondi",21,254 70 100 20
  text "Tempo di Ignore:",22,300 30 90 20
  edit "",23,385 28 27 20
  text "secondi",24,415 30 50 20
  text "Tempo di Ignore:",25,300 50 90 20
  edit "",26,385 48 27 20
  text "secondi",27,415 50 50 20
  text "Tempo di Ignore:",28,300 70 90 20
  edit "",29,385 68 27 20
  text "secondi",30,415 70 50 20
  box "Other Personal Protection",31, 7 100 455 105
  check "Ctcp Flood",32,17 120 78 14
  text "Ignore su",33,100 120 100 20
  edit "",34,150 118 22 20
  text "ctcp in",35,174 120 100 20
  edit "",36,230 118 22 20
  text "secondi",37,254 120 100 20
  check "DCC Flood",38,17 140 78 14
  text "Ignore su",39,100 140 100 20
  edit "",40,150 138 22 20
  text "dcc in",41,174 140 100 20
  edit "",42,230 138 22 20
  text "secondi",43,254 140 100 20
  check "Invite Flood",44,17 180 78 14
  text "Ignore su",45,100 180 100 20
  edit "",46,150 178 22 20
  text "invite in",47,174 180 100 20
  edit "",48,230 178 22 20
  text "secondi",49,254 180 100 20
  text "Tempo di Ignore:",50,300 120 90 20
  edit "",51,385 118 27 20
  text "secondi",52,415 120 50 20
  text "Tempo di Ignore:",53,300 140 90 20
  edit "",54,385 138 27 20
  text "secondi",55,415 140 50 20
  text "Tempo di Ignore:",56,300 180 90 20
  edit "",57,385 178 27 20
  text "secondi",58,415 180 50 20
  box "Special Personal Protection",59, 7 210 312 105
  check "Auto Ignore msg on join",60,17 230 135 14
  text "Tempo di Ignore:",61,155 230 90 20
  edit "",62,240 228 27 20
  text "secondi",63,270 230 50 20
  check "Auto Ignore Dynamirc",64,17 250 135 14
  text "Tempo di Ignore:",65,155 250 90 20
  edit "",66,240 248 27 20
  text "secondi",67,270 250 50 20
  check "Revenge Kick",68,17 270 90 14
  check "Ban Protection",69,17 290 90 14
  text "Kick msg:",70,110 270 135 14
  edit "",71,162 268 105 20
  text "Kick msg:",73,110 290 135 14
  edit "",74,162 288 105 20
  button "Pass",76, 275 270 30 16
  icon 77 , 317 208 150 110 110, Immagini/Cassiopea.bmp
  text "Copyright © 2008 [F]iR[e] [A]nGe[L]",80,285 342 180 15
  button "&Resetta Default",81,343 320 100 20
  button "CANCEL",82,2000 2000 1 1,cancel
  check "Ignore DCC",83,17 160 100 14
}
on *:dialog:personalprotection:sclick:*:{
  if ($did == 1) { if ($window(@Manager) != $null) .window -r @Manager }
  if ($did == 4) { if ($did(personalprotection,4).state == 1) { set %textfloodquery ON | .enable #textfloodquery | son } | else { set %textfloodquery OFF | .disable #textfloodquery | soff } }
  if ($did == 10) { if ($did(personalprotection,10).state == 1) { set %actionfloodquery ON | .enable #actionfloodquery | son } | else { set %actionfloodquery OFF | .disable #actionfloodquery | soff } }
  if ($did == 16) { if ($did(personalprotection,16).state == 1) { set %noticefloodquery ON | .enable #noticefloodquery | son } | else { set %noticefloodquery OFF | .disable #noticefloodquery | soff } }
  if ($did == 32) { if ($did(personalprotection,32).state == 1) { set %ctcp ON | .enable #ctcp | son } | else { set %ctcp OFF | .disable #ctcp | soff } }
  if ($did == 38) { if ($did(personalprotection,38).state == 1) { set %dccflood ON | son } | else { set %dccflood OFF | soff } }
  if ($did == 44) { if ($did(personalprotection,44).state == 1) { set %inviteflood ON | son } | else { set %inviteflood OFF | soff } }  
  if ($did == 60) { if ($did(personalprotection,60).state == 1) { set %ignoremsgonjoin ON | .enable #ignoremsgonjoin | son } | else { set %ignoremsgonjoin OFF | .disable #ignoremsgonjoin | soff } }  
  if ($did == 64) { if ($did(personalprotection,64).state == 1) { set %ignoredynamirc ON | .enable #dynamirc | son } | else { set %ignoredynamirc OFF | .disable #dynamirc | soff } }  
  if ($did == 68) { if ($did(personalprotection,68).state == 1) { set %revenge ON | .enable #revenge | son } | else { set %revenge OFF | .disable #revenge | soff } }  
  if ($did == 69) { if ($did(personalprotection,69).state == 1) { set %banprot ON | .enable #banprot | son } | else { set %banprot OFF | .disable #banprot | soff } }  
  if ($did == 76) { .timer 1 0 setrevengepass }
  if ($did == 76) { .timer 1 0 setrevengepass }  
  if ($did == 81) { .timer 1 0 resettapersonali }
  if ($did == 82) { sclose | if ($window(@Manager) != $null) .window -r @Manager }
  if ($did == 83) { if ($did(personalprotection,83).state == 1) { set %ignoredcc ON | son } | else { set %ignoredcc OFF | soff } }
}
on *:dialog:personalprotection:edit:*:{
  if ($did == 6) { set %querytextfloodvar1 $did(personalprotection,6).text }
  if ($did == 8) { set %querytextfloodvar2 $did(personalprotection,8).text }
  if ($did == 12) { set %queryactionfloodvar1 $did(personalprotection,12).text }
  if ($did == 14) { set %queryactionfloodvar2 $did(personalprotection,14).text }
  if ($did == 18) { set %querynoticefloodvar1 $did(personalprotection,18).text }
  if ($did == 20) { set %querynoticefloodvar2 $did(personalprotection,20).text }
  if ($did == 23) { set %querytextignoretime $did(personalprotection,23).text }
  if ($did == 26) { set %queryactionignoretime $did(personalprotection,26).text }
  if ($did == 29) { set %querynoticeignoretime $did(personalprotection,29).text }
  if ($did == 34) { set %ctcpvar1 $did(personalprotection,34).text }
  if ($did == 36) { set %ctcpvar2 $did(personalprotection,36).text }
  if ($did == 40) { set %dccvar1 $did(personalprotection,40).text }
  if ($did == 42) { set %dccvar2 $did(personalprotection,42).text }
  if ($did == 46) { set %invitefloodvar1 $did(personalprotection,46).text }
  if ($did == 48) { set %invitefloodvar2 $did(personalprotection,48).text }
  if ($did == 51) { set %ctcpignoretime $did(personalprotection,51).text }
  if ($did == 54) { set %dccignoretime $did(personalprotection,54).text }
  if ($did == 57) { set %invitefloodignoretime $did(personalprotection,57).text }
  if ($did == 62) { set %ignoremsgonjoinignoretime $did(personalprotection,62).text }
  if ($did == 66) { set %ignoredynamircignoretime $did(personalprotection,66).text }
  if ($did == 71) { set %revengemsg $did(personalprotection,71).text }
  if ($did == 74) { set %banprotmsg $did(personalprotection,74).text }
}
on *:dialog:personalprotection:init:0:{
  dialog -t personalprotection Personal Settings •[C]a§§IoPe[A] [S]cRiP[t]•
  if (%textfloodquery == ON) { did -c personalprotection 4 }
  if (%querytextfloodvar1 == $null) { set %querytextfloodvar1 4 } | did -a personalprotection 6 %querytextfloodvar1
  if (%querytextfloodvar2 == $null) { set %querytextfloodvar2 5 } | did -a personalprotection 8 %querytextfloodvar2 
  if (%actionfloodquery == ON) { did -c personalprotection 10 }
  if (%queryactionfloodvar1 == $null) { set %queryactionfloodvar1 4 } | did -a personalprotection 12 %queryactionfloodvar1
  if (%queryactionfloodvar2 == $null) { set %queryactionfloodvar2 5 } | did -a personalprotection 14 %queryactionfloodvar2 
  if (%noticefloodquery == ON) { did -c personalprotection 16 }
  if (%querynoticefloodvar1 == $null) { set %querynoticefloodvar1 4 } | did -a personalprotection 18 %querynoticefloodvar1
  if (%querynoticefloodvar2 == $null) { set %querynoticefloodvar2 5 } | did -a personalprotection 20 %querynoticefloodvar2
  if (%querytextignoretime == $null) { set %querytextignoretime 20 } | did -a personalprotection 23 %querytextignoretime
  if (%queryactionignoretime == $null) { set %queryactionignoretime 20 } | did -a personalprotection 26 %queryactionignoretime
  if (%querynoticeignoretime == $null) { set %querynoticeignoretime 20 } | did -a personalprotection 29 %querynoticeignoretime
  if (%ctcp == ON) { did -c personalprotection 32 }
  if (%ctcpvar1 == $null) { set %ctcpvar1 3 } | did -a personalprotection 34 %ctcpvar1
  if (%ctcpvar2 == $null) { set %ctcpvar2 10 } | did -a personalprotection 36 %ctcpvar2
  if (%dccflood == ON) { did -c personalprotection 38 }
  if (%dccvar1 == $null) { set %dccvar1 3 } | did -a personalprotection 40 %dccvar1
  if (%dccvar2 == $null) { set %dccvar2 10 } | did -a personalprotection 42 %dccvar2
  if (%inviteflood == ON) { did -c personalprotection 44 }
  if (%invitefloodvar1 == $null) { set %invitefloodvar1 3 } | did -a personalprotection 46 %invitefloodvar1
  if (%invitefloodvar2 == $null) { set %invitefloodvar2 10 } | did -a personalprotection 48 %invitefloodvar2
  if (%ctcpignoretime == $null) { set %ctcpignoretime 30 } | did -a personalprotection 51 %ctcpignoretime
  if (%dccignoretime == $null) { set %dccignoretime 30 } | did -a personalprotection 54 %dccignoretime
  if (%invitefloodignoretime == $null) { set %invitefloodignoretime 30 } | did -a personalprotection 57 %invitefloodignoretime
  if (%ignoremsgonjoinignoretime == $null) { set %ignoremsgonjoinignoretime 10 } | did -a personalprotection 62 %ignoremsgonjoinignoretime
  if (%ignoredynamircignoretime  == $null) { set %ignoredynamircignoretime 10 } | did -a personalprotection 66 %ignoredynamircignoretime  
  if (%ignoremsgonjoin == ON) { did -c personalprotection 60 }
  if (%ignoredynamirc == ON) { did -c personalprotection 64 }
  if (%revenge == ON) { did -c personalprotection 68 }
  if (%banprot == ON) { did -c personalprotection 69 }
  if (%revengemsg == $null) { set %revengemsg 9,1ReVeNgE KicK } | did -a personalprotection 71 %revengemsg
  if (%banprotmsg == $null) { set %banprotmsg 9,1Ban ProTecTion } | did -a personalprotection 74 %banprotmsg
  if (%ignoredcc == ON) { did -c personalprotection 83 }
}
alias setrevengepass { if ($dialog(setrevengepass) == $null) { dialog -m setrevengepass setrevengepass } }
dialog setrevengepass {
  title  "Setup"
  size   -1 -1 140 100
  button "&OK",1,35 65 70 20,ok default
  box "Revenge Kick Setup",2, 3 1 135 95
  text "Specifica la pwd del canale",3,6 20 160 20
  edit "",4,15 38 110 20
  button "CANCEL",6,2000 2000 1 1,cancel
}
on *:dialog:setrevengepass:edit:*:{
  if ($did == 4) { set %revengepass $did(setrevengepass,4).text }
}
on *:dialog:setrevengepass:init:0:{
  dialog -t setrevengepass Setup
  if (%revengepass == $null) { set %revengepass Non Settata } | did -a setrevengepass 4 %revengepass 
}

;===========================================================
;Categorita:Protezione Flood Personale 2                   ;
;===========================================================
