mIRC Home    About    Download    Register    News    Help

Print Thread
Filtering. #249985 26/12/14 05:31 PM
Joined: Dec 2014
Posts: 23
S
SBDOnslaught Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2014
Posts: 23
Merry Christmas Everyone! Happy Holidays if you don't Celebrate Christmas!

Anyways, like all my other posts, this is for a twitch bot. I've made a link filter (kinda), and was wondering how to make a CAPS filter so people can't spam caps you know?
The way i would like it to work is if more than 30% of the message is caps they would get erased, but i don't know if it's possible to calculate the number of characters in a line or even if it's possible to detect caps with mIRC. If you guys could also let me know what to use for a "Repetition" filter ( so people can spam !!!!!!!!!!!!!!!!!!!!!.... Ya know?) That would be great!

All of you here probably know how, so that's why im asking! :P

Also, does anyone know how I can use my bot to change the Game/Title. Currently using Nightbot for that, but i really don't want him in my chat smirk

Thank you guys! Once again, Happy Holidays!! smile

Re: Filtering. [Re: SBDOnslaught] #249992 27/12/14 11:34 PM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
There is a search button, but i'll post this anyways:
it gives one warning then times out (%SecondsToTimeOut) seconds on second offense. the second offense timer wares off (%cooldownAmount) seconds from the first offense
also ignores mod caps since a mod can't time out a mod
Code:
on *:text:*:#: {
  set -e %SecondsToTimeOut 120
  set -e %TimeOutMessage Message Goes here
  set -e %cooldownAmount 300
  if ($nick isop #) return
  if ( $len($1-) >= 10 ) {
    if ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 75 ) { 
      if !$istok(%caps.warned,$nick,32) {
        msg $chan $nick -> stop typing in caps! [warning] 
        set -e %caps.warned $addtok(%caps.warned,$nick,32)
        .timer 1 %cooldownamount remove.warned $nick
      }
      else msg $chan %TimeoutMessage | msg $chan .timeout $nick %SecondsToTimeout 
    }
  }
}
alias -l remove.warned {
  set -e %caps.warned $remtok(%caps.warned,$1,1,32)
}


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Re: Filtering. [Re: judge2020] #250028 30/12/14 10:57 AM
Joined: Dec 2014
Posts: 23
S
SBDOnslaught Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2014
Posts: 23
Thanks Judge! Works like a charm! <3

Re: Filtering. [Re: SBDOnslaught] #250033 30/12/14 12:51 PM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
PS make sure this is either in it's own remote file or is at the bottom of another file. it may make other scripts mess up since it tries to scan every single message that comes.


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball