; This alias will check if a word contains 4 or more
; sticky (repetitive) letters. (e.g.: teeeeest, hiiii, byeeeeee, ...)
; Returns the sticky letter if found, otherwise $null.
alias sticky {
var %re = /(.)\1{4,}/
return $iif($regex($1-,%re), $regml(1), $null)
}
on @*:Text:*:#:{
; Looping through the words in the line to find sticky letters...
var %x = 1
while ($gettok($1-, %x, 32) != $null) {
var %word = $v1
; Checking if there's sticky letters in the word..
if ($sticky(%word) != $null) {
; At least a match has found,
; Do whatever you want here.
; e.g.: ban -k $chan $nick 2
break
}
inc %x
}
}