Oh, using
if ($nick($chan,NICKNAME,') == $true)
would break if he was that mode I guess, But it seems better to not show him as a '

any user that has that mode is likely to have a real nickname.
I'm guessing your using IRCX, which AFAIK would allow that type of nickname.
I guess we need input from Khaled.