mIRC Homepage
Posted By: raycomp help with code to exclude Ops - 08/04/18 08:50 AM
I found this script on the net but will appreciate if some one can help to kick ban normal users only. In other word ops will be allowed to use the words.

like if ($nick isop #) return - or - if ($nick isuser #) (then to continue?)

Not sure where to place in the code.

Quote:
on *:ACTION:*:?:bwkb 1 $1-
on *:NOTICE:*:?:bwkb 1 $1-
alias bwkb {
if $regex($2-,%bwkb) {
var %c,%i 1
while $comchan($nick,%i) {
%c = $v1
if $nick(%c,$me,~&@%) {
ban -ku600 %c $nick 2 Ten minute ban for foul $+(language,$iif($1,$chr(32) in private message),!)
}
inc %i
}
.ignore -pntidu600 $nick 2
}
elseif ($1 = $null) $iif($input(/word1|\bword2\b|wo?rd3/iS,e,RegEx for BadWord Kick/Ban,%bwkb),set %bwkb $!)
}
on 1:load:{ set %bwkb /bitch|bastard|cunt|cock|fuc?k|h[o0]rn(ie|y)| $&
$+ nigger|\btwat\b|whore|penis|shit|\bcibai\b|dick|pussy|slut/iS }
Posted By: maroon Re: help with code to exclude Ops - 08/04/18 06:18 PM
You're already using "if $nick(%c,$me,~&@%)", so check out the syntax for that command. $nick(#channelname,$nick,r) returns a number only if they are a 'regular' user not having status in that channel. The 4th parameter is only needed for handling nicks having various combos of statuses. For example if you want to kick out the voices, you don't want to kick someone who has +ov status but only appears in nicklist with the greatest status.
© mIRC Discussion Forums