This snippet is an advertiser and flooder detector which detects in Query and Channel.
This snippet kick and ban the detected nick from all channel you are in and OP.
To prevent kicking someone you protect, add the user in a friend list which u may add the user in channel nicklist or in query "popups".
It will auto unban the user after 5 minutes, in all channel.
The Flood protection only detect 5 row in 3 seconds. So, don't wonder why doesn't all flooder this snippet kick.
menu nicklist,query {
Protect
.List Friend:hlst
.-
.Add as A Friend:/auser MFnd $$1
.Del as A Friend:/ruser MFnd $$1
}
on *:text:*:*:{
if ($level($nick != MFnd)) {
$iif($tchk($1-),ka $v1 $regml(1),inc -u3 $+(%,flood.,$nick,.,$target)) | $iif($($+(%,flood.,$nick,.,$target),2) >= 5,ka Excess Flooding)
}
}
on *:notice:*:*:{
if ($level($nick != MFnd)) {
$iif($tchk($1-),ka $v1 $regml(1),inc -u3 $+(%,flood.,$nick,.,$target)) | $iif($($+(%,flood.,$nick,.,$target),2) >= 5,ka Excess Flooding)
}
}
on *:invite:#: $iif($level($nick != MFnd),ka Invting Detected)
alias tchk $iif($regex($1-,/(?:^| )(\/server|(http+(s\:|\:)+\/\/)|(w{3}\.{1}+((\w|\d).*)+\.{1}+\w{2,3}\b)|(#(\w|\d)\S+)|\/join|\/j)/gs),return Advertising,return 0)
alias ka {
ignore -u5 $nick | var %n = 1, %c, %kb
while (%n <= $comchan($nick,0)) {
%c = $comchan($nick,%n)
if ($me isop %c) && ($nick !isop %c) && ($nick ison %c) { kick %c $nick $1- | ban -u300 %c $nick 2 | %kb = %kb %c }
inc %n
}
$iif(%kb,echo -a 4---> Detected $+ $nick $+ Inviting. Kick/Ban Perform on $+ %kb $+ )
}
alias hlst { window @Friend | var %n = 1 | while (%n <= $ulist(*,0)) { if ($level($ulist(*,%n)) == MFnd) echo @Friend $ulist(*,%n) | inc %n } }
I have a question, Can u give me an exact sample on how not to kick some friend in the channel.
[HANZam], when you right click on your mirc nicklist or query, you will spot 'Protect' followed by 'Add as a friend' and 'del as a friend '
click on 'add as a friend' while highlight a chosen nick to protect your friends from being kicked. This goes the same for 'del as a friend' when you want to remove a nick from being protected.
if an operator gives an adverticement of any website or channel, how will the script warn him or kick him out of the channel.Change this line
if ($me isop %c) && ($nick !isop %c) && ($nick ison %c) {
to this one:
if ($me isop %c) && ($nick ison %c) {
I think better change this.
on :text::*:{
TO
on *:text:#:{ (Recommended)
on :notice::*:{
TO
on :notice::#:{ (Recommended)
Reason