Advertisement
Guest User

Untitled

a guest
Jun 12th, 2017
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. ########################
  2. # HOW TO ENABLE SCRIPT #
  3. ########################
  4. #PartyLine : (While Your in DCC chat with bot the place where you give commands like .+chan #chan is called partyline)
  5. #In Bots Partline simple give the following command --> .chanset #channelname flood-join joins:seconds
  6. #Example : .chanset #yourchannel flood-join 4:6 <-- bot will detect if 4 clone joins in 6 seconds ::) ( 0:0 to disable )
  7.  
  8. ###########################
  9. #= CONFIGURATION SECTION =#
  10. ###########################
  11. ## Set the Lock Modes
  12. # Bot will change channel mode to the modes you will specify below in case the bot will detect join flood
  13. # To Disable Mode change set it to ""
  14. set joinlockmodes "iRMm"
  15.  
  16. ## Set the banmask type to use in banning the join floods
  17. # Currently BAN Type is set to 1 (*!*@any.domain.com),
  18. # BAN Types are given below;
  19. # 1 - *!*@some.domain.com
  20. # 2 - *!*@*.domain.com
  21. # 3 - *!*ident@some.domain.com
  22. # 4 - *!*ident@*.domain.com
  23. # 5 - *!*ident*@some.domain.com
  24. # 6 - *nick*!*@*.domain.com
  25. # 7 - *nick*!*@some.domain.com
  26. # 8 - nick!ident@some.domain.com
  27. # 9 - nick!ident@*.host.com
  28. set bantype "2"
  29.  
  30. ## Set the time in seconds to Unlock Modes
  31. # The Bot will Unlock the channel after the specified time you will set below
  32. set unlocktime "15"
  33.  
  34. ## Set The Punish Type
  35. # Set it to '1' if you want to add the Ban for joinflood in bots list.By doing it Bot will ban the IP everytime when the
  36. # clone will join the channel even if it is unbanned from channel OR Simply a stick ban
  37. # Set it to '2' for a simple channel Ban :) :: RECOMMENDED ::
  38. set joinpunish "2"
  39.  
  40. ## Set the reason you want to give while kicking
  41. set jreason "Mass Join Flood - 4C1hatWorld 14P1rotections"
  42.  
  43. ###########################
  44. # CONFIGURATION ENDS HERE #
  45. ###########################
  46.  
  47. #--------------------------------------------------------------------------------------------------------------------#
  48. # SCRIPT STARTS FROM HERE.YOU CAN MAKE MODIFICATIONS AT UR OWN RISK, I DONT RESTRICT YOU TO NOT TO TOUCH THE CODE! #
  49. #--------------------------------------------------------------------------------------------------------------------#
  50.  
  51. bind flud - join joinflood:RanaUsman
  52. proc joinflood:RanaUsman {nick uhost hand type chan} {
  53. global joinlockmodes banmask unlocktime joinpunish jreason botnick
  54. if {![botisop $chan] || [matchattr $hand of]} { return 0 }
  55. set banmask [joinpart:banmask $uhost $nick]
  56. if {($joinpunish == 1)} {
  57. putquick "MODE $chan +$joinlockmodes"
  58. newchanban $chan $banmask $botnick $jreason
  59. putquick "KICK $chan $nick :$jreason"
  60. utimer $unlocktime [list putquick "MODE $chan -$joinlockmodes"]
  61. }
  62. if {($joinpunish == 2)} {
  63. putquick "MODE $chan +$joinlockmodes"
  64. putquick "MODE $chan +b $banmask"
  65. putquick "KICK $chan $nick :$jreason"
  66. utimer $unlocktime [list putquick "MODE $chan -$joinlockmodes"]
  67. }
  68. }
  69. proc joinpart:banmask {uhost nick} {
  70. global bantype
  71. switch -- $bantype {
  72. 1 { set banmask "*!*@[lindex [split $uhost @] 1]" }
  73. 2 { set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
  74. 3 { set banmask "*!*$uhost" }
  75. 4 { set banmask "*!*[lindex [split [maskhost $uhost] "!"] 1]" }
  76. 5 { set banmask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }
  77. 6 { set banmask "*$nick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
  78. 7 { set banmask "*$nick*!*@[lindex [split $uhost "@"] 1]" }
  79. 8 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split $uhost @] 1]" }
  80. 9 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }
  81. default { set banmask "*!*@[lindex [split $uhost @] 1]" }
  82. return $banmask
  83. }
  84. }
  85. #-------------------------------------------------------------------------------------------------------------------------#
  86. putlog "=- \002ANTI MASS JOIN/JOIN FLOOD PROTECTION BY NicePaL HAS BEEN LOADED SUCCESSFULLY \002 -="
  87. #-------------------------------------------------------------------------------------------------------------------------#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement