Skip to content
MSN

Long letters flood kick

A TG007 community discussion started by bonTy.

Discussion 8 posts
Page 1 of 1
Open
Topic #3548 · 8 published posts · 850 views

Hey guys,

I am looking for a short and nice code for long flood kick like this

on @*:text:*aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa*:#: { if ($nick isowner $chan) halt | /kick $chan $nick No Flooding Please | access # add deny $address($nick,1) 1 :TEXT FLOOD } 

I have all the letters like this ..so am wondering isn't there a shorter code

for this ?

Not tested but that should work for all long words

 

on @*:text:*???????????????????????????????????????????????????????????????????*:#: { if ($nick isowner $chan) halt | /kick $chan $nick No Flooding Please | access # add deny $address($nick,1) 1 :TEXT FLOOD }

 

My code does NOT have bugs. It just develops random features.

Hi Ozzy,

Thanks for your reply I tested the code it works ya but it also kicks if somone talking and said more the limit

I just want it to kick when they say 1 exact letter more than 60 times..

on @*:text:*aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa*:#: { if ($nick isowner $chan) halt | /kick $chan $nick No Flooding Please | access # add deny $address($nick,1) 1 :TEXT FLOOD }
on @*:text:*bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb*:#: { if ($nick isowner $chan) halt | /kick $chan $nick No Flooding Please | access # add deny $address($nick,1) 1 :TEXT FLOOD }
on @*:text:*cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc*:#: { if ($nick isowner $chan) halt | /kick $chan $nick No Flooding Please | access # add deny $address($nick,1) 1 :TEXT FLOOD }

Just for exact letters not full a paragraph lol coze if I am talking to some one and my words more than the limit it will kick me..

 

A wildcard question mark, as Ozzy used, can also represent a space.

 

I tried using a regular expression for 15 or more characters but it didn't accept the expressions for "at least ... occurances" and "between ... and ... occurances".

;at least 15 - didn't work
/^\w{15,}$/

;between 15 and 100 - didn't work
/^\w{15,100)$/

;15 exactly - did work
/^\w{15}$/

 

am not sure what do you mean but 15 is not fair lol 60 is allowed in my rooms

this will only kick if there are no spaces in the text though

 

on @*:text:*???????????????????????????????????????????????????????????????????*:#: { 
if ($nick isowner $chan) halt
if ($chr(32) !isin $1-) {  
/kick $chan $nick No Flooding Please 
access # add deny $address($nick,1) 1 :TEXT FLOOD 
} 
}

My code does NOT have bugs. It just develops random features.

i guess that wud help (after using it with each letter separately!);

 

on @*:text:*a*:#: { 
if ($len($1-) >= 30) {
if ($nick isowner $chan) halt
/kick $chan $nick No Flooding Please 
access # add deny $address($nick,1) 1 :TEXT FLOOD 
} 
}

 

untested ..

Edited May 14, 2005 10:17 PM by [::X-System::]

on me:*:join:#:hop #

Thank you guys,

I got a nice code

most of the codes has a problem that it won't kick arabic letters..

so Peterje did this code with $msn.decode($1-) to work for arabic letters ..

and it work also for english , numbers anything ..

#Flood on 
on @*:TEXT:*:#: flcheck $msn.decode($1-) 
on @*:ACTION:*:#: flcheck $msn.decode($1-)
alias -l flcheck { 
 if (($nick isop $chan) || ($nick !ison $chan)) return  
 var %l = $len($1-), %i = 1, %rep 
 while (%i < %l) { 
   if ($mid($1-,%i,1) == $mid($1-,$calc(%i + 1),1)) { 
     inc %rep 
     if (%rep >= 55) { tfkick $nick | return } 
   } 
   else %rep = 0 
   inc %i 
 } 
} 
alias tfkick { sockwrite -n msn.server. $+ $cid access $hget(msn. $+ $cid,fullroom) add deny $ial($1).addr 1 :TEXT FLOOD $crlf kick $hget(msn. $+ $cid,fullroom) $1 :No Flooding Please } 
#Flood end
========================
=====Credits to Peterje========
========================

Edited May 15, 2005 6:17 AM by bonTy