BT.antinotice.tcl 1.8 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #########################################################################
  2. ## BlackTools - The Ultimate Channel Control Script ##
  3. ## One TCL. One smart Eggdrop ##
  4. #########################################################################
  5. ######################### ANTINOTICE TCL ############################
  6. #########################################################################
  7. ## ##
  8. ## BlackTools : http://blacktools.tclscripts.net ##
  9. ## Bugs report : http://www.tclscripts.net/ ##
  10. ## GitHub page : https://github.com/tclscripts/BlackToolS-TCL ##
  11. ## Online Help : irc://irc.undernet.org/tcl-help ##
  12. ## #TCL-HELP / UnderNet ##
  13. ## You can ask in english or romanian ##
  14. ## ##
  15. #########################################################################
  16. proc antinotice:protect {nick host hand arg chan} {
  17. global black botnick
  18. if {![validchan $chan]} { return }
  19. if {[setting:get $chan antinotice]} {
  20. set handle [nick2hand $nick]
  21. if {![botisop $chan] && ![setting:get $chan xonly]} { return }
  22. if {[matchattr $handle $black(exceptflags) $chan]} { return }
  23. set bl_protect [blacktools:protect $nick $chan]
  24. if {$bl_protect == "1"} { return }
  25. if {[isbotnick $nick]} { return }
  26. if {[string equal -nocase $chan $botnick]} { return }
  27. blacktools:banner:1 $nick "ANTINOTICE" $chan $host [get:banmethod "antinotice" $chan] [link:chan:get $chan]
  28. }
  29. }
  30. ##############
  31. #########################################################################
  32. ## END ##
  33. #########################################################################