Jethro commented on a Page, Idle-op  -  Jul 12, 2010

I thought I'd edit your script and improve upon it, and here is it:

on @*:text:*:#:{
  var %r = /(.)\1{5}/S
  if ($regex($1-,/!warn o(n|ff)/iS)) { 
    if (!$nick(#,$nick,oh)) {
      notice $nick you need to be op or hop to use this.
    }
    elseif ($regml(1) == n) && ($($+(%,warnon,#),2) != on) {
      set $+(%,warnon,#) on
      msg # 7Idle-op is now ON
    }
    elseif ($regml(1) == ff) && ($($+(%,warnon,#),2) == on) {
      set $+(%,warnon,#) off
      msg # 7Idle-op is now OFF
    }
    else { notice $nick It is already $($+(%,warnon,#),2) }
  }
  elseif ($($+(%,nickkick,$nick),2) > 1) && ($regex($1-,%r)) {
    kick # $nick 5 repeated characters in your exceeded!
    unset $+(%,nickkick,$nick)
  }
  elseif ($regex($1-,%r)) && ($($+(%,warnon,#),2) == on) {
    inc $+(%,nickkick,$nick)
    msg # 4[Warning]  $+ $nick $+  Please don't exceed $&
      5 repeated characters in your sentence. Thank you.
  }
}

blodix's snippet is 2057 bytes, and mine is 738 bytes.

On thing I don't get is the topic of this snippet "Idle-op." This script has nothing do with idling. It should have been titled "Repeated Character Kicker with Warnings."

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.