This time, there was a bracket missing in the on join event...

Here's a working piece of code. I perkily made some minor changes, too:
- merged and redrafted "israndom" and "isconsonant" aliases
- excluded the y char, as this may be used as a "vowel" in nicks
; kick nicks containing 6 (or more) consonants in a row
on @*:JOIN:#chat:{
if (($israndom($nick)) && (%consonant == on)) { ban -ku600 # $nick 2 14Random Nick Detected }
}
alias -l israndom {
var %nr = 1, %count
while ($mid($1,%nr,1)) {
if ($v1 isletter bcdfghjklmnpqrstvwxz) {
inc %count
if (%count >= 6) { return $true }
}
else { var %count = 0 }
inc %nr
}
return $false
}
Tip: Don't overdo using |'s in your code. It makes the code harder to read and harder to debug - especially if you merge multiple { } brackets and/or if-then-else constructions in one line.