mIRC Home    About    Download    Register    News    Help

Topic Options
#262803 - 08/04/18 09:50 AM help with code to exclude Ops
raycomp Offline
Vogon poet

Registered: 04/05/13
Posts: 103
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 }


Edited by raycomp (08/04/18 09:52 AM)

Top
#262807 - 08/04/18 07:18 PM Re: help with code to exclude Ops [Re: raycomp]
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 969
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.

Top