All pastes #486204 Raw Edit

Something

public text v1 · immutable
·published 2007-05-13 20:10 UTC
rendered paste body
/*
For use in #ThePC at the SwiftIRC network only
Made by Bounce @ irc.SwiftIRC.net

Usage: !Check #Channel
Users found on both channels will me messaged to #ThePc.staff
*/

on $*:Text:/^[.!]Check (.*)/Si:#ThePC,#ThePC.staff: {
  if ($nick !isop #) halt
  if ($me !ison #ThePC) || ($me !ison #TestBots) { msg #ThePC.staff Error: I am not on $v2 | halt }
  msg #ThePC.staff Checking for non IAL entries
  var %x = 1, %y = 0
  while (%x <= $nick(#Thepc,0)) {
    if (!$ial($nick(#Thepc,%x),0)) inc %y
    inc %x
  }
  if (%y = 0) msg #ThePC.staff All users on #ThePC were found on the IAL.
  else {
    msg #ThePC.staff Now retrieving hosts from non IAL entries, please run this scan again by typing !Check $2
    .who #ThePC
    halt
  }
  msg #ThePC.staff Storing users addressesses...
  remini ThePCaddresses.ini Users
  var %x = 1
  while (%x <= $nick(#thepc,0)) {
    if ($nick(#thepc,%x) == $me) noop
    else writeini ThePCaddresses.ini Users $address($nick(#thepc,%x),2) Yes
    inc %x
  }
  msg #ThePC.staff Successfully stored the addressesses of %x users
  part #Thepc
  join $2
  if ($me !ison $2) { join #ThePc,#ThePc.staff t3hk3y | msg #ThePc.staff Error: I cannot join $2 | halt }
  var %x = 1, %y = 0
  while (%x <= $nick($2,0)) {
    if ($nick(#thepc,%x) == $me) noop
    elseif ($readini(ThePCaddresses.ini,Users,$address($nick($2,%x),2)) == Yes) {
      inc %y
      set -e $+(%,ThePC.User,%x) $nick($2,%x)
    }
    inc %x
  }
  part $2
  set -e %ThePC.Users %y
  .timer 1 3 Continue.Scan $2
}
alias -l Continue.Scan {
  join #ThePC,#ThePC.staff t3hk3y
  msg #ThePC.staff $($+(%,ThePC.user,%x),2) users in #ThePC were also found in $1
  var %x = 1
  while (%x <= %ThePC.Users) {
    msg #ThePC.staff $c1($+(%x,:)) $c2($($+(%,ThePC.user,%x),2)) $c1(was found in) $c2($2) $c1(- Address:) $c2($address($($+(%,ThePC.user,%x),2),2))
    unset $+(%,ThePC.user,%x)
    inc %x
  }
  unset %ThePC.Users
}
alias -l c1 return $+($chr(3),14,$1-)
alias -l c2 return $+($chr(3),04,$1-)