PowerPuffGold.2000 — File Browser

PowerPuffGold.2000v2.0 / PowerPuffGold.2000v2.0 / PowerPuffGold2000 / remotes / pervpop.mrc

pervpop.mrc — 23.4 KB — Download this file

;°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
;°°°°°°°°°°°°°°°° <<PowerPuffGold.2000>> °°°°°°°°°°°°°°°°°°
;°°°°°°°°°°°°°°° written by sunny` and kara`°°°°°°°°°°°°°°°°°
;°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
;.........................Feel free to make any............................
;..................changes/add-ons/etc u wish........................
;...........but be warned, this is a mutli-level script,...........
;.......what u may think is a minor change may affect......
;.............. many other aspects of the script, so.............. 
:..............dont blame us when ya mess it all up!!..............
;°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
;-------------GUI Junk for <<24Kara`t PervScan>>------------------
;3/3
;----------Dialogs-------------

dialog PervScan {
  title "<<24Kara`t PervScan>>"
  size -1 -1 400 175
  icon 8, 0 -12 400 43, ppg2klogo.bmp, 0
  box "Select", 7, 3 24 94 97
  button "PottyMouth", 1, 10 40 80 22
  button "PervNick", 2, 10 66 80 22
  button "Whois Scan", 3, 10 92 80 22
  box "", 15, 3 132 94 41
  button "Exit", 5, 10 145 80 22, cancel
  box "General Options", 9, 100 24 298 149
  text "(Sections on the left, modify specific portions of the script)", 23, 108 45 400 13, left
  check "Report all offenses to special window", 16, 108 84 300 13
  check "Op notices sent on warnings and some kicks", 29, 108 105 300 13
  text "Protect", 24, 108 65 50 13
  radio "All", 25, 147 65 35 13, right, group
  radio "Selected Channels", 26, 184 65 130 13, right
  text "Ban Length (seconds)", 22, 108 127 144 13
  edit "", 20, 108 144 40 22, right, autohs
  button "<- Set", 21, 151 145 50 22
  text "View/Edit", 28, 225 129 60 13
  button "Protected Chans" 27, 225 145 92 22
  button "Help", 18, 342 145 50 22
}
dialog PottyMouth {
  title "<<24Kara`t PervScan>>"
  size -1 -1 400 175
  icon 8, 0 -12 400 43, ppg2klogo.bmp, 0
  box "Select", 7, 3 24 94 97
  button "PottyMouth", 1, 10 40 80 22
  button "PervNick", 2, 10 66 80 22
  button "Whois Scan", 3, 10 92 80 22
  box "", 20, 3 132 94 41
  button "Exit", 5, 10 145 80 22, cancel
  box "PottyMouth", 9, 100 24 298 149
  check "Enable", 10, 108 45 60 13, center
  check "Kick/Ban for swearing in msg", 11, 108 65 160 13, center
  text "Ban on:", 12, 108 95 40 13, left
  radio "First Offense", 13, 150 95 85 13, right
  radio "Second Offense", 14, 150 110 100 13, right
  button "Help", 18, 342 145 50 22
  box "View/Edit", 21, 291 38 102 44
  button "Word List", 19, 296 55 92 22
}
dialog PervNick {
  title "<<24Kara`t PervScan>>"
  size -1 -1 400 175
  icon 8, 0 -12 400 43, ppg2klogo.bmp, 0
  box "Select", 7, 3 24 94 97
  button "PottyMouth", 1, 10 40 80 22
  button "PervNick", 2, 10 66 80 22
  button "Whois Scan", 3, 10 92 80 22
  box "", 21, 3 132 94 41
  button "Exit", 5, 10 145 80 22, cancel
  box "PervNick", 9, 100 24 298 149
  check "Enable", 10, 113 45 60 13, center
  check "Advise of questionable nicks", 11, 113 65 155 13, center
  check "Warn before kicking", 12, 113 85 115 13, center
  check "Scan channel as you join", 14, 113 105 142 13, center
  check "Ignore msgs from offensive nicks", 15, 113 125 173 13, center
  button "Help", 18, 342 145 50 22
  box "View/Edit", 20, 291 38 102 70
  button "Offens. Nick List", 16, 296 55 92 22
  button "Questionable List", 17, 296 81 92 22

}
dialog Whois {
  title "<<24Kara`t PervScan>>"
  size -1 -1 400 175
  icon 8, 0 -12 400 43, ppg2klogo.bmp, 0
  box "Select", 7, 3 24 94 97
  button "PottyMouth", 1, 10 40 80 22
  button "PervNick", 2, 10 66 80 22
  button "Whois Scan", 3, 10 92 80 22
  box "", 16, 3 132 94 41
  button "Exit", 5, 10 145 80 22, cancel
  box "Whois Scanner", 9, 100 24 298 149
  check "Kick for offensive Channels", 10, 113 45 155 13, center
  check "Warn before kicking", 11, 113 65 117 13, center
  check "Kick for off. User ID/Real Name", 12, 113 85 171 13, center
  box "View/Edit", 20, 291 38 102 70
  button "Bad Chan List", 21, 296 55 92 22
  button "UD/RN List", 17, 296 81 92 22
  button "Help", 18, 342 145 50 22
}
dialog pmlist {
  title "<24K>PottyMouth Word List"
  size -1 -1 211 245
  edit "", 1, 7 7 120 22, autohs
  button "Add Word(s)", 4, 137 8 70 22, default
  box "Word List", 5, 2 36 131 207
  list 2, 7 50 120 200, sort, extsel
  button "OK", 3, 137 34 70 22, ok
  button "Del. Word(s)", 10, 137 100 70 22
  text "<-Select word(s)", 6, 133 130 80 13
  text "and click on", 7, 141 144 80 13
  text "Del. Word", 8, 141 158 80 13
  text "button.", 9, 141 172 80 13
}
dialog pnlist {
  title "<24K>PervNick Word List"
  size -1 -1 211 245
  edit "", 1, 7 7 120 22, autohs
  button "Add Word(s)", 4, 137 8 70 22, default
  box "Word List", 5, 2 36 131 207
  list 2, 7 50 120 200, sort, extsel
  button "OK", 3, 137 34 70 22, ok
  button "Del. Word(s)", 10, 137 100 70 22
  text "<-Select word(s)", 6, 133 130 80 13
  text "and click on", 7, 141 144 80 13
  text "Del. Word", 8, 141 158 80 13
  text "button.", 9, 141 172 80 13
}
dialog pnqlist {
  title "<24K>Questionable Nick List"
  size -1 -1 211 245
  edit "", 1, 7 7 120 22, autohs
  button "Add Word(s)", 4, 137 8 70 22, default
  box "Word List", 5, 2 36 131 207
  list 2, 7 50 120 200, sort, extsel
  button "OK", 3, 137 34 70 22, ok
  button "Del. Word(s)", 10, 137 100 70 22
  text "<-Select word(s)", 6, 133 130 80 13
  text "and click on", 7, 141 144 80 13
  text "Del. Word", 8, 141 158 80 13
  text "button.", 9, 141 172 80 13
}
dialog pnclist {
  title "<24K>Prot. Channels List"
  size -1 -1 211 245
  edit "", 1, 7 7 120 22, autohs
  button "Add Word(s)", 4, 137 8 70 22, default
  box "Word List", 5, 2 36 131 207
  list 2, 7 50 120 200, sort, extsel
  button "OK", 3, 137 34 70 22, ok
  button "Del. Word(s)", 10, 137 100 70 22
  text "<-Select word(s)", 6, 133 130 80 13
  text "and click on", 7, 141 144 80 13
  text "Del. Word", 8, 141 158 80 13
  text "button.", 9, 141 172 80 13
}
dialog whoislist {
  title "<24K>Whois Scanner List"
  size -1 -1 211 245
  edit "", 1, 7 7 120 22, autohs
  button "Add Word(s)", 4, 137 8 70 22, default
  box "Word List", 5, 2 36 131 207
  list 2, 7 50 120 200, sort, extsel
  button "OK", 3, 137 34 70 22, ok
  button "Del. Word(s)", 10, 137 100 70 22
  text "<-Select word(s)", 6, 133 130 80 13
  text "and click on", 7, 141 144 80 13
  text "Del. Word", 8, 141 158 80 13
  text "button.", 9, 141 172 80 13
}
dialog bchlist {
  title "<24K>Bad Channel List"
  size -1 -1 211 245
  edit "", 1, 7 7 120 22, autohs
  button "Add Word(s)", 4, 137 8 70 22, default
  box "Word List", 5, 2 36 131 207
  list 2, 7 50 120 200, sort, extsel
  button "OK", 3, 137 34 70 22, ok
  button "Del. Word(s)", 10, 137 100 70 22
  text "<-Select word(s)", 6, 133 130 80 13
  text "and click on", 7, 141 144 80 13
  text "Del. Word", 8, 141 158 80 13
  text "button.", 9, 141 172 80 13
}

;----------General Events-------------

on 1:dialog:PervScan:sclick:1:pmdialog | dialog -c PervScan
on 1:dialog:PervScan:sclick:2:pndialog | dialog -c PervScan
on 1:dialog:PervScan:sclick:3:whdialog | dialog -c PervScan
on 1:dialog:PervScan:sclick:18:run $scriptdirpsreadme.txt
on 1:dialog:PervScan:init:0: {
  did -a PervScan 20 %blength
  did -f PervScan 18
  if (%rv = on) { did -c PervScan 16 }
  if (%pcs = off) { did -c PervScan 25 }
  if (%pcs = on) { did -c PervScan 26 }
  if (%opnr = on) { did -c PervScan 29 }
}
on 1:dialog:PervScan:sclick:16: {
  if ($did(16).state = 1) { set %rv on | window -n @PervScan_Violations }
  if ($did(16).state = 0) { set %rv off | close -@ @PervScan_Violations }
}
on 1:dialog:PervScan:sclick:29: {
  if ($did(29).state = 1) { set %opnr on }
  if ($did(29).state = 0) { set %opnr off }
}
on 1:dialog:PervScan:sclick:25:set %pcs off
on 1:dialog:PervScan:sclick:26:set %pcs on
on 1:dialog:PervScan:sclick:27:pnclist
on 1:dialog:PervScan:sclick:17:set %rv on
on 1:dialog:PervScan:sclick:19:set %rv off
on 1:dialog:PervScan:sclick:21: {
  if ($did(20).text isnum) { set %blength $did(20).text }
  else { did -r PervScan 20 | did -a PervScan 20 %blength }
}
on 1:dialog:pnclist:sclick:4: {
  if ($did(1) != $null) {
    set %pnc.loop 1
    :loop
    if ($gettok(%pnac,%pnc.loop,32) = $null) { goto step }
    if ($did(1) = $gettok(%pnac,%pnc.loop,32)) { did -r pnclist 1 | return }
    inc %pnc.loop
    goto loop
    :step
    set %temp.pnclist $did(1).text
    set %npm.list 1
    :loop2
    if ($gettok(%temp.pnclist,%npm.list,32) = $null) { goto step2 }
    set %epm.list 1
    :insideloop
    if ($gettok(%pnac,%epm.list,32) = $null) { set %pnac %pnac $gettok(%temp.pnclist,%npm.list,32) | did -a pnclist 2 $gettok(%temp.pnclist,%npm.list,32) | inc %npm.list | goto loop2 }
    if ($gettok(%temp.pnclist,%npm.list,32) = $gettok(%pnac,%epm.list,32)) { inc %npm.list | goto loop2 }
    inc %epm.list
    goto insideloop
    :step2
    did -r pnclist 1
    did -r pnclist 2
    set %pnc.count 1
    :loop3
    if ($gettok(%pnac,%pnc.count,32) = $null) { unset %pnc.loop %temp.pnclist %npm.list %epm.list %pnc.count | return }
    did -a pnclist 2 $gettok(%pnac,%pnc.count,32)
    inc %pnc.count
    goto loop3
  }
}
on 1:dialog:pnclist:sclick:10: {
  if ($did(2,0).sel = 0) { return }
  set %pm.rem $did(2,0).sel
  :loop
  if (%pm.rem == 0) { goto update }
  set %temp.pm $did(2,%pm.rem).sel
  set %temp.pm2 $did(2,%temp.pm).text
  set %pnac $remove(%pnac,%temp.pm2)
  dec %pm.rem
  goto loop
  :update
  set %pnac %pnac $did(1)
  did -r pnclist 2
  set %pnc.count 1
  :loop2
  if ($gettok(%pnac,%pnc.count,32) = $null) { unset %pm.rem %temp.pm %temp.pm2 %pnc.count | return }
  did -a pnclist 2 $gettok(%pnac,%pnc.count,32)
  inc %pnc.count
  goto loop2
}
on 1:dialog:pnclist:init:0: {
  set %pnc.count 1
  :loop
  if ($gettok(%pnac,%pnc.count,32) = $null) { unset %pnc.count | return }
  did -a pnclist 2 $gettok(%pnac,%pnc.count,32)
  inc %pnc.count
  goto loop
}
;----------PottyMouth Events-----------

on 1:dialog:PottyMouth:sclick:2:pndialog | dialog -c PottyMouth
on 1:dialog:PottyMouth:sclick:3:whdialog | dialog -c PottyMouth
on 1:dialog:PottyMouth:sclick:18:run $scriptdirpsreadme.txt
on 1:dialog:PottyMouth:sclick:19:pmlist
on 1:dialog:PottyMouth:init:0: {
  did -f PottyMouth 1
  if (%pmth = on) { did -c PottyMouth 10 }
  if (%prkick = on) { did -c PottyMouth 11 }
  if (%nwn = on) { did -c PottyMouth 13 } | else { did -c PottyMouth 14 }
}
on 1:dialog:pmlist:init:0: {
  set %pm.count 1
  :loop
  if ($gettok(%pmouth,%pm.count,32) = $null) { unset %pm.count | return }
  did -a pmlist 2 $gettok(%pmouth,%pm.count,32)
  inc %pm.count
  goto loop
}
on 1:dialog:pmlist:sclick:4: {
  if ($did(1) != $null) {
    set %pm.loop 1
    :loop
    if ($gettok(%pmouth,%pm.loop,32) = $null) { goto step }
    if ($did(1) = $gettok(%pmouth,%pm.loop,32)) { did -r pmlist 1 | return }
    inc %pm.loop
    goto loop
    :step
    set %temp.pmlist $did(1).text
    set %npm.list 1
    :loop2
    if ($gettok(%temp.pmlist,%npm.list,32) = $null) { goto step2 }
    set %epm.list 1
    :insideloop
    if ($gettok(%pmouth,%epm.list,32) = $null) { set %pmouth %pmouth $gettok(%temp.pmlist,%npm.list,32) | did -a pmlist 2 $gettok(%temp.pmlist,%npm.list,32) | inc %npm.list | goto loop2 }
    if ($gettok(%temp.pmlist,%npm.list,32) = $gettok(%pmouth,%epm.list,32)) { inc %npm.list | goto loop2 }
    inc %epm.list
    goto insideloop
    set %pmouth %pmouth $did(1)
    :step2
    did -r pmlist 1
    did -r pmlist 2
    set %pm.count 1
    :loop3
    if ($gettok(%pmouth,%pm.count,32) = $null) { unset %pm.loop %temp.pmlist %npm.list %epm.list %pm.count |  return }
    did -a pmlist 2 $gettok(%pmouth,%pm.count,32)
    inc %pm.count
    goto loop3
  }
}
on 1:dialog:pmlist:sclick:10: {
  if ($did(2,0).sel = 0) { return }
  set %pm.rem $did(2,0).sel
  :loop
  if (%pm.rem == 0) { goto update }
  set %temp.pm $did(2,%pm.rem).sel
  set %temp.pm2 $did(2,%temp.pm).text
  set %pmouth $remove(%pmouth,%temp.pm2)
  dec %pm.rem
  goto loop
  :update
  set %pmouth %pmouth $did(1)
  did -r pmlist 2
  set %pm.count 1
  :loop2
  if ($gettok(%pmouth,%pm.count,32) = $null) { unset %pm.rem %temp.pm %temp.pm2 %pm.count | return }
  did -a pmlist 2 $gettok(%pmouth,%pm.count,32)
  inc %pm.count
  goto loop2
}
on 1:dialog:PottyMouth:sclick:10: {
  if ($did(10).state = 0) { .disable #PottyMouth | .disable #PottyQuery | set %pmth off }
  if ($did(10).state = 1) { .enable #PottyMouth | if (%prkick = on) { .enable #PottyQuery } | set %pmth on }
}
on 1:dialog:PottyMouth:sclick:11: {
  if ($did(11).state = 0) { set %prkick off | .disable #pottyquery }
  if ($did(11).state = 1) { set %prkick on | .enable #pottyquery }
}
on 1:dialog:PottyMouth:sclick:13:set %nwn on
on 1:dialog:PottyMouth:sclick:14:set %nwn off

;----------PervNick Events-------------

on 1:dialog:PervNick:init:0: {
  did -f PervNick 2
  if (%pn = on) || (%pndeact = on) { did -c PervNick 10 }
  if (%qn = on) { did -c PervNick 11 }
  if (%pnw = on) || (%pnwdeact = on) { did -c PervNick 12 }
  if (%js = on) { did -c PervNick 14 }
  if (%iv = on) { did -c PervNick 15 }
}
on 1:dialog:PervNick:sclick:1:pmdialog | dialog -c PervNick
on 1:dialog:PervNick:sclick:3:whdialog | dialog -c PervNick
on 1:dialog:PervNick:sclick:18:run $scriptdirpsreadme.txt
on 1:dialog:PervNick:sclick:16:pnlist
on 1:dialog:PervNick:sclick:17:pnqlist
on 1:dialog:PervNick:sclick:10: {
  if ($did(10).state = 1) { 
    if (%pnwdeact = on)  { .enable #pnw | .disable #pn | set %pnw on }
    else { .enable #pn | .disable #pnw | set %pn on }
  }
  if ($did(10).state = 0) {
    .disable #pn
    .disable #pnw
    set %pn off
    set %pndeact off
    if (%pnw = on) { set %pnwdeact on | set %pnw off }
  }
}
on 1:dialog:PervNick:sclick:11: {
  if ($did(11).state = 1) { set %qn on }
  if ($did(11).state = 0) { set %qn off }
}
on 1:dialog:PervNick:sclick:12: {
  if ($did(12).state = 1) {
    .disable #pn
    .enable #pnw
    set %pnw on
    if (%pn = on) { set %pn off | set %pndeact on }
  }
  if ($did(12).state = 0) {
    .disable #pnw
    /set %pnw off
    /set %pnwdeact off
    if (%pndeact = on) { set %pn on | set %pndeact off }
  }
}
on 1:dialog:PervNick:sclick:14: {
  if ($did(14).state = 1) { set %js on }
  if ($did(14).state = 0) { set %js off }
}
on 1:dialog:PervNick:sclick:15: {
  if ($did(15).state = 1) { set %iv on }
  if ($did(15).state = 0) { set %iv off }
}
on 1:dialog:pnlist:init:0: {
  set %pn.count 1
  :loop
  if ($gettok(%pervnick,%pn.count,32) = $null) { unset %pn.count | return }
  did -a pnlist 2 $gettok(%pervnick,%pn.count,32)
  inc %pn.count
  goto loop
}
on 1:dialog:pnqlist:init:0: {
  set %pnq.count 1
  :loop
  if ($gettok(%qnick,%pnq.count,32) = $null) { unset %pnq.count | return }
  did -a pnqlist 2 $gettok(%qnick,%pnq.count,32)
  inc %pnq.count
  goto loop
}
on 1:dialog:pnlist:sclick:4: {
  if ($did(1) != $null) {
    set %pn.loop 1
    :loop
    if ($gettok(%pervnick,%pn.loop,32) = $null) { goto step }
    if ($did(1) = $gettok(%pervnick,%pn.loop,32)) { did -r pnlist 1 | return }
    inc %pn.loop
    goto loop
    :step
    set %temp.pnlist $did(1).text
    set %npm.list 1
    :loop2
    if ($gettok(%temp.pnlist,%npm.list,32) = $null) { goto step2 }
    set %epm.list 1
    :insideloop
    if ($gettok(%pervnick,%epm.list,32) = $null) { set %pervnick %pervnick $gettok(%temp.pnlist,%npm.list,32) | did -a pnlist 2 $gettok(%temp.pnlist,%npm.list,32) | inc %npm.list | goto loop2 }
    if ($gettok(%temp.pnlist,%npm.list,32) = $gettok(%pervnick,%epm.list,32)) { inc %npm.list | goto loop2 }
    inc %epm.list
    goto insideloop
    :step2
    did -r pnlist 1
    did -r pnlist 2
    set %pn.count 1
    :loop3
    if ($gettok(%pervnick,%pn.count,32) = $null) { unset %pn.loop %temp.pnlist %npm.list %epm.list %pn.count | return }
    did -a pnlist 2 $gettok(%pervnick,%pn.count,32)
    inc %pn.count
    goto loop3
  }
}
on 1:dialog:pnlist:sclick:10: {
  if ($did(2,0).sel = 0) { return }
  set %pm.rem $did(2,0).sel
  :loop
  if (%pm.rem == 0) { goto update }
  set %temp.pm $did(2,%pm.rem).sel
  set %temp.pm2 $did(2,%temp.pm).text
  set %pervnick $remove(%pervnick,%temp.pm2)
  dec %pm.rem
  goto loop
  :update
  set %pervnick %pervnick $did(1)
  did -r pnlist 2
  set %pn.count 1
  :loop2
  if ($gettok(%pervnick,%pn.count,32) = $null) { unset %pm.rem %temp.pm %temp.pm2 %pn.count | return }
  did -a pnlist 2 $gettok(%pervnick,%pn.count,32)
  inc %pn.count
  goto loop2
}
on 1:dialog:pnqlist:sclick:4: {
  if ($did(1) != $null) {
    set %pnq.loop 1
    :loop
    if ($gettok(%qnick,%pnq.loop,32) = $null) { goto step }
    if ($did(1) = $gettok(%qnick,%pnq.loop,32)) { did -r pnqlist 1 | return }
    inc %pnq.loop
    goto loop
    :step
    set %temp.pnqlist $did(1).text
    set %npm.list 1
    :loop2
    if ($gettok(%temp.pnqlist,%npm.list,32) = $null) { goto step2 }
    set %epm.list 1
    :insideloop
    if ($gettok(%qnick,%epm.list,32) = $null) { set %qnick %qnick $gettok(%temp.pnqlist,%npm.list,32) | did -a pnqlist 2 $gettok(%temp.pnqlist,%npm.list,32) | inc %npm.list | goto loop2 }
    if ($gettok(%temp.pnqlist,%npm.list,32) = $gettok(%qnick,%epm.list,32)) { inc %npm.list | goto loop2 }
    inc %epm.list
    goto insideloop
    :step2
    did -r pnqlist 1
    did -r pnqlist 2
    set %pnq.count 1
    :loop3
    if ($gettok(%qnick,%pnq.count,32) = $null) { unset %pnq.loop %temp.pnqlist %npm.list %epm.list %pnq.count | return }
    did -a pnqlist 2 $gettok(%qnick,%pnq.count,32)
    inc %pnq.count
    goto loop3
  }
}
on 1:dialog:pnqlist:sclick:10: {
  if ($did(2,0).sel = 0) { return }
  set %pm.rem $did(2,0).sel
  :loop
  if (%pm.rem == 0) { goto update }
  set %temp.pm $did(2,%pm.rem).sel
  set %temp.pm2 $did(2,%temp.pm).text
  set %qnick $remove(%qnick,%temp.pm2)
  dec %pm.rem
  goto loop
  :update
  set %qnick %qnick $did(1)
  did -r pnqlist 2
  set %pnq.count 1
  :loop2
  if ($gettok(%qnick,%pnq.count,32) = $null) { unset %pm.rem %temp.pm %temp.pm2 %pnq.count | return }
  did -a pnqlist 2 $gettok(%qnick,%pnq.count,32)
  inc %pnq.count
  goto loop2
}

;----------Whois dialogs Events--------------

on 1:dialog:Whois:sclick:1:pmdialog | dialog -c Whois
on 1:dialog:Whois:sclick:2:pndialog | dialog -c Whois
on 1:dialog:whois:sclick:18:run $scriptdirpsreadme.txt
on 1:dialog:whois:sclick:17:whlist
on 1:dialog:whois:sclick:21:bchlist
on 1:dialog:Whois:init:0: {
  did -f Whois 3
  if (%pscc = on) { did -c Whois 10 }
  if (%pswarn = on) { did -c Whois 11 }
  if (%psurc = on) { did -c Whois 12 }
}
on 1:dialog:whoislist:init:0: {
  set %whs.count 1
  :loop
  if ($gettok(%pervscan,%whs.count,32) = $null) { unset %whs.count | return }
  did -a whoislist 2 $gettok(%pervscan,%whs.count,32)
  inc %whs.count
  goto loop
}
on 1:dialog:bchlist:init:0: {
  set %bch.count 1
  :loop
  if ($gettok(%pschan,%bch.count,32) = $null) { unset %bch.count | return }
  did -a bchlist 2 $gettok(%pschan,%bch.count,32)
  inc %bch.count
  goto loop
}
on 1:dialog:whois:sclick:10: {
  if ($did(10).state = 1) { .enable #pervscan | set %pscc on }
  if ($did(10).state = 0) { .disable #pervscan | set %pscc off }
}
on 1:dialog:whois:sclick:11: {
  if ($did(11).state = 1) { set %pswarn on }
  if ($did(11).state = 0) { set %pswarn off }
}
on 1:dialog:whois:sclick:12: {
  if ($did(12).state = 1) { .enable #pervscan2 | set %psurc on }
  if ($did(12).state = 0) { .disable #pervscan2 | set %psurc off }
}
on 1:dialog:whoislist:sclick:4: {
  if ($did(1) != $null) {
    set %whs.loop 1
    :loop
    if ($gettok(%pervscan,%whs.loop,32) = $null) { goto step }
    if ($did(1) = $gettok(%pervscan,%whs.loop,32)) { did -r whoislist 1 | return }
    inc %whs.loop
    goto loop
    :step
    set %temp.whslist $did(1).text
    set %npm.list 1
    :loop2
    if ($gettok(%temp.whslist,%npm.list,32) = $null) { goto step2 }
    set %epm.list 1
    :insideloop
    if ($gettok(%pervscan,%epm.list,32) = $null) { set %pervscan %pervscan $gettok(%temp.whslist,%npm.list,32) | did -a whoislist 2 $gettok(%temp.whslist,%npm.list,32) | inc %npm.list | goto loop2 }
    if ($gettok(%temp.whslist,%npm.list,32) = $gettok(%pervscan,%epm.list,32)) { inc %npm.list | goto loop2 }
    inc %epm.list
    goto insideloop
    set %pervscan %pervscan $did(1)
    :step2
    did -r whoislist 1
    did -r whoislist 2
    set %whs.count 1
    :loop3
    if ($gettok(%pervscan,%whs.count,32) = $null) { unset %whs.loop %temp.whslist %npm.list %epm.list %whs.count | return }
    did -a whoislist 2 $gettok(%pervscan,%whs.count,32)
    inc %whs.count
    goto loop3
  }
}
on 1:dialog:whoislist:sclick:10: {
  if ($did(2,0).sel = 0) { return }
  set %whs.rem $did(2,0).sel
  :loop
  if (%whs.rem == 0) { goto update }
  set %temp.whs $did(2,%whs.rem).sel
  set %temp.whs2 $did(2,%temp.whs).text
  set %pervscan $remove(%pervscan,%temp.whs2)
  dec %whs.rem
  goto loop
  :update
  set %pervscan %pervscan $did(1)
  did -r whoislist 2
  set %whs.count 1
  :loop2
  if ($gettok(%pervscan,%whs.count,32) = $null) { unset %whs.rem %temp.whs %temp.whs2 %whs.count | return }
  did -a whoislist 2 $gettok(%pervscan,%whs.count,32)
  inc %whs.count
  goto loop2
}
on 1:dialog:bchlist:sclick:4: {
  if ($did(1) != $null) {
    set %ch.loop 1
    :loop
    if ($gettok(%pschan,%ch.loop,32) = $null) { goto step }
    if ($did(1) = $gettok(%pschan,%ch.loop,32)) { did -r bchlist 1 | return }
    inc %ch.loop
    goto loop
    :step
    set %temp.chlist $did(1).text
    set %npm.list 1
    :loop2
    if ($gettok(%temp.chlist,%npm.list,32) = $null) { goto step2 }
    set %epm.list 1
    :insideloop
    if ($gettok(%pschan,%epm.list,32) = $null) { set %pschan %pschan $gettok(%temp.chlist,%npm.list,32) | did -a bchlist 2 $gettok(%temp.chlist,%npm.list,32) | inc %npm.list | goto loop2 }
    if ($gettok(%temp.chlist,%npm.list,32) = $gettok(%pschan,%epm.list,32)) { inc %npm.list | goto loop2 }
    inc %epm.list
    goto insideloop
    :step2
    did -r bchlist 1
    did -r bchlist 2
    set %bch.count 1
    :loop3
    if ($gettok(%pschan,%bch.count,32) = $null) { unset %ch.loop %temp.chlist %npm.list %epm.list %bch.count | return }
    did -a bchlist 2 $gettok(%pschan,%bch.count,32)
    inc %bch.count
    goto loop3
  }
}
on 1:dialog:bchlist:sclick:10: {
  if ($did(2,0).sel = 0) { return }
  set %bch.rem $did(2,0).sel
  :loop
  if (%bch.rem == 0) { goto update }
  set %temp.bch $did(2,%bch.rem).sel
  set %temp.bch2 $did(2,%temp.bch).text
  set %pschan $remove(%pschan,%temp.bch2)
  dec %bch.rem
  goto loop
  :update
  set %pschan %pschan $did(1)
  did -r bchlist 2
  set %bch.count 1
  :loop2
  if ($gettok(%pschan,%bch.count,32) = $null) { unset %bch.rem %temp.bch %temp.bch2 %bch.count | return }
  did -a bchlist 2 $gettok(%pschan,%bch.count,32)
  inc %bch.count
  goto loop2
}

;---------------Aliases-----------------

alias pmdialog .timer 1 0 dialog -m PottyMouth PottyMouth
alias pndialog .timer 1 0 dialog -m PervNick PervNick
alias whdialog .timer 1 0 dialog -m Whois Whois
alias pnclist .timer 1 0 dialog -m pnclist pnclist
alias pmlist .timer 1 0 dialog -m pmlist pmlist
alias pnlist .timer 1 0 dialog -m pnlist pnlist
alias pnqlist .timer 1 0 dialog -m pnqlist pnqlist
alias whlist .timer 1 0 dialog -m whoislist whoislist
alias bchlist .timer 1 0 dialog -m bchlist bchlist
;--------------Popups---------------

menu status,channel {
  -
  <24K>PervScan:dialog -m PervScan PervScan
}