Since you are ignoring them in query why not add them to the ignore list ( I would use $address($nick,2) instead of just $nick ) and then have it automatically close the query window.
Also for queries it is /ignore -p
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.