Wikked

Twitch caps protection

Oct 30th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.53 KB | None | 0 0
  1. on !*:text:*:#:{
  2.   if ($nick isop #) { return }
  3.   if ( $len($1-) >= 10 ) {
  4.     if ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 70 ) {
  5.       if !$istok(%caps.warned,$nick,32) {      
  6.         msg $chan $nick -> stop typing in caps! first and last [warning]
  7.         set -e %caps.warned $addtok(%caps.warned,$nick,32)
  8.         .timer 1 300 remove.warned $nick
  9.       }
  10.       else {
  11.         msg # .timeout $nick 1
  12.       }
  13.     }
  14.   }
  15. }
  16.  
  17. alias -l remove.warned {
  18.   set -e %caps.warned $remtok(%caps.warned,$1,1,32)
  19. }
Advertisement
Add Comment
Please, Sign In to add comment