you might add something to scan those that are in the channel when the OP first joins
alias masscheck { who #teenconnection }

use this line to test if $6 is the nick on the network you use
raw 352:*:{ echo $active $6 }

if that is correct then replace that line with
raw 352:*:{
if ($read(nicks.txt,nw,$+(*,$6,*)) ban -ku60 $chan $nick 5 Bad word in nickname
}
note I didn't test that last bit, and if you have a big list you will want to use a hash table instead of a text file

Automatic scripts are not a good substitue for a reasonable thinking channel operator, dependance on them only weakens your abilities to manage things.
Also its easy to defeat a script like this by spelling the "bad word" phonetically or using numbers for letters.