does an on notice trigger a $chan? also, you may not be on the same channel as the nick so use /help $comchan
alias bdwd { set %badwords put,words,here,seperated,by,commas }
shouldnt it be
alias bdwd if (!$istok(%badwords,$1,44)) set %badwords $addtok(%baddwords,$1,44)
?
also, use ban -ku30 $chan $nick Dont use bad language blah blah blah...