You're most certainly welcome, displayname. I'm glad that the code provided has worked to your standards and expectations.

Actually the $v1 identifier returns the matched bad nicknames, along with the asterisks. That is the reason why it wasn't working quite right as intended. And yes, it's a good idea that you disregard or delete it in favor of using the $newnick instead. Pardon me for not thinking correctly. :$

You may change the number 1 to 0 in the $hfind() since 1 returns the whole, exact bad nicknames, which in this case isn't necessary. By changing it to 0, $v1 returns 1 if found, and 0 if not vice versa.