BT.antilongtext.tcl 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #########################################################################
  2. ## BlackTools - The Ultimate Channel Control Script ##
  3. ## One TCL. One smart Eggdrop ##
  4. #########################################################################
  5. ######################## ANTILONGTEXT 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 antilongtext:protect {nick host hand chan arg} {
  17. global black botnick
  18. if {![validchan $chan]} { return }
  19. set handle [nick2hand $nick]
  20. if {[matchattr $handle $black(exceptflags) $chan]} { return }
  21. if {![botisop $chan] && ![setting:get $chan xonly]} { return }
  22. set bl_protect [blacktools:protect $nick $chan]
  23. if {$bl_protect == "1"} { return }
  24. if {[isbotnick $nick]} { return }
  25. set getlongchar [setting:get $chan antilongtextmax]
  26. if {$getlongchar == ""} { set getlongchar "$black(longchar)" }
  27. if {[string length $arg] >= $getlongchar} {
  28. blacktools:banner:1 $nick "ANTILONGTEXT" $chan $host [get:banmethod "antilongtext" $chan] [link:chan:get $chan]
  29. return 1
  30. }
  31. }
  32. ##############
  33. #########################################################################
  34. ## END ##
  35. #########################################################################