mIRC Home    About    Download    Register    News    Help

Print Thread
#259577 28/12/16 08:28 PM
Joined: Dec 2016
Posts: 18
A
apoio82 Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Dec 2016
Posts: 18
on *:LOAD:{
/set %Bannword Kappa FrankerZ DansGame
}

On @*:TEXT:*:#hearthstoneness: {
if ($nick !isop #) {
set %Badword. [ $+ [ $nick ] ] 0
var %i = 0
while (%i < $numtok(%Bannword,32)) {
inc %i
var %current.word = $gettok(%Bannword,%i,32)
if ($regex($1-,/ $+ %current.word $+ /g) > 0 ) {
%Badword. [ $+ [ $nick ] ] = %Badword. [ $+ [ $nick ] ] + $regex($1-,/ $+ %current.word $+ /g)
if ( %Badword. [ $+ [ $nick ] ] >= 5 ) {
msg #hearthstoneness Stop spamming emotes, $nick $+ !
msg # .timeout $nick 10
unset %Badword. [ $+ [ $nick ] ]
return
}
}


My doubt is using irc to twitch
Hello, this command is for the flood of 5 emotes on the same line, I would like to know how do I change to protect for 5 emmotes in 5 lines of emotes, thinking of avoiding piramede.

apoio82 #259578 29/12/16 01:36 AM
Joined: Oct 2015
Posts: 112
B
Vogon poet
Offline
Vogon poet
B
Joined: Oct 2015
Posts: 112
I think I understand what you are asking. If someone types five lines in a row using any of the emotes in %Bannword, then you want them to get timed out. I just wrote and tested this script, it will work for that purpose:

Code:
ON *:TEXT:*:#hearthstoneness: {
  IF ($nick !isop $chan) {
    VAR %x = 1
    WHILE ($gettok(%Bannword,%x,32)) {
      IF ($findtok($1-,$v1,32)) {
        INC %Badword. [ $+ [ $nick ] ]
        VAR %Badword_repeat $true
        BREAK
      }
      INC %x
    }
    IF (%Badword. [ $+ [ $nick ] ] >= 5) {
      MSG $chan Stop spamming emotes, $nick $+ !
      MSG $chan .timeout $nick 10
      UNSET %Badword. [ $+ [ $nick ] ]
    }
    ELSEIF ((%Badword. [ $+ [ $nick ] ]) && (!%Badword_repeat)) UNSET %Badword. [ $+ [ $nick ] ]
  }
}

Blas #259581 29/12/16 02:30 PM
Joined: Dec 2016
Posts: 18
A
apoio82 Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Dec 2016
Posts: 18
Thanks!


Link Copied to Clipboard