I guess if you really wanted you could ...
on !*:join:#:/set -u3 %joinchk $true
on *:text:*:#:{
if (!%joinchk) return
if ($1-4 == %joinspam [ $+ [ $nick ] ]) {
kick and ban them
unset %joinspam [ $+ [ $nick ] ]
halt
}
set %joinspam [ $+ [ $nick ] ] $1-4
}
This is just an idea. I personally wouldnt use a variable. I can imagine your variable list getting very full, very quickly.
EDIT: Basically, on join if nick is not me, set a variable for 3 seconds. If this variable is on and someone says something, script will log the first 4 words they say.
On the next join, if they say the exact same for words then they will get kicked and banned.