https://ircdnevnik.wordpress.com /server -m irc.dbase.in.rs:6667 -j #IRC
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.
}
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.
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 ...
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.