it detects single badnicks i was wondering if this could be modified to detect
nicks like ssooomeeeenick bbbaaddddniccckk to strip any duplicate characters and match against bad nicks in the variable and all this with case insensitive
to prevent evades
thanx in advance.
Code: Select all
#--------------------------------------------------------------------------------------------------------------------#
# BAD NICK SCRIPT BY RANA USMAN #
#--------------------------------------------------------------------------------------------------------------------#
#Author : RANA USMAN
#Email : coolguy_rusman@yahoo.com
#URL : www.ranausman.tk
#Version : 1.2
#Catch me on UNDERNET @ #VASTEYE my nick is ^Rana^Usman
###################
# Version History #
###################
#The version before was not supporting Wildcards like ** ?? etc etc
#So now in this version you can use wild cards too
###########################
#- CONFIGURATION SECTION -#
###########################
########################################################################################
#- Enter the Bad nicks Below on which you want your bot to BAN (Wild Cards Supported)-#
########################################################################################
set bnick {
"somenick"
"badnick"
}
#########################################################################################################
## SET The channel on which you want this script to work ##
## Channels Separted by space...and if you want this script to work on all channels leave it as "" ##
#########################################################################################################
set bchan ""
################
#- Set Reason -#
################
set kickreason "4Bad Nick Detected"
#--------------------------------------------------------------------------------------------------------------------#
# SCRIPT STARTS FROM HERE...MAKE IT BETTER WITH YOUR SKILLS IF YOU CAN.I DONT RESTRICT YOU TO NOT TO TOUCH CODE! #
#--------------------------------------------------------------------------------------------------------------------#
bind join - * join:RanaUsman
bind nick - * nick:tvrsh
proc nick:tvrsh {nick uhost hand chan newnick} {
join:RanaUsman $newnick $uhost $hand $chan
}
proc join:RanaUsman {nick uhost hand chan} {
global bnick bchan kickreason temp
if {(([lsearch -exact [string tolower $bchan] [string tolower $chan]] != -1) || ($bchan == ""))} {
set temp 0
foreach i [string tolower $bnick] {
if {[string match *$i* [string tolower $nick]] && ![string match -nocase *guest* $nick]} {
# if {[string match *$i* [string tolower $nick]]} { }
set badpart $i
set temp 1
}
}
}
if {!$temp} { return } {
putquick "MODE $chan +b *$badpart*!*@*"
putquick "KICK $chan $nick :$kickreason"
}
}
putlog "=-\002 LOADED BAD NICK BY RANA USMAN (www.ranausman.tk)\002 -="
#Author : RANA USMAN