Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. #--------------------------------------------------------------------------------------------------------------------#
  2. # SWEAR KICK/BADWORD KICK SCRIPT BY RANA USMAN #
  3. #--------------------------------------------------------------------------------------------------------------------#
  4. #I made this script to avoide configuring other time taking scripts.This script is very easy to configure and will take
  5. #few seconds to get fully configured.The script will kick the Abusers/Lamers who abuse the channels by using badwords
  6. #
  7. #AUTHOR : RANA USMAN
  8. #Email : coolguy_rusman@yahoo.com
  9. #URL : www.ranausman.tk & www.airevision.tk
  10. #Version : 1.2
  11. #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
  12.  
  13. ###################
  14. # VERSION HISTORY #
  15. ###################
  16. #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
  17. #So i made effort to fix it and fortunatly is fixed :) problem was in code before but now fixed you can use this script
  18. #Without any hasitation
  19. #In this new version you have option to exempt the users with specific modes on the bot
  20.  
  21. #########################
  22. # CONFIGURATION SECTION #
  23. #########################
  24.  
  25. #Set the channels here on which you want this script to work
  26. #Seperate channels by Space like "#channel1 #channel2 #channel3"
  27. #If you want this script to work on all the channels where ur bot is parked leave it as ""
  28.  
  29. set bwordchan ""
  30.  
  31. #Set Badwords here on which you want your bot to kick user
  32. #You can manually add badwords in the way mentioned below ( *WILD CARDS SUPPORTED* )
  33. # set badwords {
  34. # "*badword1*"
  35. # "*badword2*"
  36. # }
  37.  
  38. set badwords {
  39. "*fuck*"
  40. "*gay*"
  41. "*rape*"
  42. "*fuk*"
  43. "*badwa"
  44. "*phudi*"
  45. "*fudi"
  46. "*horny*"
  47. "*Lun*"
  48. "*gandu*"
  49. "*gandoo*"
  50. "*chood*"
  51. "*pussy*"
  52. "*boobs*"
  53. "*porn*"
  54. "*p0rn*"
  55. "*hot*"
  56. "*gay*"
  57. "*chut*"
  58. "*chood*"
  59. "*lun*"
  60. "*suck*"
  61. "*tharki*"
  62. "*sux*"
  63. }
  64.  
  65. #Set Kick Reason
  66. set bkickreason "5{Anti Abuse}7 Dont Degrace your self by swearing."
  67.  
  68.  
  69. # Set the banmask type to use in banning the User who uses badwords.
  70. # Currently BAN Type is set to 1 (*!*@some.domain.com),
  71. # BAN Types are given below;
  72. # 1 - *!*@some.domain.com
  73. # 2 - *!*@*.domain.com
  74. # 3 - *!*ident@some.domain.com
  75. # 4 - *!*ident@*.domain.com
  76. # 5 - *!*ident*@some.domain.com
  77. # 6 - *nick*!*@*.domain.com
  78. # 7 - *nick*!*@some.domain.com
  79. # 8 - nick!ident@some.domain.com
  80. # 9 - nick!ident@*.host.com
  81. set bantype "1"
  82.  
  83. #Set the Users Mode you want to Exempt
  84. #The Bot will not kick the user who had the modes you will define below
  85. #You can leave it as it is , if you dont know about it
  86. #Recommended : of
  87. set bworduser "of"
  88.  
  89. ###########################
  90. # CONFIGURATION ENDS HERE #
  91. ###########################
  92.  
  93. #--------------------------------------------------------------------------------------------------------------------#
  94. # SCRIPT STARTS FROM HERE.YOU CAN MAKE MODIFICATIONS AT UR OWN RISK, I DONT RESTRICT YOU TO NOT TO TOUCH THE CODE! #
  95. #--------------------------------------------------------------------------------------------------------------------#
  96.  
  97. bind pubm - * btext:RanaUsman
  98. proc btext:RanaUsman {nick uhost hand chan arg} {
  99. global badwords bwordchan bkickreason banmask bworduser
  100. if {(([lsearch -exact [string tolower $bwordchan] [string tolower $chan]] != -1) || ($bwordchan == ""))} {
  101. set usman [badword:filter $arg]
  102. set arg [badword:filter $arg]
  103. set banmask "[badword:banmask $uhost $nick]"
  104. foreach bword $badwords {
  105. if {[string match -nocase $bword $usman]} {
  106. if {[matchattr $hand $bworduser]} { return 0
  107. } else {
  108. putquick "MODE $chan +bb $banmask"
  109. putserv "KICK $chan $nick :$bkickreason"
  110. }
  111. }
  112. }
  113. }
  114. }
  115. proc badword:filter {str} {
  116. regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\037|\002|\026|\006|\007} $str "" str
  117. return $str
  118. }
  119. proc badword:banmask {uhost nick} {
  120. global bantype
  121. switch -- $bantype {
  122. 1 { set banmask "*!*@[lindex [split $uhost @] 1]" }
  123. 2 { set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
  124. 3 { set banmask "*!*$uhost" }
  125. 4 { set banmask "*!*[lindex [split [maskhost $uhost] "!"] 1]" }
  126. 5 { set banmask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }
  127. 6 { set banmask "*$nick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
  128. 7 { set banmask "*$nick*!*@[lindex [split $uhost "@"] 1]" }
  129. 8 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split $uhost @] 1]" }
  130. 9 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }
  131. default { set banmask "*!*@[lindex [split $uhost @] 1]" }
  132. return $banmask
  133. }
  134. }
  135. ################################################################################################
  136. putlog "\002*Anti Abuse Script* by *Rana Usman* (www.ranausman.tk) has been successfully LOADED"
  137. ################################################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement