You can use $nick(#,nickname).pnick and see if if ! is part of the nick.