mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2014
Posts: 14
J
jbgrw Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Jun 2014
Posts: 14
I'm trying to figure out a way to make a script so when someone types something like "hello???????????????" or "hellllllooooooooooooooooooooo" it'll time them out.
Anybody got any scripts that does this?

Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
unless your chat mods are lazy, you shouldn't need a script for this.


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Joined: Mar 2010
Posts: 146
Vogon poet
Offline
Vogon poet
Joined: Mar 2010
Posts: 146
Code:
; 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
  }
}


This code is untested, but it should work as expected.


Nothing...
Joined: Jun 2014
Posts: 14
J
jbgrw Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Jun 2014
Posts: 14
Works like a charm! many thanks man!

Originally Posted By: judge2020
unless your chat mods are lazy, you shouldn't need a script for this.


When there's over 1,000 people in the chat it's hard to keep track of what people say. :p


Link Copied to Clipboard