Actually if should have been $me instead:
on *:SNOTICE:*whois on you*: {
if ($nick(#,$me,Wq&o)) && (!%x) {
set -u10 %x on
;the rest of code here
I myself don't use unrealircd or regular type of ircd networks, so if any discrepancy applies to my code, please correct me.
The above code shall work. Basically that if condition checks if the client running the code is with +W set, or the user is an owner, admin, and op.