;-=-=-=-=-=-
; DeadLy Script - chan PROTECT
;-=-=-=-=-=-
dialog protek {
  title Channel Protection/Options - $sc
  size -1 -1 540 330
  icon $icons(pro)
  text $sc v $+ $bersyon, 39, 100 300 120 20, disable
  list 1, 10 290 43 32, size
  list 2, 53 290 43 32, size
  button d&efault, 3, 425 295 45 25, default
  button &close, 36, 480 295 50 25, cancel

  tab Protection, 1001, 10 10 400 280
  check text repeat, 101, 30 50 100 20, tab 1001
  check text flood, 102, 30 70 100 20, tab 1001
  check excess chars, 103, 30 90 100 20, tab 1001
  check excess CAPS, 104, 30 110 100 20, tab 1001
  check excess colors, 105, 30 130 100 20, tab 1001
  check excess codes, 106, 30 150 100 20, tab 1001
  check guest nick, 107, 30 190 100 20, tab 1001
  check bad nick, 108, 30 210 100 20, tab 1001
  check bad host/idents, 109, 30 230 100 20, tab 1001
  check bad channel, 110, 30 250 100 20, tab 1001
  button !, 201, 130 50 18 18, tab 1001
  button ! , 202, 130 70 18 18, tab 1001
  button ! , 203, 130 90 18 18, tab 1001
  button ! , 204, 130 110 18 18, tab 1001
  button ! , 205, 130 130 18 18, tab 1001
  button ! , 206, 130 150 18 18, tab 1001
  button ! , 207, 130 190 18 18, tab 1001
  button ! , 208, 130 210 18 18, tab 1001
  button ! , 209, 130 230 18 18, tab 1001
  button ! , 210, 130 250 18 18, tab 1001
  check quit/part ads, 111, 170 50 100 20, tab 1001
  check mass kick, 112, 170 70 100 20, tab 1001
  check mass ban, 113, 170 90 100 20, tab 1001
  check mass de@p, 114, 170 110 100 20, tab 1001
  check forbidden words, 115, 170 150 100 20, tab 1001
  check chan/site ads, 116, 170 170 100 20, tab 1001
  check onJoin spam, 117, 170 190 100 20, tab 1001
  check revolving door, 118, 170 210 100 20, tab 1001
  check idle nick, 119, 170 230 100 20, tab 1001
  check clone limit, 120, 170 250 100 20, tab 1001
  button !, 211, 270 50 18 18, tab 1001
  button ! , 212, 270 70 18 18, tab 1001
  button ! , 213, 270 90 18 18, tab 1001
  button ! , 214, 270 110 18 18, tab 1001
  button ! , 215, 270 150 18 18, tab 1001
  button ! , 216, 270 170 18 18, tab 1001
  button ! , 217, 270 190 18 18, tab 1001
  button ! , 218, 270 210 18 18, tab 1001
  button ! , 219, 270 230 18 18, tab 1001
  button ! , 220, 270 250 18 18, tab 1001
  combo  401, 295 70 110 100, tab 1001 drop sort
  text Ban type, 4, 297 57 100 14, tab 1001
  text Click 'button !' to see more options, 5, 300 240 100 40, tab 1001
  text temporary ban (secs) :, 34, 300 127 100 14, tab 1001
  edit "",  527, 295 140 35 20, tab 1001
  text warning kick msg, 35, 300 167 100 14, tab 1001 
  edit "",  528, 295 180 110 20, tab 1001 autohs

  tab Options, 1002

  box When joining channel, 6, 30 40 350 120, tab 1002
  box Nick action, 7, 30 160 350 110, tab 1002
  check set modes, 121, 50 60 100 20, tab 1002
  check set topic, 122, 50 80 100 20, tab 1002
  check say, 123, 50 100 100 20, tab 1002
  check deop yourself, 124, 50 120 100 20, tab 1002
  check auto greet, 125, 50 180 100 20, tab 1002
  check auto farewell, 126, 50 200 100 20, tab 1002
  check whois onJoin, 127, 50 220 100 20, tab 1002
  check kick IRCOP, 131, 50 240 100 20, tab 1002
  edit "", 501, 150 60 80 20, tab 1002 
  edit "", 502, 150 80 210 20, tab 1002 autohs
  edit "", 503, 150 100 210 20, tab 1002 autohs
  edit "", 504, 150 180 210 20, tab 1002autohs
  edit "", 505, 150 200 210 20, tab 1002 autohs
  edit "", 529, 150 240 210 20, tab 1002 autohs

  tab Kick Msg1, 1003

  box protection, 9, 30 40 100 240, tab 1003 
  box kick msg, 10, 130 40 250 240, tab 1003
  text text repeat, 11, 50 63 70 14, tab 1003 right
  text text flood, 12, 50 83 70 14, tab 1003 right
  text excess chars, 13, 50 103 70 14, tab 1003 right
  text excess CAPS, 14, 50 123 70 14, tab 1003 right
  text excess colors, 15, 50 143 70 14, tab 1003 right
  text excess codes, 16, 50 163 70 14, tab 1003 right
  text guest nick, 17, 50 183 70 14, tab 1003 right
  text bad nick, 18, 50 203 70 14, tab 1003 right
  text bad host/idents, 19, 40 223 80 14, tab 1003 right
  text bad channel, 20, 50 243 70 14, tab 1003 right
  edit "", 506, 150 60 210 20, tab 1003 autohs
  edit "", 507, 150 80 210 20, tab 1003 autohs
  edit "", 508, 150 100 210 20, tab 1003 autohs
  edit "", 509, 150 120 210 20, tab 1003 autohs
  edit "", 510, 150 140 210 20, tab 1003 autohs
  edit "", 511, 150 160 210 20, tab 1003 autohs
  edit "", 512, 150 180 210 20, tab 1003 autohs
  edit "", 513, 150 200 210 20, tab 1003 autohs
  edit "", 514, 150 220 210 20, tab 1003 autohs
  edit "", 515, 150 240 210 20, tab 1003 autohs

  tab Kick Msg2, 1004

  box protection, 21, 30 40 100 240, tab 1004
  box kick msg, 22, 130 40 250 240, tab 1004
  text quit/part ads, 23, 50 63 70 14, tab 1004 right
  text mass kick, 24, 50 83 70 14, tab 1004 right
  text mass ban, 25, 50 103 70 14, tab 1004 right
  text mass de@p, 26, 50 123 70 14, tab 1004 right
  text forbidden words, 27, 40 143 80 14, tab 1004 right
  text chan/site ads, 28, 50 163 70 14, tab 1004 right
  text onJoin spam, 29, 50 183 70 14, tab 1004 right
  text exploit, 30, 50 203 70 14, tab 1004 right
  text idle nick, 31, 40 223 80 14, tab 1004 right
  text clone limit, 32, 50 243 70 14, tab 1004 right
  edit "", 516, 150 60 210 20, tab 1004 autohs
  edit "", 517, 150 80 210 20, tab 1004 autohs
  edit "", 518, 150 100 210 20, tab 1004 autohs
  edit "", 519, 150 120 210 20, tab 1004 autohs
  edit "", 520, 150 140 210 20, tab 1004 autohs
  edit "", 521, 150 160 210 20, tab 1004 autohs
  edit "", 522, 150 180 210 20, tab 1004 autohs
  edit "", 523, 150 200 210 20, tab 1004 autohs
  edit "", 524, 150 220 210 20, tab 1004 autohs
  edit "", 525, 150 240 210 20, tab 1004 autohs

  tab Extra, 1005

  text using, 37, 180 63 120 14 , tab 1005
  text (#n replace kick number), 40, 280 63 120 14 , tab 1005
  text This Channel Protection option is created by the author and used less millitant penalty. It is in your choice to configure the options., 41, 220 230 180 50 , wrap tab 1005
  text Channel POPUPS Warning Msg:, 42, 30 183 240 14, tab 1005
  check Use kick counter, 132, 30 60 100 20, tab 1005
  check Filter kick (kick banned nicks), 133, 30 90 180 20, tab 1005
  check Warn when your nick is mentioned, 134, 30 120 190 20, tab 1005
  check Detect nick change, 135, 30 150 115 20, tab 1005
  edit "", 530, 135 60 40 20, autohs tab 1005
  edit "", 531, 210 60 60 20, autohs tab 1005
  edit "", 532, 190 180 160 20, autohs tab 1005

  text only in channels: (clear all if to all chan), 8, 425 15 110 28 
  text kick logo, 33, 253 288 120 14 
  edit "", 526, 250 300 150 20, autohs
  list 301, 420 40 110 140, sort
  button &add, 302, 425 170 45 18
  button &del, 303, 480 170 45 18
  check exclude ops, 128, 420 200 100 20
  check exclude voice, 129, 420 220 100 20
  check exclude friends, 130, 420 240 100 20
  list 901, 510 240 28 12
}
on 1:dialog:protek:*:*: {
  if $devent = init { init1 }
  if $devent = sclick { 
    pro.chk 101 chk1
    pro.chk 102 chk2
    pro.chk 103 chk3
    pro.chk 104 chk4
    pro.chk 105 chk5
    pro.chk 106 chk6
    pro.chk 107 chk7
    pro.chk 108 chk8
    pro.chk 109 chk9
    pro.chk 110 chk10
    pro.chk 111 chk11
    pro.chk 112 chk12
    pro.chk 113 chk13
    pro.chk 114 chk14
    pro.chk 115 chk15
    pro.chk 116 chk16
    pro.chk 117 chk17
    pro.chk 118 chk18
    pro.chk 119 chk19
    pro.chk 120 chk20
    pro.chk 121 chk21
    pro.chk 122 chk22
    pro.chk 123 chk23
    pro.chk 124 chk24
    pro.chk 125 chk25
    pro.chk 126 chk26
    pro.chk 127 chk27
    pro.chk 128 chk28
    pro.chk 129 chk29
    pro.chk 130 chk30
    pro.chk 131 chk31
    pro.chk 132 chk32
    pro.chk 133 chk33
    pro.chk 134 chk34
    pro.chk 135 chk35
    pro.but 201 pro1
    pro.but 202 pro2
    pro.but 203 pro3
    pro.but 204 pro4
    pro.but 205 pro5
    pro.but 206 pro6
    pro.but 207 pro7
    pro.but 208 pro8
    pro.but 209 pro9
    pro.but 210 pro10
    pro.but 211 pro16
    pro.but 212 pro12
    pro.but 213 pro13
    pro.but 214 pro14
    pro.but 215 pro15
    pro.but 216 pro16
    pro.but 217 pro17
    pro.but 218 pro18
    pro.but 219 pro19
    pro.but 220 pro20
    if $did = 302 { set %pro.chan $addtok(%pro.chan,$!,44) | did -a protek 301 #$$?="channel ?" }
    if $did = 303 { set %pro.chan $remtok(%pro.chan,$$did(protek,301).sel,44) | did -d protek 301 $$did(protek,301).sel }
    if $did = 401 { hadd protek bstyle $gettok($did(protek,401).seltext,1,58) }
    if ($did = 119) && ($status = connected) { if $did(protek,119).state = 1 .timeridlekick 0 $calc($hget(protek,pro19.edt1) * 60) aydel | else timeridlekick off }
    if $did = 901 { sf4 }
    if $did = 1 { f2 }
    if $did = 2 { f4 }
    if $did = 3 { prodef }
    if $did = 36 { set.pro.chan | bak.protek }
    else window -c @msg
  }
  if $devent = edit {
    pro.edt 501 edt1
    pro.edt 502 edt2
    pro.edt 503 edt3
    pro.edt 504 edt4
    pro.edt 505 edt5
    pro.edt 506 edt6
    pro.edt 507 edt7
    pro.edt 508 edt8
    pro.edt 509 edt9
    pro.edt 510 edt10
    pro.edt 511 edt11
    pro.edt 512 edt12
    pro.edt 513 edt13
    pro.edt 514 edt14
    pro.edt 515 edt15
    pro.edt 516 edt16
    pro.edt 517 edt17
    pro.edt 518 edt18
    pro.edt 519 edt19
    pro.edt 520 edt20
    pro.edt 521 edt21
    pro.edt 522 edt22
    pro.edt 523 edt23
    pro.edt 524 edt24
    pro.edt 525 edt25
    pro.edt 526 edt26
    pro.edt 527 edt27
    pro.edt 528 edt28
    pro.edt 529 edt29
    pro.edt 530 edt30
    pro.edt 531 edt31
    pro.edt 532 edt32
    if $did isnum 501-526 prev.msg protek $hget(protek,edt $+ $calc($did -500))
    if $did isnum 528-529 prev.msg protek $hget(protek,edt $+ $calc($did -500))
    if $did = 531 prev.msg protek $hget(protek,edt $+ $calc($did -500))
  }
  if $devent = close { window -c @msg | bak.protek }
}
;-=-=-=-=-=-
dialog pro1 {
  title Text Repeat - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text in, 2, 68 43 25 14
  text secs, 3, 110 43 25 14
  edit "", 101,  40 40 25 20
  edit "", 102,  80 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro1:*:*: { sub 1 | stl 1 | ed2 1 }
;-=-=-=-=-=-
dialog pro2 {
  title Text Flood - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text in, 2, 68 43 25 14
  text secs, 3, 110 43 25 14
  edit "", 101,  40 40 25 20
  edit "", 102,  80 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro2:*:*: { sub 2 | stl 2 | ed2 2 }
;-=-=-=-=-=-
dialog pro3 {
  title Excess Chars - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text letters, 2, 78 43 35 14
  edit "", 101,  40 40 35 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro3:*:*: { sub 3 | stl 3 | ed1 3
  ;  if $devent = edit { pro3.edt 101 pro3.edt1 }
}
;-=-=-=-=-=-
dialog pro4 {
  title Excess CAPS - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text %, 2, 68 43 35 14
  edit "", 101,  40 40 23 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro4:*:*: { sub 4 | stl 4 | ed1 4 }
;-=-=-=-=-=-
dialog pro5 {
  title Excess Colors - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text %, 2, 68 43 35 14
  edit "", 101,  40 40 23 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro5:*:*: { sub 5 | stl 5 | ed1 5 }
;-=-=-=-=-=-
dialog pro6 {
  title Excess Codes - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text %, 2, 68 43 35 14
  edit "", 101,  40 40 23 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro6:*:*: { sub 6 | stl 6 | ed1 6 }
;-=-=-=-=-=-
dialog pro7 {
  title Guest Nick - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text joining and changing nicks, 1, 15 33 100 34
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro7:*:*: { sub 7 | stl 7 }
;-=-=-=-=-=-
dialog pro8 {
  title Bad Nick - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box bad nicks, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro8:*:*: { sub 8 | stl 8
  if $devent = sclick { adlis badnick 8 | delis badnick 8 }
}
;-=-=-=-=-=-
dialog pro9 {
  title Bad host/idents - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box bad host/idents, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro9:*:*: { sub 9 | stl 9
  if $devent = sclick { adlis badhost 9 | delis badhost 9 }
}
;-=-=-=-=-=-
dialog pro10 {
  title Bad host/idents - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box bad channels, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro10:*:*: { sub 10 | stl 10
  if $devent = sclick { adlis badchan 10 | delis badchan 10 }
}
;-=-=-=-=-=-
dialog pro12 {
  title Mass Kick - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text in, 2, 68 43 25 14
  text secs, 3, 110 43 25 14
  edit "", 101,  40 40 25 20
  edit "", 102,  80 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro12:*:*: { sub 12 | stl 12 | ed2 12 }
;-=-=-=-=-=-
dialog pro13 {
  title Mass Ban - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text in, 2, 68 43 25 14
  text secs, 3, 110 43 25 14
  edit "", 101,  40 40 25 20
  edit "", 102,  80 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro13:*:*: { sub 13 | stl 13 | ed2 13 }
;-=-=-=-=-=-
dialog pro14 {
  title Mass De@p - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text in, 2, 68 43 25 14
  text secs, 3, 110 43 25 14
  edit "", 101,  40 40 25 20
  edit "", 102,  80 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro14:*:*: { sub 14 | stl 14 | ed2 14 }
;-=-=-=-=-=-
dialog pro15 {
  title Forbidden Words - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box forbidden words, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro15:*:*: { sub 15 | stl 15
  if $devent = sclick { adlis badword 15 | delis badword 15 }
}
;-=-=-=-=-=-
dialog pro16 {
  title Excempted Chan/Site Ads - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box excempted chan/sites, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro16:*:*: { sub 16 | stl 16
  if $devent = sclick { adlis excempt 16 | delis excempt 16 }
}
;-=-=-=-=-=-
dialog pro17 {
  title OnJoin Spam - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box spam words, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro17:*:*: { sub 17 | stl 17
  if $devent = sclick { adlis spamword 17 | delis spamword 17 }
}
;-=-=-=-=-=-
dialog pro18 {
  title Revolving Doors - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text join-part, 2, 78 43 45 14
  edit "", 101,  40 40 35 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro18:*:*: { sub 18 | stl 18 | ed1 18 }
;-=-=-=-=-=-
dialog pro19 {
  title Idle Nick - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text mins, 2, 64 43 25 14
  edit "", 101,  37 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro19:*:*: { sub 19 | stl 19 | ed1 19 }
;-=-=-=-=-=-
dialog pro20 {
  title Clone Limit - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text clones, 2, 68 43 25 14
  edit "", 101,  40 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro20:*:*: { sub 20 | stl 20 | ed1 20 }
;-=-=-=-=-=-
;-=-=-=-=-=-
on *:TEXT:*:%pro.chan: { 
  if ($me !isop #) halt 
  if ($hget(protek,chk1) = on) && ($len($strip($1-)) > 10) {
    hinc -mu $+ $hget(protek,pro1.edt2) events penalty. $+ $nick $+ . $+ # $+ . $+ $hash($strip($1-),32) 1
    if ($hget(events,penalty. $+ $nick $+ . $+ $chan $+ . $+ $hash($strip($1-),32)) >= $hget(protek,pro1.edt1)) {
      hadd -mu10 events puta $hget(events,penalty. $+ $nick $+ . $+ $chan $+ . $+ $hash($strip($1-),32)) in $hget(protek,pro1.edt2) sec.
      hdel events penalty. $+ $nick $+ . $+ $chan $+ . $+ $hash($strip($1-),32)
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_repeat) 1
      pro.penalty edt6 repeat $chan $nick
    }
  }
  if ($hget(protek,chk2) = on) && ($len($strip($1-)) > 5) {
    hinc -mu $+ $hget(protek,pro2.edt2) events fld. $+ # $+ . $+ $nick 1
    if $hget(events,fld. $+ # $+ . $+ $nick) >= $hget(protek,pro2.edt1) { 
      hadd -mu10 events puta $hget(events,fld. $+ # $+ . $+ $nick) in $hget(protek,pro2.edt2) sec.
      hdel events fld. $+ # $+ . $+ $nick
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_flood) 1
      pro.penalty edt7 flood $chan $nick | hdel events fld. $+ $chan $+ . $+ $nick
    }
  }
  if ($hget(protek,chk3) = on) && ($len($strip($1-)) >= $hget(protek,pro3.edt1)) { 
    hadd -mu10 events puta $len($strip($1-)) total length
    hinc -mu3600 events penalty. $+ $+(#,_,$nick,_longtext) 1 
    pro.penalty edt8 longtext # $nick 
  } 
  if $hget(protek,chk4) = on {
    var %text = $strip($remove($1-,$chr(32)))
    var %caps.letters = $calc($len(%text) - $len($removecs($1-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z)))
    var %caps.percent = $round($calc(%caps.letters / $len($1-) * 100),0)
    var %caps.allow = $hget(protek,pro4.edt1)
    if (%caps.percent >= %caps.allow) && ($len(%text) >= 15) {
      hadd -mu10 events puta %caps.percent percent CAPS
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_caps) 1
      pro.penalty edt9 caps $chan $nick
    }
  }
  if $hget(protek,chk5) = on { 
    var %color.count = $calc($count($1-,$chr(3)) + $count($1-,$chr(31)) + $count($1-,$chr(15)))
    var %color.percent = $round($calc(%color.count / $len($strip($1-)) * 100),0)
    if (%color.percent >= $hget(protek,pro5.edt1)) && ($len($1-) >= 30) { 
      hadd -mu10 events puta %color.percent percent colors
      hinc -mu3600 events penalty. $+ $+(#,_,$nick,_color) 1
      pro.penalty edt10 color # $nick
    }
  }
  if $hget(protek,chk6) = on { 
    var %code.count = $calc($count($1-,$chr(3)) + $count($1-,$chr(31)) + $count($1-,$chr(15)) + $count($1-,$chr(2)) + $count($1-,$chr(22)))
    var %code.percent = $round($calc(%code.count / $len($strip($1-)) * 100),0)
    var %code.allow = $hget(protek,pro6.edt1)
    if (%code.percent >= %code.allow) && ($len($1-) >= 30) {
      hadd -mu10 events puta %code.percent percent codes
      hinc -mu3600 events penalty. $+ $+(#,_,$nick,_code) 1
      pro.penalty edt11 code # $nick 
    }
  }
  if $hget(protek,chk15) = on { var %bn 1 
    while $gettok($hget(protek,pro.badword),%bn,44) != $null { 
      if $gettok($hget(protek,pro.badword),%bn,44) iswm $strip($1-) { 
        hadd -mu10 events puta $hget(protek,pro.badword),%bn,44) is bad word
        hinc -mu3600 events penalty. $+ $+(#,_,$nick,_badword) 1
        pro.penalty edt20 badword # $nick 
      }
      inc %bn 1 
    }
  }
  if ($hget(protek,chk16) = on) && ((*#* iswm $strip($1-)) || (*http:* iswm $strip($1-)) || (*www.* iswm $strip($1-))) { var %bn 1
    while $gettok($hget(protek,pro.excempt),%bn,44) != $null { 
      if ($gettok($hget(protek,pro.excempt),%bn,44) iswm $1-) { halt }
      inc %bn 1
    } 
    hinc -mu3600 events penalty. $+ $+(#,_,$nick,_excempt) 1
    pro.penalty edt21 excempt # $nick 
  }
}

on *:NOTICE:*:%pro.chan: { 
  if ($me !isop $chan) halt 
  if ($left($target,1) = $chr(35)) {
    var %code.count = $calc($count($1-,$chr(3)) + $count($1-,$chr(31)) + $count($1-,$chr(15)) + $count($1-,$chr(2)) + $count($1-,$chr(22)))
    var %code.percent = $round($calc(%code.count / $len($strip($1-)) * 100),0)
    if (%code.percent >= 50) && ($len($1-) >= 50) || ($len($1-) >= 250) { hinc -m60 event net.flood 1 | .ignore -ntcu10 *!*@ $+ $site | mode # +RMc 
      if $hget(event,net.flood) >= 1 { .timerrm 1 60 mode # -RMc | ban # $nick 2 | kick # $nick $hget(protek,edt26) 7»» Flood Net Attempt. }
    }
  }
  if ($hget(protek,chk1) = on) && ($len($strip($1-)) > 10) {
    hinc -mu $+ $hget(protek,pro1.edt2) events penalty. $+ $nick $+ . $+ # $+ . $+ $hash($strip($1-),32) 1
    if ($hget(events,penalty. $+ $nick $+ . $+ $chan $+ . $+ $hash($strip($1-),32)) >= $hget(protek,pro1.edt1)) {
      hadd -mu10 events puta $hget(events,penalty. $+ $nick $+ . $+ $chan $+ . $+ $hash($strip($1-),32)) in $hget(protek,pro1.edt2) sec.
      hdel events penalty. $+ $nick $+ . $+ $chan $+ . $+ $hash($strip($1-),32)
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_repeat) 1
      pro.penalty edt6 repeat $chan $nick
    }
  }
  if ($hget(protek,chk2) = on) && ($len($strip($1-)) > 5) {
    hinc -mu $+ $hget(protek,pro2.edt2) events fld. $+ $chan $+ . $+ $nick 1
    if $hget(events,fld. $+ # $+ . $+ $nick) >= $hget(protek,pro2.edt1) { 
      hadd -mu10 events puta $hget(events,fld. $+ # $+ . $+ $nick) in $hget(protek,pro2.edt2) sec.
      hdel events fld. $+ # $+ . $+ $nick
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_flood) 1
      pro.penalty edt7 flood $chan $nick | hdel events fld. $+ $chan $+ . $+ $nick
    }
  }
  if ($hget(protek,chk3) = on) && ($len($strip($1-)) >= $hget(protek,pro3.edt1)) { 
    hadd -mu10 events puta $len($strip($1-)) total length
    hinc -mu3600 events penalty. $+ $+(#,_,$nick,_longtext) 1 
    pro.penalty edt8 longtext # $nick
  } 
  if $hget(protek,chk4) = on {
    var %text = $strip($remove($1-,$chr(32)))
    var %caps.letters = $calc($len(%text) - $len($removecs($1-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z)))
    var %caps.percent = $round($calc(%caps.letters / $len($1-) * 100),0)
    var %caps.allow = $hget(protek,pro4.edt1)
    if (%caps.percent >= %caps.allow) && ($len(%text) >= 30) {
      hadd -mu10 events puta %caps.percent percent CAPS
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_caps) 1
      pro.penalty edt9 caps $chan $nick
    }
  }
  if $hget(protek,chk5) = on { 
    var %color.count = $calc($count($1-,$chr(3)) + $count($1-,$chr(31)) + $count($1-,$chr(15)))
    var %color.percent = $round($calc(%color.count / $len($strip($1-)) * 100),0)
    if (%color.percent >= $hget(protek,pro5.edt1)) && ($len($1-) >= 20) { 
      hadd -mu10 events puta %color.percent percent colors
      hinc -mu3600 events penalty. $+ $+(#,_,$nick,_color) 1
      pro.penalty edt10 color # $nick
    }
  }
  if $hget(protek,chk6) = on { 
    var %code.count = $calc($count($1-,$chr(3)) + $count($1-,$chr(31)) + $count($1-,$chr(15)) + $count($1-,$chr(2)) + $count($1-,$chr(22)))
    var %code.percent = $round($calc(%code.count / $len($strip($1-)) * 100),0)
    var %code.allow = $hget(protek,pro6.edt1)
    if (%code.percent >= %code.allow) && ($len($1-) >= 20) {
      hadd -mu10 events puta %code.percent percent codes
      hinc -mu3600 events penalty. $+ $+(#,_,$nick,_code) 1
      pro.penalty edt11 code # $nick 
    }
  }
  if $hget(protek,chk15) = on { var %bn 1 
    while $gettok($hget(protek,pro.badword),%bn,44) != $null { 
      if $gettok($hget(protek,pro.badword),%bn,44) iswm $strip($1-) { 
        hadd -mu10 events puta $hget(protek,pro.badword),%bn,44) is bad word
        hinc -mu3600 events penalty. $+ $+(#,_,$nick,_badword) 1
        pro.penalty edt20 badword # $nick 
      }
      inc %bn 1 
    }
  }
  if ($hget(protek,chk16) = on) && ((*#* iswm $strip($1-)) || (*http:*.* iswm $strip($1-)) || (*www.*.* iswm $strip($1-))) { var %bn 1
    while $gettok($hget(protek,pro.excempt),%bn,44) != $null { 
      if $gettok($hget(protek,pro.excempt),%bn,44) iswm $1- { halt }
      inc %bn 1
    } 
    if ((*# * iswm $strip($1-)) { halt }
    hinc -mu3600 events penalty. $+ $+(#,_,$nick,_excempt) 1
    pro.penalty edt21 excempt # $nick 
  }
}
on *:ACTION:*:%pro.chan: {
  if ($me !isop #) halt 
  if ($hget(protek,chk1) = on) && ($len($strip($1-)) > 10) {
    hinc -mu $+ $hget(protek,pro1.edt2) events penalty. $+ $nick $+ . $+ # $+ . $+ $hash($strip($1-),32) 1
    if ($hget(events,penalty. $+ $nick $+ . $+ $chan $+ . $+ $hash($strip($1-),32)) >= $hget(protek,pro1.edt1)) {
      hadd -mu10 events puta $hget(events,penalty. $+ $nick $+ . $+ $chan $+ . $+ $hash($strip($1-),32)) in $hget(protek,pro1.edt2) sec.
      hdel events penalty. $+ $nick $+ . $+ $chan $+ . $+ $hash($strip($1-),32)
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_repeat) 1
      pro.penalty edt6 repeat $chan $nick
    }
  }
  if ($hget(protek,chk2) = on) && ($len($strip($1-)) > 5) {
    hinc -mu $+ $hget(protek,pro2.edt2) events fld. $+ # $+ . $+ $nick 1
    if $hget(events,fld. $+ # $+ . $+ $nick) >= $hget(protek,pro2.edt1) { 
      hadd -mu10 events puta $hget(events,fld. $+ # $+ . $+ $nick) in $hget(protek,pro2.edt2) sec.
      hdel events fld. $+ # $+ . $+ $nick
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_flood) 1
      pro.penalty edt7 flood $chan $nick | hdel events fld. $+ $chan $+ . $+ $nick
    }
  }
  if ($hget(protek,chk3) = on) && ($len($strip($1-)) >= $hget(protek,pro3.edt1)) { 
    hadd -mu10 events puta $len($strip($1-)) total length
    hinc -mu3600 events penalty. $+ $+(#,_,$nick,_longtext) 1 
    pro.penalty edt8 longtext # $nick 
  } 
  if $hget(protek,chk4) = on {
    var %text = $strip($remove($1-,$chr(32)))
    var %caps.letters = $calc($len(%text) - $len($removecs($1-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z)))
    var %caps.percent = $round($calc(%caps.letters / $len($1-) * 100),0)
    var %caps.allow = $hget(protek,pro4.edt1)
    if (%caps.percent >= %caps.allow) && ($len(%text) >= 15) {
      hadd -mu10 events puta %caps.percent percent CAPS
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_caps) 1
      pro.penalty edt9 caps $chan $nick
    }
  }
  if $hget(protek,chk5) = on { 
    var %color.count = $calc($count($1-,$chr(3)) + $count($1-,$chr(31)) + $count($1-,$chr(15)))
    var %color.percent = $round($calc(%color.count / $len($strip($1-)) * 100),0)
    if (%color.percent >= $hget(protek,pro5.edt1)) && ($len($1-) >= 30) { 
      hadd -mu10 events puta %color.percent percent colors
      hinc -mu3600 events penalty. $+ $+(#,_,$nick,_color) 1
      pro.penalty edt10 color # $nick
    }
  }
  if $hget(protek,chk6) = on { 
    var %code.count = $calc($count($1-,$chr(3)) + $count($1-,$chr(31)) + $count($1-,$chr(15)) + $count($1-,$chr(2)) + $count($1-,$chr(22)))
    var %code.percent = $round($calc(%code.count / $len($strip($1-)) * 100),0)
    var %code.allow = $hget(protek,pro6.edt1)
    if (%code.percent >= %code.allow) && ($len($1-) >= 30) {
      hadd -mu10 events puta %code.percent percent codes
      hinc -mu3600 events penalty. $+ $+(#,_,$nick,_code) 1
      pro.penalty edt11 code # $nick 
    }
  }
  if $hget(protek,chk15) = on { var %bn 1 
    while $gettok($hget(protek,pro.badword),%bn,44) != $null { 
      if $gettok($hget(protek,pro.badword),%bn,44) iswm $strip($1-) { 
        hadd -mu10 events puta $hget(protek,pro.badword),%bn,44) is bad word
        hinc -mu3600 events penalty. $+ $+(#,_,$nick,_badword) 1
        pro.penalty edt20 badword # $nick 
      }
      inc %bn 1 
    }
  }
  if ($hget(protek,chk16) = on) && ((*#* iswm $strip($1-)) || (*http:* iswm $strip($1-)) || (*www.* iswm $strip($1-))) { var %bn 1
    while $gettok($hget(protek,pro.excempt),%bn,44) != $null { 
      if ($gettok($hget(protek,pro.excempt),%bn,44) iswm $1-) { halt }
      inc %bn 1
    } 
    hinc -mu3600 events penalty. $+ $+(#,_,$nick,_excempt) 1
    pro.penalty edt21 excempt # $nick 
  }
}
on *!:NICK: { 
  if $nick != $me {
    pro.return.nick 
    if ($hget(protek,chk30)) && (($nick isin $hget(user,op)) && ($nick isin $hget(user,voice)) && ($hget(user,greet $+ $nick) != $null)) halt
  }
  if ($hget(protek,chk7) = on) && (*guest* iswm $newnick) { 
    var %zx = 1 | while ($comchan($newnick,%zx) != $null) { 
      if $comchan($newnick,%zx) isin %pro.chan {
        if ($me !isop $comchan($newnick,%zx)) halt
        hinc -mu3600 events penalty. $+ $+($comchan($newnick,%zx),_,$newnick,_guest) 1 
        pro.penalty edt12 guest $comchan($newnick,%zx) $newnick
      }
      inc %zx 1
    }
  } 
  var %zc 1 | while $gettok($hget(protek,pro.badnick),%zc,44) != $null {
    if ($hget(protek,chk8) = on) && (* $+ $gettok($hget(protek,pro.badnick),%zc,44) $+ * iswm $newnick) {
      var %zx = 1 | while ($comchan($newnick,%zx) != $null) { 
        if $comchan($newnick,%zx) isin %pro.chan {
          if ($me !isop $comchan($newnick,%zx)) halt
          hinc -mu3600 events penalty. $+ $+($comchan($newnick,%zx),_,$newnick,_badnick) 1 
          pro.penalty edt12 badnick $comchan($newnick,%zx) $newnick
        }
        inc %zx 1
      }
    }
    inc %zc 1
  }
}
on *:JOIN:%pro.chan: {
  pro.return
  if $nick = $me {
    if $hget(protek,chk22) = on { .timertopic $+ $chan 1 2 topic $chan $hget(protek,edt2) }
    if $hget(protek,chk23) = on { .timermsg $+ $chan 1 3 msg $chan $hget(protek,edt3) }
    if $hget(protek,chk24) = on { .timermode $+ $chan 1 4 mode $chan -o $me }
  }
  if $nick != $me { hinc -u5 protek otomsgm 1 
    if ($hget(protek,chk25) = on) && ($hget(protek,otomsg) = 1) { .timermc 1 1 .msg $chan $replace($hget(protek,edt4),<chan>,$chan,<nick>,$nick) }
    if $hget(protek,chk27) = on { .timerwhois 1 3 w $nick $nick | .enable #w }
  }
  if ($me !isop #) halt
  if ($hget(protek,chk7) = on) && (guest* iswm $nick) { hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_guest) 1 | pro.penalty edt12 guest $chan $nick | return }
  if $hget(protek,chk8) = on { var %bn 1 | while $gettok($hget(protek,pro.badnick),%bn,44) != $null {
      if ($gettok($hget(protek,pro.badnick),%bn,44) iswm $nick) {
        hinc -mu3600 events penalty. $+ $+(#,_,$nick,_badnick) 1
        pro.penalty edt13 badnick # $nick 
      }
      inc %bn 1 
    }
  }
  if $hget(protek,chk9) = on { var %bn 1 | while $gettok($hget(protek,pro.badhost),%bn,44) != $null { 
      if ($gettok($hget(protek,pro.badhost),%bn,44) iswm $fulladdress) { 
        hinc -mu3600 events penalty. $+ $+(#,_,$nick,_badhost) 1 
        pro.penalty edt14 badhost # $nick 
      } 
      inc %bn 1
    }
  }
  if $hget(protek,chk10) = on { .timerwn 1 3 whois $nick | .disable #who1 | .enable #halts | hadd -mu60 events badch $+ $nick # }
  if ($hget(protek,chk11) = on) && ($hget(events,penalty. $+ $+(#,_,$site,_quit)) > 0) { 
    pro.return
    if $hget(protek,pro16.banonstyle) = 1 { 
      if $hget(events,penalty. $+ $+(#,_,$site,_quit)) >= 1 { pro.ban edt16 # $nick | hdel events penalty. $+ $+(#,_,$site,_quit) }
    }
    if $hget(protek,pro16.banonstyle) = 2 {
      if $hget(events,penalty. $+ $+(#,_,$site,_quit)) = 1 { pro.warn edt16 # $nick }
      if $hget(events,penalty. $+ $+(#,_,$site,_quit)) >= 2 { pro.ban edt16 # $nick | hdel events penalty. $+ $+(#,_,$site,_quit) }
    }
    if $hget(protek,pro16.banonstyle) = 3 { 
      if $hget(events,penalty. $+ $+(#,_,$site,_quit)) = 1 { pro.warn edt16 # $nick }
      if ($hget(events,penalty. $+ $+(#,_,$site,_quit)) = 2) && ($hget(events,quit.part. $+ $site) = $null) { pro.kick edt16 # $nick | hinc -mu10 events quit.part. $+ $site 1 }
      if $hget(events,penalty. $+ $+(#,_,$site,_quit)) >= 3 { pro.ban edt16 # $nick | hdel events penalty. $+ $+(#,_,$site,_quit) }
    }
    if $hget(protek,pro16.banonstyle) = 4 { 
      if $hget(events,penalty. $+ $+(#,_,$site,_quit)) = 1 { pro.warn edt16 # $nick }
      if ($hget(events,penalty. $+ $+(#,_,$site,_quit)) = 2) && ($hget(events,quit.part. $+ $site) = $null) { pro.kick edt16 # $nick | hinc -mu10 events quit.part. $+ $site 1 }
      if ($hget(events,penalty. $+ $+(#,_,$site,_quit)) = 3) && ($hget(events,quit.part. $+ $site) = $null) { pro.kick edt16 # $nick | hinc -mu10 events quit.part. $+ $site 1 } 
      if $hget(events,penalty. $+ $+(#,_,$site,_quit)) >= 4 { pro.ban edt16 # $nick | hdel events penalty. $+ $+(#,_,$site,_quit) } 
    }
    if $hget(protek,pro16.banonstyle) = 5 { pro.warn quit # $nick | hdel events penalty. $+ $+(#,_,$site,_quit)) }
  }
  if ($hget(protek,chk18) = on) && ($nick != $me) { hinc -mu60 events revolv. $+ $+(#,_,$nick) 1 }
  if $hget(protek,chk20) = on { 
    if $ialchan($site,#,0) >= $hget(protek,pro20.edt1) { 
      hinc -mu3600 events penalty. $+ $+(#,_,$nick,_clone) 1
      pro.penalty edt25 clone # $nick 
    }
  }
}
#w on
raw 301:*: { halt | .disable #w }
#w end
on *:KICK:%pro.chan: {
  if ($me !isop #) halt
  if $hget(protek,chk12) = on { 
    hinc -mu $+  $hget(protek,pro12.edt2) events $+(masskick,$chan,$nick) 1
    if $hget(events,$hget(events,masskick $+ $chan $+ $nick)) >= $hget(protek,pro12.edt1) { 
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_masskick) 1
      pro.penalty edt17 masskick $chan $nick | hdel events $hget(events,masskick) 
    }
  }
}
on *:BAN:%pro.chan: {
  if ($me !isop #) halt
  if ($hget(protek,chk13) = on) && (*!*@* = $banmask) { ban -r # $ibl(#,1) | pro.penalty edt18 massban # $nick }
  if $hget(protek,chk13) = on { 
    hinc -mu $+  $hget(protek,pro13.edt2) events $+(massban,#,$nick) 1
    if $hget(events,$hget(events,massban $+ # $+ $nick)) >= $hget(protek,pro13.edt1) { 
      hinc -mu3600 events penalty. $+ $+(#,_,$nick,_massban) 1
      pro.penalty edt18 massban # $nick | hdel events $hget(events,massban) 
    }
  }
}
on *:DEOP:%pro.chan: {
  if ($me !isop #) halt
  if $hget(protek,chk14) = on { 
    hinc  -mu $+  $hget(protek,pro14.edt2) events $+(massdeop,$chan,$nick) 1
    if $hget(events,$hget(events,massdeop $+ $chan $+ $nick)) >= $hget(protek,pro14.edt1) { 
      hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_massdeop) 1
      pro.penalty edt19 massdeop $chan $nick | hdel events $hget(events,massdeop) 
    }
  }
}
on *:OP:%pro.chan:{
  if ($hget(protek,chk21) = on) && ($opnick = $me) { .raw mode $chan $hget(protek,edt1) }
  if ($hget(protek,chk22) = on) { .timertopic 1 2 topic $chan $hget(protek,edt2) }
}
on *:OPEN:?:*: {
  if $hget(protek,chk17) = on { var %bn 1 | var %xn 1 | var %cn 1
    while $gettok($hget(protek,pro.excempt),%cn,44) != $null { 
      if * $+ $gettok($hget(protek,pro.excempt),%cn,44) $+ * iswm $strip($1-) { return }
      inc %cn 1
    }
    while $gettok(%pro.chan,%xn,44) != $null {
      if $me !isop $gettok(%pro.chan,%xn,44) return
      while $gettok($hget(protek,pro.spamword),%bn,44) != $null {
        if $gettok($hget(protek,pro.spamword),%bn,44) iswm $strip($1-) {
          hinc -mu3600 events penalty. $+ $+(%pro.chan,_, $site,_spamword) 1
          pro.penalty edt22 spamword $gettok(%pro.chan,%xn,44) $nick
          close -m $nick
          if $hget(setup,chk19) = off {
            echo -s 0,1QEURY Spam $1 : $left($2-,12) $+ ...
            .write logs\SPAM.log $timestamp $t.stamp(1) 10« $+ $color(info) $+ $nick $+ 10» $+ $color(normal) $1- 
            .remove logs\ $+ $nick $+ .log
            .msg $nick $hget(setup,edt4) 12 $+ $sc 4v. $+ $bersyon | hadd -mu60 events spam.nicks $nick $+ , $+ $hget(events,spam,nicks)
            return
          }
        }
        inc %bn 1
      }
      inc %xn 1
    }
  }
}
on *:NOTICE:*:?: {
  pro.return
  if $hget(protek,chk17) = on { var %bn 1 | var %xn 1
    while $gettok(%pro.chan,%xn,44) != $null { 
      if $me !isop $gettok(%pro.chan,%xn,44) halt
      while $gettok($hget(protek,pro.spamword),%bn,44) != $null { 
        if $gettok($hget(protek,pro.spamword),%bn,44) iswm $1- {
          hinc -mu3600 events penalty. $+ $+(%pro.chan,_,$site,_spamword) 1
          pro.penalty edt22 spamword $gettok(%pro.chan,%xn,44) $nick
        }
        inc %bn 1
      }
      inc %xn 1
    }
  }
}
on *:PART:%pro.chan: {
  pro.return
  if ($hget(protek,chk26) = on) && ($nick != $me) { .msg $nick $replace($hget(protek,edt5),<chan>,$chan,<nick>,$nick) }
  if $me !isop # halt
  if ($hget(protek,chk18) = on) && ($me isop $chan) && ($hget(events,revolv. $+ $+($chan,_,$nick)) != $null) { hinc -mu10 events revolv. $+ $chan $+ $nick 1 }
  if ($hget(protek,chk18) = on) && ($hget(events,revolv. $+ $chan $+ $nick) >= $hget(protek,pro18.edt1)) {
    hinc -mu3600 events penalty. $+ $+($chan,_,$nick,_revolv) 1
    pro.penalty edt18 revolv $chan $nick
    .notice $nick $iif($hget(protek,edt26) != $null,$hget(protek,edt26) 7»»,) Revolving Door Ban set on you.
  }
  if ($hget(protek,chk11) = on) && ($nick != $me) { 
    if (* $+ $chr(35) $+ * iswm $strip($1-)) || (*http:* isin $strip($1-)) || (*www.* isin $strip($1-)) || (*script* isin $strip($1-)) && ((*ΠλεΠ£₯* !iswm $strip($1-)) || (*deadly* !iswm $strip($1-))) {
      var %bn = 1
      while $gettok($hget(protek,pro.excempt),%bn,44) != $null { 
        if $gettok($hget(protek,pro.excempt),%bn,44) iswm $1- { halt }
        inc %bn 1
      } 
      hinc -mu3600 events penalty. $+ $+(#,_,$site,_quit) 1
    }
  }
}
on *:QUIT: { 
  if ($hget(protek,chk11) = on) && ($nick != $me) { 
    if ($chr(35) $+ * iswm $strip($1-)) || (*http:* iswm $strip($1-)) || (*www.* iswm $strip($1-)) || (excess = $1) || (killed = $1) && ((*ΠλεΠ£₯* !iswm $strip($1-)) || (*deadly* !iswm $strip($1-))) {
      if ($remove($3,$chr(41)) = Collision) halt
      var %bn 1
      while $gettok($hget(protek,pro.excempt),%bn,44) != $null { 
        if $gettok($hget(protek,pro.excempt),%bn,44) iswm $1- { halt }
        inc %bn 1
      }
      var %cc 1
      while $gettok(%pro.chan,%cc,44) != $null { if $comchan($nick,%cc) = $null halt
        hinc -mu3600 events penalty. $+ $+($comchan($nick,%cc),_,$site,_quit) 1
        inc %cc
      }
    }
  }
}
;-=-=-=-=-=-
;-=-=-=-=-=-
