on *:NICK: {
if ($newnick isop #myroom && $newnick ison #myroom && *dick* iswm $newnick) {
mode #myroom +b *dick*!*@*
}
}
Little mistake, he was checking $nick ison #chan instead of $newnick
Edit : was another mistake, $me is only updated at the end of processing all on nick event so here, the value is the same as $nick, and of course the old nick isn't op in the channel, I've updated the code.