mIRC Home    About    Download    Register    News    Help

Print Thread
#199149 09/05/08 05:43 PM
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hello Folks,

I am calling upon the experts of this board and other mIRC enthusaiasts to see if there is a way to code a script to detect and deal with emoticon floods.

I would like to request a script to be an on Text event and conditions to pick up the emoticon flood to be:

1. Check how many emoticons (same or different) where used in 1 line of text given a specified maximum of emoticons. %x = 10 (emoticons)

2. Check for repeats of the (same or different) emoticon paterns given a specified maximum amount of lines. %y = 3 (lines)

Example of an Emoticon List:

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)
(o)
(p)
(g)
(r)
(s)
(t)
(u)
(v)
(w)
(x)
(y)
(z)
(@)
(*)
*P
*@
*|
:~
wink
smile
=)
=p
:|

Thanks very much for everything in advance.

Cheers,

-J

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Might be just me, but this sounds like a call for a regex expert.
I'd love to be able to write up something for you, but I'm still learning regex.

Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Is this the best way of doing this? I think I need an expert opinion.

Code:
on *:TEXT:*:#: {
  EmoteFlood $nick $chan $1-
}


Code:
alias EmoteFlood {
  if ($calc($wildtok($3-,*,0,41) + $wildtok($3-,*,0,58) - $wildtok($3-,:,0,41)) > 30) && ($nick !isop $comchan($nick,1)) {
    access $comchan($nick,1) add deny $ial($1).user 5 -> Violation of Code of Conduct - Emoticon Flood.
    kick $2 $1 : Please do not engage in flooding with emoticons!
    halt
  }
}
 


Link Copied to Clipboard