Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #--------------------------------------------------------------------------------------------------------------------#
- # SWEAR KICK/BADWORD KICK SCRIPT BY RANA USMAN #
- #--------------------------------------------------------------------------------------------------------------------#
- #I made this script to avoide configuring other time taking scripts.This script is very easy to configure and will take
- #few seconds to get fully configured.The script will kick the Abusers/Lamers who abuse the channels by using badwords
- #
- #AUTHOR : RANA USMAN
- #Email : coolguy_rusman@yahoo.com
- #URL : www.ranausman.tk & www.airevision.tk
- #Version : 1.2
- #If you have any suggestion about my script or any way to make it better kindly let me know i will be glad to look forward
- ###################
- # VERSION HISTORY #
- ###################
- #In Version 1 there was a huge problem that was the bot was kicking the user who was saying any thing on the channel main
- #So i made effort to fix it and fortunatly is fixed :) problem was in code before but now fixed you can use this script
- #Without any hasitation
- #In this new version you have option to exempt the users with specific modes on the bot
- #########################
- # CONFIGURATION SECTION #
- #########################
- #Set the channels here on which you want this script to work
- #Seperate channels by Space like "#channel1 #channel2 #channel3"
- #If you want this script to work on all the channels where ur bot is parked leave it as ""
- set bwordchan ""
- #Set Badwords here on which you want your bot to kick user
- #You can manually add badwords in the way mentioned below ( *WILD CARDS SUPPORTED* )
- # set badwords {
- # "*badword1*"
- # "*badword2*"
- # }
- set badwords {
- "*fuck*"
- "*gay*"
- "*rape*"
- "*fuk*"
- "*badwa"
- "*phudi*"
- "*fudi"
- "*horny*"
- "*Lun*"
- "*gandu*"
- "*gandoo*"
- "*chood*"
- "*pussy*"
- "*boobs*"
- "*porn*"
- "*p0rn*"
- "*hot*"
- "*gay*"
- "*chut*"
- "*chood*"
- "*lun*"
- "*suck*"
- "*tharki*"
- "*sux*"
- }
- #Set Kick Reason
- set bkickreason "5{Anti Abuse}7 Dont Degrace your self by swearing."
- # Set the banmask type to use in banning the User who uses badwords.
- # Currently BAN Type is set to 1 (*!*@some.domain.com),
- # BAN Types are given below;
- # 1 - *!*@some.domain.com
- # 2 - *!*@*.domain.com
- # 3 - *!*ident@some.domain.com
- # 4 - *!*ident@*.domain.com
- # 5 - *!*ident*@some.domain.com
- # 6 - *nick*!*@*.domain.com
- # 7 - *nick*!*@some.domain.com
- # 8 - nick!ident@some.domain.com
- # 9 - nick!ident@*.host.com
- set bantype "1"
- #Set the Users Mode you want to Exempt
- #The Bot will not kick the user who had the modes you will define below
- #You can leave it as it is , if you dont know about it
- #Recommended : of
- set bworduser "of"
- ###########################
- # CONFIGURATION ENDS HERE #
- ###########################
- #--------------------------------------------------------------------------------------------------------------------#
- # SCRIPT STARTS FROM HERE.YOU CAN MAKE MODIFICATIONS AT UR OWN RISK, I DONT RESTRICT YOU TO NOT TO TOUCH THE CODE! #
- #--------------------------------------------------------------------------------------------------------------------#
- bind pubm - * btext:RanaUsman
- proc btext:RanaUsman {nick uhost hand chan arg} {
- global badwords bwordchan bkickreason banmask bworduser
- if {(([lsearch -exact [string tolower $bwordchan] [string tolower $chan]] != -1) || ($bwordchan == ""))} {
- set usman [badword:filter $arg]
- set arg [badword:filter $arg]
- set banmask "[badword:banmask $uhost $nick]"
- foreach bword $badwords {
- if {[string match -nocase $bword $usman]} {
- if {[matchattr $hand $bworduser]} { return 0
- } else {
- putquick "MODE $chan +bb $banmask"
- putserv "KICK $chan $nick :$bkickreason"
- }
- }
- }
- }
- }
- proc badword:filter {str} {
- regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\037|\002|\026|\006|\007} $str "" str
- return $str
- }
- proc badword:banmask {uhost nick} {
- global bantype
- switch -- $bantype {
- 1 { set banmask "*!*@[lindex [split $uhost @] 1]" }
- 2 { set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
- 3 { set banmask "*!*$uhost" }
- 4 { set banmask "*!*[lindex [split [maskhost $uhost] "!"] 1]" }
- 5 { set banmask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }
- 6 { set banmask "*$nick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
- 7 { set banmask "*$nick*!*@[lindex [split $uhost "@"] 1]" }
- 8 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split $uhost @] 1]" }
- 9 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }
- default { set banmask "*!*@[lindex [split $uhost @] 1]" }
- return $banmask
- }
- }
- ################################################################################################
- putlog "\002*Anti Abuse Script* by *Rana Usman* (www.ranausman.tk) has been successfully LOADED"
- ################################################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement