so you have the bot or what ever you are running this script to say the word that you just banned the person for saying , and you also warn them right before you kick ban them kind of pointless...
why not just do this and be done with it?
on @*:text:*:#:{
var %curse = add,ur,curse,words,here, %x = $numtok(%curse,44)
while (%x) {
if ($istok($1-,$gettok(%curse,%x,44),32)) ban -ku86400 # $nick 2 Banned For 24 hours
dec %x
}
}