non wilcard badwords protection

Introduction

this snippet is to check bad words in channel including nick/id which will check non wilcard text or nick/id, for example you add cock as bad words then if some one type 'cockcroach' in channel it will not kick him/her, only if it find text 'cock' then the script will reject the user..same format u can use for different non wilcard scan texts. you can use the aliases to put into different events. use mIRC v6.16

by:aditya

;bad text protection
alias matchword {
if ($hfind($1,$2,1,n)) { set %reason $hget($1,$v1) | return 1 }
return 0
}
alias checktext {
var %n = $numtok($strip($2-),32)
while (%n) {
if ($matchword($1,$gettok($strip($2-),%n,32))) { return $true }
dec %n
}
return $false
}
alias badnickid if (!$hget(badnick&id)) .hmake badnick&id 10 | hadd badnick&id $1 $2-
alias addswear if (!$hget(swear)) .hmake swear 10 | hadd swear $1 $2-

on !@*:text:*:#: {
if ($nick !isop $chan) && ($checktext(swear,$1-)) { ban -ku60 $chan $nick %reason }
}
on !@*:join:#: {
if ($checktext(badnick&id,$nick)) || ($checktext(badnick&id,$remove($deltok($gettok($fulladdress,2,33),2,64),~))) { ban -ku60 $chan $nick %reason }
}
;to add swear words :/addswear ex: /addswear cock dont say that word again plz....
;to add badnick or id : /badnickid ex: /badnickid pussy pls change your nick/id be4 joined this channel

;you can create other aliases with the same format to match a non wilcard text ..like alias spam if (!$hget(spamwords)) .hmake spamwords 10 | hadd spamwords $1 $2-
;and then use if ($checktext(spamwords,$1-)) { blablbalbla..... etc

Categories



0 comments: "non wilcard badwords protection"

 
Copyright 2009 - Belajar Seo 2010 Blogspot Template » Wordpress Themes