I'm trying to make a flood repeat check.

If someone did:

[timestamp] <Nick> Flood Flood Flood
[timestamp] <Nick> Flood Flood Flood
[timestamp] <Nick> Flood Flood Flood
[timestamp] <Nick> Flood Flood Flood
[timestamp] <Nick> Something else...

It would output as:

Nick said the word "Flood Flood Flood" x times in x seconds.
[timestamp] <Nick> Something else..

There are several reasons to do this: 1 is when people flood channels, it slows down my mIRC because of the on text events, so having an on ^*:text event may hopefully speed it up if it's halfdef the flood?

And then, less buffer text.

I already have these variables:

%thisnick$chan
%lastnick$chan
%thistext$chan
%lasttext$chan

In order to do this, I would need an on ^*:text event.

Of course, using an on ^*: will cause mIRC to use more events compared to a defaut plain mIRC, so the first thing is to check for $len($1-), where the large number is debatable.

Here's my untested code:

Code:
on ^*:text:*:#: {
  if ($len($1-) > 250) {
    if ($eval($+(%,lasttext.,$chan),2) == $eval($+(%,thistext.,$chan),2)) && ($eval($+(%,lastnick.,$chan),2) == $eval($+(%,thisnick.,$chan),2)) {
      /haltdef | inc %Repeat $+ $nick
    }
    if ($eval($+(%,lasttext.,$chan),2) != $eval($+(%,thistext.,$chan),2)) && ($eval($+(%,lastnick.,$chan),2) != $eval($+(%,thisnick.,$chan),2)) {
      /echo $chan $nick said " $+ $1- " $eval($+(%,Repeat,$nick),2) times in a row.
    }
  }
}


To test this though, I'd need to someone to repeat flood which ain't going to be arranged. Can you have on *:text: and on ^*:text: in the same page?