alias cqignore {
!ignore $1-
;; get the important information
if ($left($1,1) == -) {
;; There are options present...
var %options = $1
var %address = $2
var %type = $3
}
else {
;; no options, so the first param is the nick or address
var %address = $1
var %type = $2
}
;; if we're not ignoring privmsgs, then we don't need to
;; test the queries
if (%options && p !isin %options) { return }
;; if type is present, re-evaluate the address to a mask
if (%type) {
%address = $address(%address, %type)
;; If we couldn't evaluate the address, bail out
if (!%address) { return }
}
;; search the queries for address matches
var %i = 1
while ($query(%i).address) {
;; If the address matches, close the query
if (%address iswm $+($ifmatch,!,$ifmatch)) {
close -m $query(%i)
}
inc %i
}
}