This code works exactly as I want it to, but the problem is this.
Let's say I made the bottom line writing limit 3.(!timeout line 3)
No problem running command good.
But when the moderators write the text between the bottom line and the bottom line, the code does not see what I wrote and the viewer is timeout. I want the code to be edited. When moderators write, I want the counter to be zero.
example,
Code:
viewer1=1
viewer1=2
viewer1=3
bot=viewer1 timeout! you are spamming!

Code:
viewer1=1
viewer1=2
moderator1=hello
moderator2=hi
viewer1=hello
bot=viewer1 timeout! you are spamming!

another example,
Code:
viewer1=1
moderator1=good morning
viewer1=2
@moderatornighbot=bla bla bla...
viewer1=3
bot=viewer1 timeout! you are spamming!

this code ignoring moderator texts. i dont want timeout viewers when moderators writing please fix this script
Code:
on *:text:!timeout*:#: {
  if ($nick isop $chan) {
    if ($2 == line) {
      if ($3 isnum) {
        %spamline = $abs($int($3))
        msg # Spamline is now $abs($int($3)) $+ . Messaging $abs($int($3)) times in a row will timeout you!
      }
      else { msg # $3 is not a number! | return } 
    }
    elseif ($2 == time) {
      if ($3 isnum) {
        %spamtime = $abs($int($3))
        msg # Timeout time is now $abs($int($3)) $+ !
      }
      else { msg # $3 is not a number! | return }
    }
    elseif ($2 == message) {
      %spammessage = $3-
      msg # Timeout message is now : $3- 
    }
    else { msg # insufficient parameters. !timeout <line,time,message> <parameter> }
  }
  else {
    msg # You dont have permission to do that!
  }
}

on *:text:*:#: {
  if ($nick isop $chan) { return }
  if ($nick == %spamnick) {
    inc %spamlines
    if (%spamlines == %spamline) { 
      msg # .timeout $nick %spamtime %spammessage
      msg # $nick you're spamming too fast. slow down!
      %spamlines = 1
    }

  }
  else {
    %spamnick = $nick
    %spamlines = 1
  }
}

Last edited by x3pos; 17/02/17 02:53 AM.