February 29, 2004

IRCop scanner

This snippet will show which users in a channel are IRCops, coloring their nick red in the nicklist and giving a list of them when you join a channel. (Frankly, I can't understand the "oh no IRCops are watching me" paranoia, but it was fun to script, so meh.) Snippet only works for channels with less than 40 users, to avoid you flooding yourself off doing a /who on really large channels. You can change that limit in the snippet itself. Goes in remotes (alt-R).

ON *:JOIN:#: {
  unset $+(%,ircops*,$chan)
  if ($nick == $me) {
    .timer 1 3 opercheck $chan
  }
  else {
    who $nick
    set $+(%,ircopscheck.,$chan) 1
    set %justanick 1
  }
}


alias -l opercheck { if ($nick($1,0) > 40) { echo $color(info2) -t $1 * IRCop scanning halted - too many users in $1 } else { who $1 set $+(%,ircopscheck.,$1) $1 } }

raw 352:*: { if ($($+(%,ircopscheck.,$2),2) != $null) { .haltdef if (* isin $7) { if (%justanick) { var %x = $comchan($6,0) while (%x) { cline 4 $comchan($6,%x) $nick($comchan($6,%x),$6) dec %x } } else { set $+(%,ircops.,$2) $($+(%,ircops.,$2),2) $6 cline 4 $2 $nick($2,$6) } } } }

raw 315:*: { if ($($+(%,ircopscheck.,$2),2) != $null) { .haltdef if ($($+(%,ircops.,$2),2) != $null) { echo $color(info2) -t $2 * IRCops in $2 $+ : $($+(%,ircops.,$2),2) } unset $+(%,ircops*,$2) } elseif (%justanick) { .haltdef unset %justanick } }
Posted by sailoreagle at February 29, 2004 10:18 PM | Scripts
Comments

doesnt work

Posted by: ircop at June 4, 2004 05:52 PM

Works perfectly fine for me. *shrug* If you'd been decent enough to leave contact details, I would've asked further questions, but since you couldn't be bothered, sorry, you're on your own.

Posted by: sailoreagle at June 4, 2004 11:34 PM