; This file is a script for an IRC client such as mIRC
; When the DDE Link is Enabled, PortICE can search for intruders in IRC
;
; Load or Copy this file to your IRC client Aliases section, and Enable the DDE Link
; ----------------------------------------------------------------------------------
; 
; Edited By AAMA Software. For PortICE Product
;




/PortICE {
  set %AttackIP $1
  set %AttackPort $2
  set %Check 0
  
  set %Attacker *!*@ $+ %AttackIP
  echo 15 -a 14[PortICE] 15 Attack From:14 %AttackIP 15on Port:14 %AttackPort 
  scannukeip
}

/scannukeip {
    set %i 1
    set %n 1
    set %AttackChannel $chan(0)
    set %w 1  
    echo 15 -a 14[PortICE] 15 Searching for IP14 %Attacker 

    :ReCheckChannels
    set %AttackChannels $chan(%n)
    set %i 1
    if (%n > %AttackChannel) { goto Quits }
    echo 15 -a 14[PortICE] 15  Searching in14 %AttackChannels 
    :ReCheckNick
    set %w 1
    if ($nick(%AttackChannels,%i) == $null) {
      inc %n 1
      goto ReCheckChannels
    }
    :ReCheckAttack
    if ($ial(%Attacker,%w).nick == $nick(%AttackChannels,%i)) {
      echo 15 -a 14[PortICE] 15 Found:14 $ial(%Attacker,%w).nick15 on14 %AttackChannels
      set %Check 1
      }
    
    if ($ial(%Attacker,%w).nick == $null) { goto ReCheckNicks }
    inc %w
    goto ReCheckAttack
    :ReCheckNicks
    inc %i
    goto ReCheckNick
    :Quits

    if %Check == 0 {
      echo 15 -a 14[PortICE] 15 Attacker Not Found.
      }

    unset %Attacker
    unset %i
    unset %n
    unset %w
    unset %AttackChannels
    unset %AttackChannel
    unset %nukehost
    unset %AttackIP
    unset %AttackPort
    unset %nukeprot
    unset %Check

    halt
  }
