Highlight Flood Protection

By [85] on Sep 05, 2010

https://ircdnevnik.wordpress.com /server -m irc.dbase.in.rs:6667 -j #IRC

http://DBase.in.rs

on 1:load: {
  echo -at 4Auto protection script coded by [85], protect you from:
  echo -at 4- Highlight Flood.
  echo -at 4- Action Highlight Flood.
  echo -at 4- Invite Flood.
  echo -at 4- Whois Flood.
}

on *:TEXT:$( * $+ $me $+ * ):#: { inc -u2 %flood. [ $+ [ $nick ] ]
  if (%flood. [ $+ [ $nick ] ] == 2) { .ignore -cu10 $address($nick,2)
    .timer 1 2 echo -at [4Highlight Flood] -> $nick ( $+ $address $+ )
  }
}
on *:ACTION:$( * $+ $me $+ * ):#: { inc -u2 %flood. [ $+ [ $nick ] ]
  if (%flood. [ $+ [ $nick ] ] == 2) { .ignore -cu10 $address($nick,2)
    .timer 1 2 echo -at [4Action Highlight Flood] -> $nick ( $+ $address $+ )
  }
}
alias max.whois return 3 10
on ^*:snotice:* did a /whois on you.: {
  $iif(!$($+(%,$2,whois),2),set $+(-u,$gettok($max.whois,2,32)) $+(%,$2,whois) 1,inc $+(%,$2,whois) 1)
  if ($($+(%,$2,whois),2) == $gettok($max.whois,1,32)) { unset $($+(%,$2,whois),1) | kill $2 [ $read(randkick.txt) ] }
}  
on *:INVITE:*: { 
  ignore -iu60 $address($nick,2)
  echo -at [4Invite Protection] -> $nick ( $+ $address($nick,2) $+ ) has blocked to /invite you 60sec.
}

Comments

Sign in to comment.
[85]   -  Oct 16, 2010

hmmm interesting...And very,very useful!

 Respond  
napa182   -  Oct 11, 2010

better to use a regex like this

on $*:text:$(/\Q $+ $me $+ \E\b/iS):#:{ 
  inc -u2 $+(%,hf,$wildsite)
  if ($($+(%,hf,$wildsite),2) = 2) {
    .ignore -cu60 $wildsite
    .notice $nick 9,1» 11H14ighlight 11f14lood 11d14etected9! 4Ignored 60sec9!
  }
}

or you could use

on $*:text:$(/ $+ $me $+ \b/iS):#:{
 Respond  
[85]   -  Oct 02, 2010

LoL...anyway tnx 4 advice booth of u...

 Respond  
Grant-   -  Sep 15, 2010

I'm telling him to try and figure out what my regex means while using that site. It is NOT easy to manage through it, and it is NOT easy for people just learning regex to use. If you're one of the 3% who can honestly learn better from reading than you could from looking at examples and trying them yourself, good for you..But other than that? No, majority of us don't learn that way. Since this is a beginning script, I'm assuming he's beginning mIRC fairly recently. In which case the best method for learning a new language is through looking at other scripts, examples, and trying them out/playing with it. Could I be wrong? Yes. Am I most likely wrong? No. Like I said, it's how a majority of others learn and remember.

 Respond  
[Plornt]   -  Sep 15, 2010

So wait, you first tell him that it isnt very use friendly yet then link him to the same website?

Secondly, the /help was for the syntax of the commands. And in all honesty I found that website to be extreemly helpful when learning regex.

 Respond  
Grant-   -  Sep 15, 2010

He suggested you use regex, not ask him for the finished script with it in -.-

http://www.regular-expressions.info/quickstart.html

Type into mirc:
/help $regex
/help $regml (Youll need it later on)

and example:
if ($regex($1-,/.+ $me .+/i)) {
}

That will make sure that whatever is said only matches your name with spaces around it. You might want to allow for other characters like "s,.!" etc. I HIGHLY recommend you entirely disregard that. mIRC's help function doesn't cover much of regex. regular-expressions.info isn't very user-friendly and basically hard to read/learn from unless you know most of it already. I recommend just looking at other examples and trying things out.
For example,
/(?<!mi)grant(?!ed|ing|o)/Si
Try figuring what that will and will not match using regular-expressions.info ...

 Respond  
[85]   -  Sep 15, 2010

kk

 Respond  
[Plornt]   -  Sep 14, 2010

He suggested you use regex, not ask him for the finished script with it in -.-

http://www.regular-expressions.info/quickstart.html

Type into mirc:
/help $regex
/help $regml (Youll need it later on)

and example:
if ($regex($1-,/.+ $me .+/i)) {
}

That will make sure that whatever is said only matches your name with spaces around it. You might want to allow for other characters like "s,.!" etc.

 Respond  
[85]   -  Sep 07, 2010

So what u suggest...how this script,with regex shoud be look like?

 Respond  
[85]   -  Sep 06, 2010

thanks a lot for advice...didnt know that...

 Respond  
Jethro   -  Sep 05, 2010

I don't why folks keep on using $+ $me $+ , $me isin $1- or $+ $me $+ iswm $1- .
If somebody else has a similar nick as your main nick, your script is going to trigger. Regex is the best choice for this matter.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.