A simple and straightforward snippet that will scan for IRCops and echo the nickname and address of any that it finds to the active window. The scanning will be automatically performed when you join a channel and on anyone who subsequently joins a channel you are on, as well as whenever you receive a new private message. It may also be performed with the /scan TARGET command, where TARGET is a nickname or channel.
If I get enough feedback I will make it more configurable and featureful.
Note: Rapidly joining large channels may cause RecvQ floods.
alias Scan {
if ( $1 iswm #* ) echo $colour(info) -a * Scanning $1 for IRCops...
who $1
.enable #wreply
}
on me:*:JOIN:#: {
who $chan
set -u2 %in 1
.enable #wreply
}
on *:JOIN:#: {
if ( $nick != $me ) who $nick
set -u2 %in 1
.enable #wreply
}
on *:OPEN:?: {
who $nick
.enable #wreply
}
#wreply off
raw 352:*: {
if ( * isin $7 ) && ( $comchan($6,0) == $iif(%in,1,0) ) echo $colour(info) -a * $6 $+([,$3,@,$4,]) is an IRCop
haltdef
}
raw 315:*: {
.disable #wreply
haltdef
}
#wreply end