IRC Guard 5000 (V5)- Black List

By N3M3S1S on Jan 21, 2011

V5 - Better, faster, stronger.

About IRC Guard 5000: http://CodersElite.site90.net/PG5KHelp.htm

First:
Just copy snippet below. Open notepad and paste code into notepad, the SAVE FILE AS
criptnamehere.mrc into your mIRC directory.

Then:
In mIRC press ALT+R when the script editor pops up go to FILE select LOAD and select scriptnamehere.mrc and click okay, allow initialization commands to run.

Or:
Once the file is saved into the mIRC directory use: /load -rs scriptnamehere.mrc and allow the initialization commands to run.

IRC Guard 5000 (V5) is a blacklist made to repel pedophiles, creeps, trolls and other undesirable users on IRC. you must have channel operator (+o) status on a channel to use this script!

Please report all bugs here!

Looking for V4? Get the source code here: http://CodersElite.site90.net/PG5K.htm

;IRC Guard 5000 (V5)
;Better, Faster, Stronger.
;By Neo Nemesis
;Basically a black list designed to 
;repel IRC stalkers, creepers, pedos
;and other undesirables
;Special thanks to Jethro_, Bofh, Gemstone, Manit and gasak :D
;And thanks to the memebers of Hawkee forums!
;List Update check on start
on *:LOAD: {
  echo -a * IRC Guard 5000 (V5) is loading...
  ;set -u0 %crl.01 on,on,on,on,on,ban,2,You are not welcome here!
  ;checking for older versions
  if ($isfile(PG5K.ini) == $true) {
    if ($creep.file(01)) { 
      set -u0 %CRP_DUMP $input(Do you wish to save old entries from V4?,yi,IRC Guard 5000 $chr(40) $+ V5 $+ $chr(41))
      if (%CRP_DUMP == $true) {
        echo -a * Saving old entries and options...
        ;saving old entries. Most of them save 
        ;right over except for user white list. 
        ;$creep.file(05) is parsed.
        if ($creep.file(02)) { set -u0 %crl.ubl $creep.file(02) }
        if ($creep.file(03)) { set -u0 %crl.ibl $creep.file(03) }
        if ($creep.file(04)) { set -u0 %crl.cwl $creep.file(04) }
        if ($creep.file(05)) {
          set -u0 %num 1
          while (%num <= $numtok($creep.file(05),44)) {
            if ($chr(33) isin $gettok($creep.file(05),%num,44)) && ($chr(64) isin $gettok($creep.file(05),%num,44)) { set -u0 %crl.hwl $addtok(%crl.hwl,$gettok($creep.file(05),$num,44),44) }
            else { set -u0 %crl.uwl $addtok(%crl.uwl,$gettok($creep.file(05),$num,44),44) }
            inc %num
          }
          if ($creep.file(06)) { set -u0 %crl.nwl $creep.file(06) }
          ;if ($creep.file(kickmsg) != You are not welcome here!) { set -u0 %crl.opt on,on,on,on,on,ban,2, $+ $remove($creep.file(kickmsg),$chr(44)) }
          set -u0 %crl.opt on,on,on,on,on,ban,2,You are not welcome here!
          remini PG5K.ini PG5K    
        }      
      }
    }
  }
  if (%crl.opt) { writeini PG5K.ini PG5K 01 %crl.opt }
  elseif (!%crl.opt) { writeini PG5K.ini PG5K 01 on,on,on,on,on,ban,2,You are not welcome here! }
  if (%crl.ubl) { writeini PG5K.ini PG5K 02 %crl.ubl }
  if (%crl.ibl) { writeini PG5K.ini PG5K 03 %crl.ibl }
  if (%crl.cwl) { writeini PG5K.ini PG5K 06 %crl.cwl }
  if (%crl.uwl) { writeini PG5K.ini PG5K 07 %crl.uwl }
  if (%crl.hwl) { writeini PG5K.ini PG5K 08 %crl.hwl }
  echo -a * IRC Guard 5000 V5 has finished loading. Use /creep to access the main menu, you can also use /creep help for help, or you can select it from the popup menus throughout mIRC.
}
on *:START: { 
  if ($creep(enable) == on) { PG5K_Update GET }
}
alias creep {
  if (!$1) && (!$dialog(creep)) { dialog -m creep creep }
  if ($1 == enable) {
    if ($isid == $true) { return $gettok($creep.file(01),1,44) }
    else { writeini PG5K.ini PG5K 01 $puttok($creep.file(01),$2,1,44) }
  }
  if ($1 == update) {
    if ($isid == $true) { return $gettok($creep.file(01),2,44) }
    else { writeini PG5K.ini PG5K 01 $puttok($creep.file(01),$2,2,44) }
  }
  if ($1 == scan1) {
    if ($isid == $true) { return $gettok($creep.file(01),3,44) }
    else { writeini PG5K.ini PG5K 01 $puttok($creep.file(01),$2,3,44) }
  }
  if ($1 == scan2) {
    if ($isid == $true) { return $gettok($creep.file(01),4,44) }
    else { writeini PG5K.ini PG5K 01 $puttok($creep.file(01),$2,4,44) }
  }
  if ($1 == scan3) {
    if ($isid == $true) { return $gettok($creep.file(01),5,44) }
    else { writeini PG5K.ini PG5K 01 $puttok($creep.file(01),$2,5,44) }
  }
  if ($1 == action) {
    if ($isid == $true) { return $gettok($creep.file(01),6,44) }
    else { writeini PG5K.ini PG5K 01 $puttok($creep.file(01),$2,6,44) }
  }
  if ($1 == bantype) {
    if ($isid == $true) { return $gettok($creep.file(01),7,44) }
    else { writeini PG5K.ini PG5K 01 $puttok($creep.file(01),$2,7,44) }
  }
  if ($1 == kickmsg) {
    if ($isid == $true) { return $gettok($creep.file(01),8,44) }
    else { writeini PG5K.ini PG5K 01 $puttok($creep.file(01),$2-,8,44) }
  }
  if ($1 == add) { writeini PG5K.ini PG5K $2 $addtok($creep.file($2),$3-,44) }
  if ($1 == del) {
    if ($creep.file($2) == $3-) { remini PG5K.ini PG5K $2 }
    else { writeini PG5K.ini PG5K $2 $remtok($creep.file($2),$3-,1,44) }
  }
  if ($1 == help) { run http://CodersElite.site90.net/PG5KHelp.htm }
  if ($1 == cmsg1) { return 4/!\ CREEP ALERT /!\ $gettok($creep.file(01),8,44) }
  if ($1 == cmsg2) { return 4/!\ CREEP ALERT /!\ You have been added to my black list creep! }
}
alias creep.file { return $readini(PG5K.ini,PG5K,$1) }
alias IsListed { return $istok($creep.file($1),$2,44) }
alias IsListed_WC {
  set -u0 %CRP_WC 1
  while (%CRP_WC <= $numtok($creep.file(05),44)) {
    if ($remove($gettok($creep.file(05),%CRP_WC,44),$chr(42)) isin $1) { return $true }
    inc %CRP_WC
  }
  return $false
}
alias C_LMngr {
  if ($1 == gui_bl) && (!$dialog(C_LMngr)) { dialog -mo C_LMngr C_LMngr }
  if ($1 == gui_wl) && (!$dialog(C_LMngr_)) { dialog -mo C_LMngr_ C_LMngr_ }
  ;/C_LMngr add -iuihwcUHnd <info>
  if ($1 == add) {
    if ($2 === -u) { %CLM_ = user name,02,07,0 | goto parse }
    if ($2 === -i) { %CLM_ = ident,03,00,0 | goto parse }
    if ($2 === -h) { %CLM_ = host mask,04,08,0 | goto parse }
    if ($2 === -w) { %CLM_ = wildcard,05,00,0 | goto parse }
    if ($2 === -c) { %CLM_ = channel,06,00,1 | goto parse }
    if ($2 === -U) { %CLM_ = user name,07,02,1 | goto parse }
    if ($2 === -H) { %CLM_ = host mask,08,04,1 | goto parse }
    if ($2 === -n) { %CLM_ = network,09,00,1 | goto parse }
    if ($2 === -d) { ;add to update list }
    else { goto end }
    :parse 
    %CLM_p = $gettok(%CLM_,1,44)
    %CLM_al = $gettok(%CLM_,2,44)
    %CLM_ol = $gettok(%CLM_,3,44)
    %CLM_c = $gettok(%CLM_,4,44)
    if ($IsListed(%CLM_al,$3-) == $true) { 
      if (%CLM_c == 0) { set -u0 %CRP_DUMP $input(The %CLM_p ' $+ $3- $+ ' is already listed in the black list.,oh,IRC Guard 5000) | goto end }
      elseif (%CLM_c == 1) { set -u0 %CRP_DUMP $input(The %CLM_p ' $+ $3- $+ ' is already listed in the white list.,oh IRC Guard 5000) | goto end }
    }
    if (%CLM_ol != 00) && ($IsListed(%CLM_ol,$3-) == $true) {
      if (%CLM_c == 0) { set -u0 %CRP_DUMP $input(The %CLM_p ' $+ $3- $+ ' is white listed and cannot be added to the black list.,oh,IRC Guard 5000) | goto end }
      elseif (%CLM_c == 1) { set -u0 %CRP_DUMP $input(The %CLM_p ' $+ $3- $+ ' is black listed and caoont be added to the white list.,oh,IRC Guard 5000) | goto end }
    }
    else {
      creep add %CLM_al $3-
      if ($dialog(creep)) { did -a creep $iif(%CLM_c = 0,2,30) $3- }
      else { 
        if (%CLM_c == 0) { echo -a  $+ $color(info) $+ * $3- added to the black list. }
        elseif (%CLM_c == 1) { echo -a  $+ $color(info) $+ * $3- added to the white list. }
      }
      if (%CLM_p == user name) {
        set -u0 %CRP_Sca 1
        while (%CRP_Sca <= $chan(0)) {
          if ($3 ison $chan(%CRP_Sca)) && ($me isop $chan(%CRP_Sca)) { CR_J $3 $chan(%CRP_Sca) }
          inc %CRP_Sca
        }
      }        
      goto end
    }
  }
  if ($1 == del) {
    %CLM_r = 2
    while (%CLM_r <= 9) {
      if ($IsListed(0 $+ %CLM_r,$2-) == $true) { creep del 0 $+ %CLM_r $2- }
      else { inc %CLM_r }
    }
  }
  if ($1 == clear) {
    if ($2 == bl) { 
      did -r creep 2
      set -u0 %CRP_bln 2
      while (%CRP_bln <= 5) {
        remini PG5K.ini PG5K 0 $+ %CRP_bln
        inc %CRP_bln
      }
    }
    elseif ($2 == wl) {
      did -r creep 30
      set -u0 %CRP_wln 6
      while (%CRP_wln <= 9) {
        remini PG5K.ini PG5K 0 $+ %CRP_wln
        inc %CRP_wln
      }
    }
  }
  if ($1 == load) {
    set -u0 %CLM_l 2
    while (%CLM_l <= 9) {
      if (%CLM_l <= 5) { %CLM_id = 2 }
      elseif (%CLM_l > 5) { %CLM_id = 30 }
      if ($creep.file(0 $+ %CLM_l)) { didtok creep %CLM_id 44 $creep.file(0 $+ %CLM_l) }
      inc %CLM_l
    }
    goto end
  }
  :end
  unset %CLM_*
}
alias CR_J {
  if ($IsListed(06,$2) == $true) || ($IsListed(07,$1) == $true) || ($IsListed(09,$network) == $true) { goto end }
  set -u0 %CR_Jwl 0
  while (%CR_Jwl <= 9) {
    if ($IsListed(08,$address($1,%CR_Jwl)) == $true) { goto end }
    inc %CR_Jwl
  }
  if ($creep(scan1) == on) {
    if ($IsListed(03,$gettok($gettok($address($1,5),2,33),1,64)) == $true) {
      if ($IsListed(02,$1) == $false) { creep add 02 $1 }
      goto User_Check
    }
    elseif ($IsListed(03,$gettok($gettok($address($1,5),2,33),1,64)) == $false) {
      if ($IsListed(02,$1) == $true) { creep add 03 $gettok($gettok($address($1,5),2,33),1,64) }
      goto User_Check
    }
  }
  :User_Check
  if ($IsListed(02,$1) == $true) { goto User_Run }
  if ($IsListed_WC($address($1,5)) == $true) { goto User_Run }
  set -u0 %CR_N 0
  while (%CR_N <= 9) {
    if ($IsListed(04,$address($1,%CR_N)) == $true) { goto User_Run }
    inc %CR_N
  }
  goto end
  :User_Run
  if ($creep(action) == ban) { CR_K $creep(bantype) $2 $1 }
  else { CR_K 11 $2 $1 }
  :end
}
alias CR_K {
  if ($1 <= 9) {
    mode $2 +b $address($3,$1)
    goto kick
  }
  if ($1 == 10) {
    mode $2 +b $3 $+ !*@*
    goto kick
  }
  if ($1 == 11) { goto kick }
  :kick
  .timerCRP $+ $rand(1,99999) -m 1 $rand(800,1600) kick $2 $3 $creep(cmsg1)
}
;Auto Update
alias PG5K_Update { 
  if ($1 == GET) {
    sockclose PG5K
    sockopen PG5K coderselite.site90.net 80
  }
  if ($1 == Run) {
    if ($IsListed(10,$2) == $true) { set -u0 %CRP_DUMP $input(You already have this list update.,oh,IRC Guard 5000) }
    else { 
    set -u0 %CRP_DUMP $input(Are you sure you want to acquire the ' $+ $2 $+ ' list update?,yw,IRC Guard 5000) }
    if (%CRP_DUMP == $true) {
      did -r PG5K_U 5
      did -a PG5K_U 5 UPDATING PLEASE WAIT
      ;UGH >.< Below Necessary for faster processing through large lists.
      if ($gettok($gettok(% [ $+ [ $2 ] ],3,164),2,61) != none) { AL_U 02 $gettok($gettok(% [ $+ [ $2 ] ],3,164),2,61) }
      if ($gettok($gettok(% [ $+ [ $2 ] ],4,164),2,61) != none) { AL_U 03 $gettok($gettok(% [ $+ [ $2 ] ],4,164),2,61) }
      if ($gettok($gettok(% [ $+ [ $2 ] ],5,164),2,61) != none) { AL_U 04 $gettok($gettok(% [ $+ [ $2 ] ],5,164),2,61) }
      if ($gettok($gettok(% [ $+ [ $2 ] ],6,164),2,61) != none) { AL_U 05 $gettok($gettok(% [ $+ [ $2 ] ],6,164),2,61) }
      if ($gettok($gettok(% [ $+ [ $2 ] ],7,164),2,61) != none) { AL_U 06 $gettok($gettok(% [ $+ [ $2 ] ],7,164),2,61) }
      if ($gettok($gettok(% [ $+ [ $2 ] ],8,164),2,61) != none) { AL_U 07 $gettok($gettok(% [ $+ [ $2 ] ],8,164),2,61) }
      if ($gettok($gettok(% [ $+ [ $2 ] ],9,164),2,61) != none) { AL_U 08 $gettok($gettok(% [ $+ [ $2 ] ],9,164),2,61) }
      if ($gettok($gettok(% [ $+ [ $2 ] ],10,164),2,61) != none) { AL_U 09 $gettok($gettok(% [ $+ [ $2 ] ],10,164),2,61) }
      creep add 10 $remove($gettok(% [ $+ [ $2 ] ],1,164) - $gettok(% [ $+ [ $2 ] ],2,164),$chr(44))
      did -r PG5K_U 5
      did -a PG5K_U 5 Update complete :)
      set -u0 %CRP_DUMP $input(List update ' $+ $2 $+ ' complete.,o,IRC Guard 5000)
      did -r PG5K_U 6
      didtok PG5K_U 6 44 $creep.file(10)
      did -r PG5K_U 5
      did -a PG5K_U 5 My updates
    }
  }
}
alias AL_U {
  set -u0 %AL_U 1
  while (%AL_U <= $numtok($2-,44)) {
    if ($IsListed($1,$gettok($2-,%AL_U,44)) == $true) { goto inc }
    else { 
      creep add $1 $gettok($2-,%AL_U,44)
      if ($dialog(creep)) {
        if ($remove($1,0) <= 5) { did -a creep 2 $gettok($2-,%AL_U,44) }
        elseif ($remove($1,0) >= 6) { did -a creep 30 $gettok($2-,%AL_U,44) }
      }
    }
    :inc
    inc %AL_U
  }
} 
on *:SOCKOPEN:PG5K: {
  sockwrite -n $sockname GET /PG5KProtocol_II.htm HTTP/1.1
  sockwrite -n $sockname Host: coderselite.site90.net
  sockwrite -n $sockname Connection: Close
  sockwrite -n $sockname Content-Type: text/html
  sockwrite -n $sockname $crlf
}
on *:SOCKREAD:PG5K: {
  sockread %PG5K_Ur
  if (%PG5K_Ur == <br>) { noop }
  if ($gettok(%PG5K_Ur,1,62) == PACKAGES) { %PG5K_UP = $gettok(%PG5K_Ur,2,62) }
  if (%PG5K_UP) && ($chr(164) isin %PG5K_Ur) {
    %PG5K_UT = $gettok(%PG5K_Ur,1,62)
    % [ $+ [ %PG5K_UT ] ] = $gettok(%PG5K_Ur,2,62)
  }
  if (%PG5K_Ur == CONTENT>END) { 
    sockclose PG5K
    if (!$dialog(PG5K_U)) { dialog -m PG5K_U PG5K_U }
    else {
      did -r PG5K_U 1,2,6
      did -a PG5K_U 1 There are $numtok(%PG5K_UP,44) updates
      didtok PG5K_U 2 44 %PG5K_UP
      if ($creep.file(10)) { didtok PG5K_U 6 44 $creep.file(10) }
      did -z PG5K_U 6
    }
  }
}
;placement
alias PG5K_U {
  if ($1 == x) {
    if ($dialog(creep)) { return $calc($dialog(creep).x - 306) }
    else { return -1 }
  }
  if ($1 == y) {
    if ($dialog(creep)) { return $dialog(creep).y }
    else { return -1 }
  }
}
dialog PG5K_U {
  size $PG5K_U(x) $PG5K_U(y) 300 300
  title IRC Guard 5000 - List Updates
  box ""1, 5 5 290 130
  list 2, 10 20 280 100
  button "Get Update"3, 10 107 80 23
  button "Get Info"4, 95 107 80 23
  box "My Updates"5, 5 140 290 130
  list 6, 10 155 280 100,sort,hsbar
  button "Remove"7, 10 242 80 23
  button "Help"8, 95 242 80 23
  button "Close"9, 110 274 80 23,ok
}
on *:DIALOG:PG5K_U:init:*: {
  did -a PG5K_U 1 There are $numtok(%PG5K_UP,44) updates
  didtok PG5K_U 2 44 %PG5K_UP
  if ($creep.file(10)) { didtok PG5K_U 6 44 $creep.file(10) }
  did -z PG5K_U 6
}
on *:DIALOG:PG5K_U:sclick:*: {
  if ($did == 3) { 
    if (!$did(2).sel) { set -u0 %CRP_DUMP $input(Please select the list update package you would like to acquire.,oh,IRC Guard 5000) }
    else { PG5K_Update Run $did(2).seltext }
  }
  if ($did == 4) { 
    if (!$did(2).sel) { set -u0 %CRP_DUMP $input(Please select the list update package you would like information about.,oh,IRC Guard 5000) }
    else { set -u0 %CRP_DUMP $input($gettok(% [ $+ [ $did(2).seltext ] ],2,164),oi,IRC Guard 5000 - $gettok(% [ $+ [ $did(2).seltext ] ],1,164)) }
  }
  if ($did == 7) {
    if (!$did(6).sel) { set -u0 %CRP_DUMP = $input(Please select the list update you would like to remove.,oh,IRC Guard 5000) }
    else { 
      set -u0 %CRP_DUMP $input(Are you sure you want to remove ' $+ $did(6).seltext $+ ' ?,yw,IRC Guard 5000)
      if (%CRP_DUMP == $true) {
        creep del 10 $did(6).seltext
        did -r PG5K_U 6
        if ($creep.file(10)) { didtok PG5K_U 6 44 $creep.file(10) }
      }
    }
  }
  if ($did == 8) { creep help }
}
dialog C_LMngr {
  size -1 -1 300 100
  title IRC Guard 5000 - Add to Black List
  box "Entry to add"1, 5 5 290 45
  edit ""2, 10 20 280 23
  radio "User name"3, 24 55 70 15
  radio "Host mask"4, 95 55 70 15
  radio "Ident"5, 165 55 45 15
  radio "Wildcard"6, 212 55 60 15
  button "Add"7, 25 75 80 23
  button "Close"8, 110 75 80 23,cancel
  button "Help"9, 195 75 80 23
}
on *:DIALOG:C_LMngr:init:*: {
  %C_LM = -u
  did -c C_LMngr 3
}
on *:DIALOG:C_LMngr:sclick:*: {
  if ($did == 3) { %C_LM = -u }
  if ($did == 4) { %C_LM = -h }
  if ($did == 5) { %C_LM = -i }
  if ($did == 6) { %C_LM = -w }
  if ($did == 7) { 
    if (!$did(2).text) {
      set -u0 %CRP_DUMP $input(Please enter what you would like to enter into the black list and select the appropriate category.,oh,IRC Guard 5000) 
      goto end
    }
    else {
      if (%C_LM == -u) {
        if ($chr(42) isin $did(2).text) || ($chr(33) isin $did(2).text) || ($chr(64) isin $did(2).text) {
          set -u0 %CRP_DUMP $input(' $+ $did(2).text $+ ' is not a valid user name.,oh,IRC Guard 5000)
          goto end
        }
        else { goto add }
      }
      elseif (%C_LM == -h) {
        if ($chr(33) !isin $did(2).text) || ($chr(64) !isin $did(2).text) {
          set -u0 %CRP_DUMP $input(' $+ $did(2).text $+ ' is not a valid host mask.,oh,IRC Guard 5000)
          goto end
        }
        else { goto add }
      }
      elseif (%C_LM == -i) {
        if ($chr(42) isin $did(2).text) || ($chr(33) isin $did(2).text) || ($chr(64) isin $did(2).text) {
          set -u0 %CRP_DUMP $input(' $+ $did(2).text $+ ' is not a valid ident.,oh,IRC Guard 5000)
          goto end
        }
        else { goto add }
      }
      elseif (%C_LM == -w) {
        if ($chr(42) !isin $did(2).text) || ($chr(33) isin $did(2).text) || ($chr(64) isin $did(2).text) {
          set -u0 %CRP_DUMP $input(' $+ $did(2).text $+ ' is not a valid wildcard.,oh,IRC Guard 5000)
          goto end
        }
        else { goto add }
      }
      :add
      C_LMngr add %C_LM $did(C_LMngr,2).text 
      dialog -x C_LMngr
      unset %C_LM
    }
  }
  :end
}
on *:DIALOG:C_LMngr:close:*: { unset %C_LM }
dialog C_LMngr_ {
  size -1 -1 300 100
  title IRC Guard 5000 - Add to White List
  box "Entry to add"1, 5 5 290 45
  edit ""2, 10 20 280 23
  radio "Channel"3, 17 55 58 15
  radio "User name"4, 78 55 68 15
  radio "Host mask"5, 148 55 71 15
  radio "Network"6, 218 55 60 15
  button "Add"7, 25 75 80 23
  button "Close"8, 110 75 80 23,cancel
  button "Help"9, 195 75 80 23
}
on *:DIALOG:C_LMngr_:init:*: {
  %CLM = -c
  did -c C_LMngr_ 3
}
on *:DIALOG:C_LMngr_:sclick:*: {
  if ($did == 3) { %CLM = -c }
  if ($did == 4) { %CLM = -U }
  if ($did == 5) { %CLM = -H }
  if ($did == 6) { %CLM = -n }
  if ($did == 7) {
    if (!$did(2).text) {
      set -u0 %CRP_DUMP $input(Please enter what you would like to enter into the white list and select the appropriate category.,oh,IRC Guard 5000)
      goto end
    }
    else {
      if (%CLM == -c) {
        if ($chr(35) !isin $did(2).text) {
          set -u0 %CRP_DUMP $input(' $+ $did(2).text $+ ' is not a valid channel.,oh,IRC Guard 5000)
          goto end
        }
        else { goto add }
      }
      if (%CLM == -U) {
        if ($chr(42) isin $did(2).text) || ($chr(33) isin $did(2).text) || ($chr(64) isin $did(2).text) {
          set -u0 %CRP_DUMP $input(' $+ $did(2).text $+ ' is not a valid user name.,oh,IRC Guard 5000)
          goto end
        }
        else { goto add }
      }
      if (%CLM == -H) {
        if ($chr(33) !isin $did(2).text) || ($chr(64) !isin $did(2).text) {
          set -u0 %CRP_DUMP $input(' $+ $did(2).text $+ ' is not a valid host mask.,oh,IRC Guard 5000)
          goto end
        }
        else { goto add }
      }
      if (%CLM == -n) {
        if ($chr(32) isin $did(2).text) {
          set -u0 %CRP_DUMP $input(' $+ $did(2).text $+ ' is not a valid network.,oh,IRC Guard 5000)
          goto end
        }
        else { goto add }
      }
      :add
      C_LMngr add %CLM $did(2).text
      dialog -x C_LMngr_
      unset %CLM
    }
  }
  :end
}
on *:DIALOG:C_LMngr_:close:*: { unset %CLM }
dialog creep {
  size -1 -1 300 311
  title IRC Guard 5000 [/creep]
  box "Black List"1, 5 5 290 275
  list 2, 10 20 280 240,sort
  button "Add"3, 25 251 80 23
  button "Remove"4, 110 251 80 23
  button "Clear"5, 195 251 80 23
  button "Help"6, 70 284 80 23
  button "Close"7, 155 284 80 23,ok
  check ":D"8, 270 289 25 18,push
  ;tabs
  tab "Options"9, 5 284 290 200
  tab "White List"10
  tab "About"11
  button "Help"12, 70 485 80 23
  button "Close"13, 155 485 80 23,cancel
  check ":D"14, 270 490 25 18,push
  ;tab 9 "Options"
  check "Enable black list"15, 10 310 93 15,tab9
  box "List Update"16, 10 325 145 45,tab9
  check "Enable"17, 15 343 50 15,tab9
  button "Check updates"18, 70 341 80 20,tab9
  box "User Scan5K"19, 10 370 145 65,tab9
  check "Scan user ident"20, 15 385 91 15,tab9
  check "Scan nick changes"21, 15 400 105 15,tab9
  check "Scan channel on join"22, 15 415 115 15,tab9
  box "Action"23, 160 310 130 50,tab9
  radio "Kick user"24, 165 325 60 15,tab9
  radio "Kick/ban user"25, 165 340 83 15,tab9
  box "Ban Type"26, 160 360 130 45,tab9
  combo 27, 165 375 120 150,drop,tab9
  box "Kick Message"28, 10 435 280 42,tab9
  edit ""29, 15 449 270 23,tab9
  ;tab 10 "white list"
  list 30, 10 315 280 145,sort,tab10
  button "Add"31, 25 445 80 23,tab10
  button "Remove"32, 110 445 80 23,tab10
  button "Clear"33, 195 445 80 23,tab10
  ;tab 11 "about"
  text "IRC Guard 5000"34, 98 345 80 15,tab11
  text "Version: 5.0.0 V5"35, 96 385 100 15,tab11
  text "By: Neo Nemesis"36, 98 400 80 15,tab11
  link "http://CodersElite.site90.net"37, 75 420 150 15,tab11
}
on *:DIALOG:creep:init:*: { 
  did -h creep 9
  C_LMngr load
  did -a creep 27 0: *!user@host
  did -a creep 27 1: *!*user@host
  did -a creep 27 2: *!*@host
  did -a creep 27 3: *!*user@*.host
  did -a creep 27 4: *!*@*.host
  did -a creep 27 5: nick!user@host
  did -a creep 27 6: nick!*user@host
  did -a creep 27 7: nick!*@host
  did -a creep 27 8: nick!*user@*.host
  did -a creep 27 9: nick!*@*.host
  did -a creep 27 10: nick!*@*
  if ($creep(enable) == on) { did -c creep 15 }
  if ($creep(update) == on) { 
    did -c creep 17 
    PG5K_Update GET
  }
  if ($creep(scan1) == on) { did -c creep 20 }
  if ($creep(scan2) == on) { did -c creep 21 }
  if ($creep(scan3) == on) { did -c creep 22 }
  if ($creep(action) == kick) { did -c creep 24 }
  elseif ($creep(action) == ban) { did -c creep 25 }
  did -c creep 27 $calc($creep(bantype) + 1)
  did -a creep 29 $creep(kickmsg)
}
on *:DIALOG:creep:sclick:*: {
  if ($did == 3) { C_LMngr gui_bl }
  if ($did == 4) { 
    if (!$did(2).sel) { set -u0 %CRP_DUMP $input(Please select a entry from the black list you would like to remove.,oh,IRC Guard 5000) }
    else {
    set -u0 %CRP_DUMP $input(Are you sure you want to remove ' $+ $did(2).seltext $+ ' from the black list?,yw,IRC Guard 5000) }
    if (%CRP_DUMP == $true) {
      C_LMngr del $did(2).seltext 
      did -r creep 2,30
      C_LMngr load
    }
  }
  if ($did == 5) {
    set -u0 %CRP_DUMP $input(Are you sure you want to clear all entries from the black list?,yw,IRC Guard 5000)
    if (%CRP_DUMP == $true) { C_LMngr clear bl }  
  }
  if ($did == 6) { creep help }
  if ($did == 8) {
    dialog -s creep $dialog(creep).x $dialog(creep).y 300 510
    did -h creep 6,7,8
    did -v creep 9,12,13,14
    did -c creep 14
  }
  if ($did == 12) { creep help }
  if ($did == 14) {
    dialog -s creep $dialog(creep).x $dialog(creep).y 300 311
    did -h creep 9,12,13,14
    did -v creep 6,7,8
    did -u creep 8
  }
  if ($did == 15) { 
    if ($did(15).state == 1) { creep enable on }
    else { creep enable off }
  }
  if ($did == 17) {
    if ($did(17).state == 1) { creep update on }
    else { creep update off }
  }
  if ($did == 18) { PG5K_Update GET }
  if ($did == 20) {
    if ($did(20).state == 1) { creep scan1 on }
    else { creep scan1 off }
  }
  if ($did == 21) {
    if ($did(21).state == 1) { creep scan2 on }
    else { creep scan2 off }
  }
  if ($did == 22) {
    if ($did(22).state == 1) { creep scan3 on }
    else { creep scan3 off }
  }
  if ($did == 24) { creep action kick }
  if ($did == 25) { creep action ban }
  if ($did == 27) { creep bantype $calc($did(27).sel - 1) }
  if ($did == 31) { C_LMngr gui_wl }
  if ($did == 32) {
    if (!$did(30).sel) { set -u0 %CRP_DUMP $input(Please select the entry from the white list you wish to remove.,oh,IRC Guard 5000) }
    else {
      set -u0 %CRP_DUMP $input(Are you sure you want to remove ' $+ $did(30).seltext $+ ' from the white list?,yw,IRC Guard 5000)
      if (%CRP_DUMP == $true) { 
        C_LMngr del $did(30).seltext 
        did -r creep 2,30
        C_LMngr load
      }
    }
  }
  if ($did == 33) {
    set -u0 %CRP_DUMP $input(Are you sure you want to clear all entries from the white list?,yw,IRC Guard 5000)
    if (%CRP_DUMP == $true) { C_LMngr clear wl }
  }
  if ($did == 37) { run http://CodersElite.site90.net }
}
on *:DIALOG:creep:edit:29: { 
  if ($did(29).text) { creep kickmsg $did(29).text }
  else { creep kickmsg You are not welcome here! }
}
on *:DIALOG:creep:close:*: {
  if ($dialog(C_LMngr)) { dialog -x C_LMngr }
  if ($dialog(C_LMngr_)) { dialog -x C_LMngr }
  if ($dialog(PG5K_U)) { dialog -x PG5K_U }
}
;checking system
;check for black listed users when they join
on @*:JOIN:#: {
  if ($nick == $me) { goto end }
  if ($creep(enable)) { CR_J $nick $chan }
  :end
}
;check for black listed users in channel when you join (after being opped)
on *:OP:#: {
  if ($creep(scan3) == on) { 
    %CR_Sc = $true
    who $chan 
  }
}
;check for black listed users on nick change
on *:NICK: {
  if ($creep(scan2) == on) {
    set -u0 %CR_nc 1
    while (%CR_nc <= $chan(0)) {
      if ($me isop $chan(%CR_nc)) && ($newnick ison $chan(%CR_nc)) { CR_J $newnick $chan(%CR_nc) }
      inc %CR_nc
    }
  }
}
;scanning on join
raw 352:*: { 
  if (%CR_Sc == $true) { 
    CR_J $6 $2 
    halt
  }
}
raw 315:*: { 
  if (%CR_Sc == $true) { 
    unset %CR_Sc
    halt 
  }
}
;popup menus - thanks to Jethro_
menu query,nicklist,channel,status,menubar {
  $iif($menu == nicklist,IRC Guard 5000)
  .Main Menu:/creep
  .List Update Manager:/PG5K_Update GET
  .-
  .Add User
  ..Black List
  ...Nickname:/C_LMngr add -u $1
  ...Ident:C_LMngr add -i $gettok($gettok($address($1,5),2,33),1,64)
  ...Hostmask
  ....0 *!user@host:/C_LMngr add -h $address($1,0)
  ....1 *!*user@host:/C_LMngr add -h $address($1,1)
  ....2 *!*@host:/C_LMngr add -h $address($1,2)
  ....3 *!*user@*.host:/C_LMngr add -h $address($1,3)
  ....4 *!*@*.host:/C_LMngr add -h $address($1,4)
  ....5 nick!user@host:/C_LMngr add -h $address($1,5)
  ....6 nick!*user@host:/C_LMngr add -h $address($1,6)
  ....7 nick!*@host:/C_LMngr add -h $address($1,7)
  ....8 nick!*user@*.host:/C_LMngr add -h $address($1,8)
  ....9 nick!*@*.host:/C_LMngr add -h $address($1,9)
  ..White List
  ...Nickname:/C_Mngr add -U $1
  ...Hostmask
  ....0 *!user@host:/C_LMngr add -H $address($1,0)
  ....1 *!*user@host:/C_LMngr add -H $address($1,1)
  ....2 *!*@host:/C_LMngr add -H $address($1,2)
  ....3 *!*user@*.host:/C_LMngr add -H $address($1,3)
  ....4 *!*@*.host:/C_LMngr add -H $address($1,4)
  ....5 nick!user@host:/C_LMngr add -H $address($1,5)
  ....6 nick!*user@host:/C_LMngr add -H $address($1,6)
  ....7 nick!*@host:/C_LMngr add -H $address($1,7)
  ....8 nick!*user@*.host:/C_LMngr add -H $address($1,8)
  ....9 nick!*@*.host:/C_LMngr add -H $address($1,9)
  $iif($menu == query,IRC Guard 5000)
  .Main Menu:/creep
  .List Update Manager:/PG5K_Update GET
  .-
  .Add User
  ..Black List
  ...Nickname:/C_LMngr add -u $1
  ...Ident:C_LMngr add -i $gettok($gettok($address($1,5),2,33),1,64)
  ...Hostmask
  ....0 *!user@host:/C_LMngr add -h $address($1,0)
  ....1 *!*user@host:/C_LMngr add -h $address($1,1)
  ....2 *!*@host:/C_LMngr add -h $address($1,2)
  ....3 *!*user@*.host:/C_LMngr add -h $address($1,3)
  ....4 *!*@*.host:/C_LMngr add -h $address($1,4)
  ....5 nick!user@host:/C_LMngr add -h $address($1,5)
  ....6 nick!*user@host:/C_LMngr add -h $address($1,6)
  ....7 nick!*@host:/C_LMngr add -h $address($1,7)
  ....8 nick!*user@*.host:/C_LMngr add -h $address($1,8)
  ....9 nick!*@*.host:/C_LMngr add -h $address($1,9)
  ..White List
  ...Nickname:/C_Mngr add -U $1
  ...Hostmask
  ....0 *!user@host:/C_LMngr add -H $address($1,0)
  ....1 *!*user@host:/C_LMngr add -H $address($1,1)
  ....2 *!*@host:/C_LMngr add -H $address($1,2)
  ....3 *!*user@*.host:/C_LMngr add -H $address($1,3)
  ....4 *!*@*.host:/C_LMngr add -H $address($1,4)
  ....5 nick!user@host:/C_LMngr add -H $address($1,5)
  ....6 nick!*user@host:/C_LMngr add -H $address($1,6)
  ....7 nick!*@host:/C_LMngr add -H $address($1,7)
  ....8 nick!*user@*.host:/C_LMngr add -H $address($1,8)
  ....9 nick!*@*.host:/C_LMngr add -H $address($1,9)
  $iif($menu == channel,IRC Guard 5000)
  .Main Menu:/creep
  .List Update Manager:/PG5K_Update GET
  .Whitelist Channel
  ..Add:/C_LMngr add -c $chan
  ..Remove:/C_LMngr del $chan
  $iif($menu == status,IRC Guard 5000)
  .Main Menu:/creep
  .List Update Manager:/PG5K_Update GET
  .-
  .Whitelist Network ( $+ $network $+ )
  ..Add:/C_LMngr add -n $network
  ..Remove:/C_LMngr del $network
  .Whitelist Server ( $+ $server $+ )
  ..Add:/C_LMngr add -n $server
  ..Remove:/C_LMngr del $server
  $iif($menu == menubar,IRC Guard 5000)
  .Main Menu:/creep
  .List Update Manager:/PG5K_Update GET
  .-
  .Whitelist Network ( $+ $network $+ )
  ..Add:/C_LMngr add -n $network
  ..Remove:/C_LMngr del $network
  .Whitelist Server ( $+ $server $+ )
  ..Add:/C_LMngr add -n $server
  ..Remove:/C_LMngr del $server
}

Comments

Sign in to comment.
N3M3S1S   -  Oct 14, 2012

Thank you for pointing that out, If I remember correctly it should be

if (!%PG5K_Ur) { noop }

But that section of the code isn't used anymore since my website is no longer operational.

In time I will release a new version.

 Respond  
Anon_Lewy   -  Sep 02, 2012

" if (%PG5K_Ur == ) { noop } "
I get /if: Invalid Format on Line 289 which is the Line above

 Respond  
N3M3S1S   -  May 04, 2011

Thank you!

 Respond  
irchainscriptz   -  May 02, 2011

Havent had the chance to test but will this weekend N3M3S1S

 Respond  
N3M3S1S   -  Apr 28, 2011

Help file is nearing completion, trying to make it is informative and helpful as possible.

I'm guess since there hasn't been any comments, V5 is workng alright for you guys? I've found a few areas that need to be tweaked in the code, but that will be taken care of.

 Respond  
N3M3S1S   -  Apr 24, 2011

Will be starting on the help file shortly...

 Respond  
N3M3S1S   -  Apr 24, 2011

:)

 Respond  
gasak   -  Apr 23, 2011

wowww.. finally!! ready to test!! ;)

 Respond  
N3M3S1S   -  Apr 23, 2011

LADIES AND GENTLEMEN I GIVE YOU V5

BETTER

FASTER

STRONGER.

Please let me know of any bugs and I will fix them :D V4 is available on http://CodersElite.site90.net

 Respond  
N3M3S1S   -  Apr 22, 2011

V5 Update

Delays! I am sorry. I have had some time to do some work to the script tonight, and the rest of this weekend so we will see where it goes.

What I am doing:

Running the script and checking for and fixing bugs.
Adding one or two new options

May possibly revise the scanning, it works but is really buggy...

 Respond  
N3M3S1S   -  Apr 19, 2011

Alrite guys sorry for the delays! The script IS ALMOST DONE. I've just been busy with work :( I have a day off up coming up, but not until the end of the week :\

 Respond  
N3M3S1S   -  Apr 17, 2011

Okay, so we have 32 hours for release!

 Respond  
JoKabua   -  Apr 17, 2011

Cool

 Respond  
N3M3S1S   -  Apr 16, 2011

V5 will be released within the next 48 hours :D

 Respond  
N3M3S1S   -  Apr 13, 2011

:( still not done, keep having complications. Will keep you posted. Sorry its taking so long folks!

 Respond  
N3M3S1S   -  Apr 12, 2011

Okay thank you everyone for your patience. Today is my day off so I will work on V5 and hopefully finish it by tonight :)

 Respond  
gasak   -  Apr 10, 2011

Just take your time N3M3S1S.. We are keep patient here :)

 Respond  
N3M3S1S   -  Apr 10, 2011

V5 Update

Coming along, almost done. Sorry for the delay been working over time at work haven't had time to mess with the script x.x

V5 Is promised to be released by sometime before the end of the week. (April 17)

 Respond  
Callumlord   -  Apr 09, 2011

GRR I get that many nofs of here :P

 Respond  
N3M3S1S   -  Apr 07, 2011

Website is back up. :)

V5 will be released soon!

 Respond  
N3M3S1S   -  Apr 06, 2011

Dodge

Works fine. I had to remove a few nicks lol O.o_HEARTS_o.O comes through sometimes.
Works Great. Cause it saved my ass once Ima give it an 8
Big like.

Thank you Dodge.

The names that come in the list are names used by known internet predators. Removing them is your choice but it is recommnded that you leave them.

Also, looked into the wbesite problem. This is what the 000webhost.com admins are saying:

000webhost.com Admins

Server #19 is down (we are working on it)
We apologize for any inconveniences, but Server #19 is down at the moment. Our admin team is currently checking what is the problem. We will post an update if this problem cannot be fixed in next 2 hours.

Please do not submit and tickets about this issue and do not increase our work load as we are fully dedicated in resolving this server problem. We thank you for your patience and understanding.

NOTE: the update feature on V4 will not work and cause an error with the website being down (since the socket cannot establish a connection to the CodersElite website. The problem is being fixed via the 000webhost.com admins. Also the help file and other items are also not available until "server 19" is fixed. If problem persists more than 24 hours, I may temporarily move the information over to the old mIRC DeluXe website for temporary keeping.

 Respond  
Dodge   -  Apr 06, 2011

Works fine. I had to remove a few nicks lol O.o_HEARTS_o.O comes through sometimes.
Works Great. Cause it saved my ass once Ima give it an 8
Big like.

 Respond  
irchainscriptz   -  Apr 06, 2011

yeah notice that today went on and it was hanging, but the wait is worth it.

 Respond  
N3M3S1S   -  Apr 06, 2011

:\ CodersElite website is down. Apparently one of the servers is being repaired.

Update system almost finished. On load is nearly done just have to do the help file... Slight delay since the website is down.

 Respond  
Callumlord   -  Apr 05, 2011

:) :) :)

 Respond  
N3M3S1S   -  Apr 05, 2011

Thanks to everyone who has commented and given me feed back on the script. All of you have helped create this in some way.

V5 - Better, faster, stronger.

 Respond  
Callumlord   -  Apr 05, 2011

Keep up the good work!! :)

 Respond  
JoKabua   -  Apr 05, 2011

nvm bro its working

 Respond  
N3M3S1S   -  Apr 04, 2011

Jethro_

You do know that the on load event would only be activated if a remote file was loaded manually? It won't be activated as that of "run initialization commands" automatically. If a user just copies and pastes the script into their remote without loading, it does nothing. Cross your fingers that they follow the step-by-step instruction as required. :P

Yes I do know, that is what I have included instructions, if people cannot read then I don't know what to tell them...

JoKabua

Ok i have a problems why only one channel trigger.. I mean when i test it it kick me from only one channel not other and Yes i add more then one channels on the white list..

I don't quite understand... I will look into it, since V5 is a recode, the problem should be eliminated. This script only works in channels that you have OP.

 Respond  
JoKabua   -  Apr 04, 2011

Ok i have a problems why only one channel trigger.. I mean when i test it it kick me from only one channel not other and Yes i add more then one channels on the white list..

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.