Selaa lähdekoodia

Add files via upload

Florian 8 vuotta sitten
vanhempi
commit
c303763a7c

+ 101 - 0
BlackTools2.5.2/Protections/BT.antibadtext.tcl

@@ -0,0 +1,101 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+########################   ANTIBADTEXT TCL   ############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+############################# AntiColor ################################
+
+proc colortext:process {nick host hand chan arg type} {
+	global black
+if {![validchan $chan]} { return }
+	set handle [nick2hand $nick]
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+if {[isbotnick $nick]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+switch $type {
+anticolor {
+	set textfind "\003" 
+}
+
+antibold  {
+	set textfind "\002"
+}
+
+antiunderline {
+	set textfind "\037"
+	}	
+}
+if {[string match "*$textfind*" $arg]} {
+	blacktools:banner:1 $nick [string toupper "$type"] $chan $host [get:banmethod $type $chan] [link:chan:get $chan]	
+	return 1	
+	}	
+}
+
+proc anticolor:protect {nick host hand chan arg} {
+	colortext:process $nick $host $hand $chan $arg "anticolor"
+}
+
+############################# AntiBold ################################
+
+proc antibold:protect {nick host hand chan arg} {
+	colortext:process $nick $host $hand $chan $arg "antibold"
+}
+
+############################ AntiUnderline ###############################
+
+proc antiunderline:protect {nick host hand chan arg} {
+	colortext:process $nick $host $hand $chan $arg "antiunderline"
+}
+
+############################## AntiCaps #################################
+
+proc anticaps:protect {nick host hand chan arg} {
+global black botnick
+	set handle [nick2hand $nick]
+	set found_caps 0
+if {![validchan $chan]} { return }
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+if {[isbotnick $nick]} { return }
+	set caps($nick:$host) 0
+foreach word [split $arg {}] {
+if [string match \[A-Z\] $word] {
+	incr caps($nick:$host)
+	}
+}
+
+if {$caps($nick:$host) == 0} {
+  return
+}
+
+if {[string length $arg] < 20} {return}
+	set capchar [string length $arg]
+if {[expr 100 * $caps($nick:$host) / $capchar] > $black(anticapscount)} {
+	set found_caps 1
+}
+if {$found_caps == "1"} {
+	blacktools:banner:1 $nick "ANTICAPS" $chan $host [get:banmethod "anticaps" $chan] [link:chan:get $chan]	
+	return 1	
+	}
+}
+
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 92 - 0
BlackTools2.5.2/Protections/BT.antibadword.tcl

@@ -0,0 +1,92 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+########################   ANTIBADWORD TCL   ############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc antibadword:protect {nick host hand chan arg} {
+global black botnick username
+	if {![validchan $chan]} { return }
+	set handle [nick2hand $nick]
+	set found_word ""
+	set text [color:filter [split $arg]]
+	set split_check ""
+	set get_pers ""
+if {![validchan $chan]} { return }
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+if {[isbotnick $nick]} { return }
+	set text [check:except $text $chan $black(antibadword) $black(except_badwords) "BADWORD"]
+	set check_word [check:file:word $chan $text "BADWORD"]
+if {$check_word != ""} {
+if {[regexp {[:]} $check_word]} {
+	set split_check [split $check_word ":"]
+	set check_word [join [lindex $split_check 0]]
+	set get_pers [lindex $split_check 1]
+}
+if {$get_pers != ""} {
+	blacktools:banner:1 $nick "ANTIBADWORD:$check_word" $chan $host [get:banmethod "antibadword:$get_pers" $chan] [link:chan:get $chan]
+} else {
+	blacktools:banner:1 $nick "ANTIBADWORD:$check_word" $chan $host [get:banmethod "antibadword" $chan] [link:chan:get $chan]
+}	
+	return
+}
+foreach antibadword [string tolower $black(antibadword)] {
+if {[regexp {[:]} $antibadword]} {
+	set split_check [split $antibadword ":"]
+	set badword [join [lindex $split_check 0]]
+} else { set badword $antibadword }
+if {[string match -nocase $badword $text]} {
+	set found_word $badword
+if {$split_check != ""} {
+	set get_pers [lindex $split_check 1]
+				}
+	continue
+			}
+		}
+if {$found_word != ""} {
+if {$get_pers != ""} {
+	blacktools:banner:1 $nick "ANTIBADWORD:$found_word" $chan $host [get:banmethod "antibadword:$get_pers" $chan] [link:chan:get $chan]
+} else {
+	blacktools:banner:1 $nick "ANTIBADWORD:$found_word" $chan $host [get:banmethod "antibadword" $chan] [link:chan:get $chan]		
+}	
+	return 1	
+	}
+}
+
+proc badword:module {nick host hand chan arg} {
+	global black lastbind
+	set type 0
+	set chan1 "$chan"
+	set why [lindex [split $arg] 0]
+	set badw [join [lrange [split $arg] 1 end]]
+	set number [lindex [split $arg] 1]
+if {[regexp {^[&#]} $why] && [matchattr $hand nmo|M $why]} {
+	set chan "$why"
+	set why [lindex [split $arg] 1]
+	set badw [join [lrange [split $arg] 2 end]]
+	set number [lindex [split $arg] 2]
+}
+	set return [blacktools:mychar $lastbind $hand]
+if {$return == "0"} {
+		return
+}
+	prot:module:process $nick $host $hand $chan $chan1 $why $badw $type $number "badword"
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 57 - 0
BlackTools2.5.2/Protections/BT.antichanflood.tcl

@@ -0,0 +1,57 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+#######################   ANTICHANFLOOD TCL   ###########################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc antifloodchan:protect {nick host hand chan arg} {
+global black
+if {![validchan $chan]} { return }
+	set handle [nick2hand $nick]
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+if {[isbotnick $nick]} { return  }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+	set getset [setting:get $chan chanflood]
+if {$getset == ""} { set getset "$black(antichanfloodrepeats)" }
+	set number [scan $getset %\[^:\]]
+	set time [scan $getset %*\[^:\]:%s]
+if {![info exists black(repeat:$host:$chan:flood)]} { 
+	set black(repeat:$host:$chan:flood) 0 
+}
+foreach tmr [utimers] {
+if {[string match "*chanflood:unset $host $chan*" [join [lindex $tmr 1]]]} {
+	killutimer [lindex $tmr 2]
+	}
+}
+	incr black(repeat:$host:$chan:flood)
+	utimer $time [list chanflood:unset $host $chan]
+if {$black(repeat:$host:$chan:flood) >= $number} {
+	blacktools:banner:1 $nick "ANTICHANFLOOD" $chan $host [get:banmethod "antichanflood" $chan] [link:chan:get $chan]
+	chanflood:unset $host $chan
+	return 1
+	}
+}
+
+proc chanflood:unset {host chan} {
+	global black
+if {[info exists black(repeat:$host:$chan:flood)]} { 
+	unset black(repeat:$host:$chan:flood)
+	}
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 35 - 0
BlackTools2.5.2/Protections/BT.antictcp.tcl

@@ -0,0 +1,35 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+##########################   ANTICTCP TCL   #############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc antictcp:protect {nick host hand chan keyword arg} {
+global black botnick
+if {![validchan $chan]} { return }
+if {[setting:get $chan antictcp]} {
+	set handle [nick2hand $nick]
+if {[string equal -nocase "action" $keyword] || [string equal -nocase "chat" $keyword]} {return}
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return}
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+if {[isbotnick $nick]} { return }
+	blacktools:banner:1 $nick "ANTICTCP" $chan $host [get:banmethod "antictcp" $chan] [link:chan:get $chan]
+	}
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 121 - 0
BlackTools2.5.2/Protections/BT.antijoinflood.tcl

@@ -0,0 +1,121 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+#######################   ANTIJOINFLOOD TCL   ###########################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc joinflood:unlock {chan modes} {
+	global black
+	putquick "MODE $chan -$modes"
+if {[info exists black(floodjoin:on:$chan)]} {
+	unset black(floodjoin:on:$chan)
+	}
+}
+
+proc joinflood:unset {chan} {
+	global black
+if {[info exists black(antijoinflood:$chan)]} {
+	unset black(antijoinflood:$chan)
+	}
+}
+
+proc joinflood:unset:host {chan host} {
+	global black
+if {[info exists black(antijoinflood:$host:$chan)]} {
+	unset black(antijoinflood:$host:$chan)
+	}
+}
+
+proc joinflood:protect {nick host hand chan} {
+global black
+if {[setting:get $chan antijoinflood]} {
+if {[isbotnick $nick]} { return }
+	set check_webchat [check:webchat $host]
+if {$check_webchat == "1"} {
+	set ident [lindex [split $host "@"] 0]
+	set host "*!$ident@*"
+}
+	set user_getset [setting:get $chan antijoinflood-userset]
+	set getset [setting:get $chan joinflood]
+if {$user_getset == ""} { set user_getset $black(antijoinflood_user_joins) }
+if {$getset == ""} { set getset $black(joinflood:protect) }
+	set user_num [scan $user_getset %\[^:\]]
+	set user_time [scan $user_getset %*\[^:\]:%s]
+	set num [scan $getset %\[^:\]]
+	set time [scan $getset %*\[^:\]:%s]
+	set replace(%chan%) $chan
+	
+if {![info exists black(floodjoin:on:$chan)]} {
+foreach tmr [utimers] {
+if {[string match "*black(antijoinflood:$chan)*" [join [lindex $tmr 1]]]} {
+	killutimer [lindex $tmr 2]
+	}
+}
+if {![info exists black(antijoinflood:$chan)]} { 
+	set black(antijoinflood:$chan) 0 
+}
+	incr black(antijoinflood:$chan)
+	utimer $time [list joinflood:unset $chan]
+if {$black(antijoinflood:$chan) >= "$num"} {
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+	set black(floodjoin:on:$chan) 1
+	set modes [joinflood:getmodes $chan]
+if {$modes != ""} {
+	putquick "MODE $chan +$modes" ; utimer $black(nomodetime) [list joinflood:unlock $chan $modes]
+}
+if {$black(fjoinhow) == "1"} {
+	set getlang [string tolower [setting:get $chan lang]]
+if {$getlang == ""} { set getlang "[string tolower $black(default_lang)]" }
+	set getmessage $black(say.$getlang.antijoinflood.2)
+	set message [string map [array get replace] $getmessage]
+	puthelp "NOTICE @$chan :$message"
+				}
+			}
+		}
+foreach tmr [utimers] {
+if {[string match "*black(antijoinflood:$host:$chan)*" [join [lindex $tmr 1]]]} {
+	killutimer [lindex $tmr 2]
+	}
+}
+if {![info exists black(antijoinflood:$host:$chan)]} { 
+	set black(antijoinflood:$host:$chan) 0 
+}
+	incr black(antijoinflood:$host:$chan)
+	utimer $user_time [list joinflood:unset:host $chan $host]
+if {$black(antijoinflood:$host:$chan) >= "$user_num"} {
+	blacktools:banner:2 $nick "ANTIJOINFLOOD" $chan $chan $host "0"
+	who:chan $chan
+if {[info exists black(antijoinflood:$host:$chan)]} {
+	unset black(antijoinflood:$host:$chan)
+			}
+		}	
+	}
+}
+
+proc joinflood:getmodes {chan} {
+	global black
+	set current_modes [getchanmode $chan]
+	set putmode ""
+	set chanmodes [string map {"+" ""} [split [lindex $current_modes 0] ""]]
+foreach mod [split $black(modes) ""] {
+if {[lsearch $chanmodes $mod] < 0} {
+	lappend putmode $mod
+	}
+}
+	return $putmode	
+}
+	
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 37 - 0
BlackTools2.5.2/Protections/BT.antilongtext.tcl

@@ -0,0 +1,37 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+########################   ANTILONGTEXT TCL   ###########################
+#########################################################################
+##						                          					   ##
+##   BlackTools  : http://blacktools.tclscripts.net	                   ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	                   ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                              					   ##
+#########################################################################
+
+proc antilongtext:protect {nick host hand chan arg} {
+global black botnick
+if {![validchan $chan]} { return }
+	set handle [nick2hand $nick]
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+if {[isbotnick $nick]} { return } 
+	set getlongchar [setting:get $chan antilongtextmax]
+if {$getlongchar == ""} { set getlongchar "$black(longchar)" }
+if {[string length $arg] >= $getlongchar} {
+	blacktools:banner:1  $nick "ANTILONGTEXT" $chan $host [get:banmethod "antilongtext" $chan] [link:chan:get $chan]
+	return 1	
+	}
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 35 - 0
BlackTools2.5.2/Protections/BT.antinotice.tcl

@@ -0,0 +1,35 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+#########################   ANTINOTICE TCL   ############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc antinotice:protect {nick host hand arg chan} {
+global black botnick
+if {![validchan $chan]} { return }
+if {[setting:get $chan antinotice]} {
+	set handle [nick2hand $nick]
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+if {[isbotnick $nick]} { return }
+if {[string equal -nocase $chan $botnick]} { return }
+	blacktools:banner:1 $nick "ANTINOTICE" $chan $host [get:banmethod "antinotice" $chan] [link:chan:get $chan]
+	}
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 105 - 0
BlackTools2.5.2/Protections/BT.antipub.tcl

@@ -0,0 +1,105 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+##########################   ANTIPUB TCL   ##############################
+#########################################################################
+##						                      						   ##
+##   BlackTools  : http://blacktools.tclscripts.net		               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	  	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                              					   ##
+#########################################################################
+
+proc antipub:protect {nick host hand chan arg} {
+global black botnick
+	set text [color:filter [split $arg]]
+	set found_pub 0
+	set handle [nick2hand $nick]
+	set found_pub ""
+	set banword ""
+if {![validchan $chan]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+	set text [check:except $text $chan $black(antipubword) $black(antipubexcept) "ANTIPUB"]
+	set check_word [check:file:word $chan $text "ANTIPUB"]
+if {$check_word != ""} {
+	blacktools:banner:1 $nick "ANTIPUB:$check_word" $chan $host [get:banmethod "antipub" $chan] [link:chan:get $chan]
+	return 1
+}
+
+foreach antipub [string tolower $black(antipubword)] {
+if {[string match -nocase $antipub $text]} {
+	set found_pub $antipub
+			}
+		}
+if {$found_pub != ""} {
+	blacktools:banner:1 $nick "ANTIPUB:$found_pub" $chan $host [get:banmethod "antipub" $chan] [link:chan:get $chan]
+	return 1
+	}
+}
+
+proc check:except {text chan type except prot} {
+	global black
+	set text [split $text]
+	set counter_word 0
+	set counter_except 0
+	set found_it 0
+	
+foreach ex $except {
+	set position [lsearch -exact [string tolower $text] [string tolower $ex]]
+if {$position > -1} {
+	set text [lreplace $text $position $position]
+	}	
+}
+	set file [open $black(add_file) r]
+	set size [file size $black(add_file)]
+	set data [split [read $file $size] \n]
+	close $file
+foreach line $data {
+if {$line != ""} {
+	set channel [lindex [split $line] 0]
+	set getype [lindex [split $line] 1]
+	set link [join [lrange [split $line] 3 end]]
+foreach word $text {
+if {[string equal -nocase $channel $chan] && [string equal -nocase $getype $prot] && [regexp {^[+]} $link] && [string match -nocase [string map {"+" ""} $link] $word]} {
+	set position [lsearch -exact [string tolower $text] [string tolower $word]]
+if {$position > -1} {
+	set text [lreplace $text $position $position]
+				}
+			}
+		}
+	}
+}
+	return $text
+}
+
+proc antipub:module {nick host hand chan arg} {
+	global black lastbind
+	set type 0
+	set chan1 "$chan"
+	set why [lindex [split $arg] 0]
+	set except [join [lrange [split $arg] 1 end]]
+	set number [lindex [split $arg] 1]
+if {[regexp {^[&#]} $why] && [matchattr $hand nmo|M $why]} {
+	set chan "$why"
+	set why [lindex [split $arg] 1]
+	set except [join [lrange [split $arg] 2 end]]
+	set number [lindex [split $arg] 2]
+}
+	set return [blacktools:mychar $lastbind $hand]
+if {$return == "0"} {
+		return
+}
+	prot:module:process $nick $host $hand $chan $chan1 $why $except $type $number "antipub"
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 71 - 0
BlackTools2.5.2/Protections/BT.antirepeat.tcl

@@ -0,0 +1,71 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+########################   ANTIREPEAT TCL   #############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc antirepeat:protect {nick host hand chan arg} {
+global black botnick
+	set arg [color:filter [join [split $arg]]]
+	set handle [nick2hand $nick]
+if {![validchan $chan]} { return }
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+if {[isbotnick $nick]} { return }
+	set repeatset [setting:get $chan antirepeat-setting]
+if {$repeatset == ""} { set repeatset "$black(antirepeat:repeats)" }
+	set number [scan $repeatset %\[^:\]]
+	set time [scan $repeatset %*\[^:\]:%s]
+foreach tmr [utimers] {
+if {[string match "*antirepeat:remove $host $chan $arg*" [join [lindex $tmr 1]]]} {
+	killutimer [lindex $tmr 2]
+	}	
+}
+
+if {![info exists black(repeat:$host:$chan:$arg)]} { 
+	set black(repeat:$host:$chan:$arg) 0 
+}
+	incr black(repeat:$host:$chan:$arg)
+	utimer $time [list antirepeat:remove $host $chan $arg]
+
+if {$black(repeat:$host:$chan:$arg) >= $number} {
+	blacktools:banner:1 $nick "ANTIREPEAT" $chan $host [get:banmethod "antirepeat" $chan] [link:chan:get $chan]
+	antirepeat:remove $host $chan $arg
+	return 1
+	}
+}
+
+proc antirepeat:remove {host chan arg} {
+	global black
+	
+foreach tmr [utimers] {
+if {[string match "*antirepeat:remove $host $chan $arg*" [join [lindex $tmr 1]]]} {
+	killutimer [lindex $tmr 2]
+	}	
+}
+
+if {[info exists black(repeat:$host:$chan:$arg)]} {
+	unset black(repeat:$host:$chan:$arg)
+	}
+}
+
+proc antirepeat:protect:me {nick host hand chan keyword arg} {
+	antirepeat:protect $nick $host $hand $chan $arg
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 163 - 0
BlackTools2.5.2/Protections/BT.antispam.tcl

@@ -0,0 +1,163 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+##########################   ANTISPAM TCL   #############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc antispam:protect {nick host hand arg} {
+global botnick black
+	set text [color:filter $arg]
+	set text [antispam:except $text]
+	set handle [nick2hand $nick]
+	set found_spam ""
+	set channels ""
+foreach spammer [string tolower $black(spamword)] { 
+if {[string match -nocase $spammer $text]} {
+	set found_spam $spammer
+	}
+}
+if {$found_spam == ""} { return }
+foreach chans [channels] {
+	set chan1 $chans
+if {![validchan $chans]} { return }
+if {[matchattr $handle $black(exceptflags) $chans]} { return }
+	set bl_protect [blacktools:protect $nick $chans]
+if {$bl_protect == "1"} { return }
+if {[setting:get $chans antispam]} {
+if {[onchan $nick $chans]} {
+if {![botisop $chans] && ![setting:get $chans xonly]} { return }
+if {[isbotnick $nick]} { return }
+	lappend channels $chans
+if {[link:status $chans] == "1"} {
+	foreach c [link:chan:get $chans] {
+	lappend channels $c
+					}
+				}
+			}
+		}
+	}
+	if {$channels != ""} {
+	antispam:act:ban [join $channels] 0 $nick $host $found_spam
+	}
+}
+
+proc antispam:act:ban {channels num nick host found_spam} {
+	global black
+	set chan [join [lindex [split $channels] $num]]
+	set inc 0
+if {$chan == ""} {
+	return
+}
+if {[onchan $nick $chan]} {
+	blacktools:banner:2 $nick "ANTISPAM:$found_spam" $chan $chan $host "0"
+	who:chan $chan
+}
+	set inc [expr $num + 1]
+if {[lindex $channels $inc] != ""} {
+	utimer 5 [list antispam:act:ban $channels $inc $nick $host $found_spam]
+	}
+}
+
+proc antispam:except {text} {
+	global black botnick
+	set text [split $text]
+foreach t $text {
+if {[validchan $t] && [onchan $botnick $t] && [setting:get $t antispam]} {
+	set position [lsearch -exact [string tolower $text] [string tolower $t]]
+if {$position > -1} {
+	set text [lreplace $text $position $position]
+			}
+		}
+	}
+	return $text
+}
+
+proc antispam:protect:msg {nick host hand chan} {
+global black
+if {![validchan $chan]} { return }
+if {[setting:get $chan antispam]} {
+if {[isbotnick $nick]} { return }
+if {[info exists black(turnOnFlood:$chan)]} {
+	return
+}
+if {[setting:get $chan spamjoinmessage]} {
+if {[matchattr $hand $black(exceptflags) $chan]} { return }
+	set getmsg [setting:get $chan antispam-message]
+if {$getmsg == ""} { 
+	set getlang [string tolower [setting:get $chan lang]]
+if {$getlang == ""} { set getlang "[string tolower $black(default_lang)]" }
+	set getmsg $black(say.$getlang.antispam.2)
+}
+	set replace(%nick%) $nick
+	set replace(%chan%) $chan
+	set text [black:color:set "" $getmsg]
+	set reply [join $text]
+	set reply [string map [array get replace] $reply]
+	puthelp "PRIVMSG $nick :$reply"
+		} 
+	}
+}
+
+proc antispam:protect:cycle {channels} {
+global black
+	set chans ""
+foreach chan $channels {
+if {![channel get $chan inactive]} {
+	lappend chans $chan
+		}
+	}
+if {$chans != ""} {
+	antispam:act $chans 0
+	}
+}
+
+proc antispam:act {channels counter} {
+	global black
+	set notcycle 0
+	set chan [join [lindex [split $channels] $counter]]
+	set cc [expr $counter + 1]
+if {[info exists black(lastaction:$chan)]} {
+	set total_anunt 0
+	set unixtime [unixtime]
+if {[setting:get $chan antispam-scantime] != ""} {
+	set return_time [time_return_minute [setting:get $chan antispam-scantime]]
+} else {
+	set return_time [time_return_minute $black(spamcycle)]
+}
+	set time [expr [expr [expr $return_time * $black(entry:shown)] * 60] + $unixtime]
+if {[expr $unixtime - $black(lastaction:$chan)] > [expr $time - $unixtime]} {
+	set notcycle 1
+	}
+} else { set notcycle 1 }
+if {$notcycle != "1"} {
+	set getlang [string tolower [setting:get $chan lang]]
+if {$getlang == ""} { set getlang "[string tolower $black(default_lang)]" }
+	set reason $black(say.$getlang.antispam.3)
+	set len [llength $reason] 
+    set random [expr int(rand()*$len)] 
+    set reason [lindex $reason $random]
+	set text [black:color:set "" $reason]
+	set reply [join $text]
+	putserv "PART $chan :$reply"; putserv "JOIN $chan"
+	}
+if {[lindex $channels $cc] == ""} {
+	return
+	} else {
+	utimer 10 [list antispam:act $channels $cc]
+	}
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 73 - 0
BlackTools2.5.2/Protections/BT.badhost.tcl

@@ -0,0 +1,73 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+##########################   BADHOST TCL   ##############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc badhost:protect {nick host hand chan} {
+global black botnick
+	set uhost [lindex [split $host @] 1]
+	set chan1 $chan
+	set found_bad ""
+if {![validchan $chan]} { return }
+if {[setting:get $chan badhost]} {
+if {[matchattr $hand $black(exceptflags) $chan]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+	set gethost [check:except $uhost $chan $black(badhostword) $black(badhostexcept) "BADHOST"]
+	set check_word [check:file:word $chan $gethost "BADHOST"]
+if {$check_word != "0"} {
+	set found_bad $check_word
+}
+foreach badhost [string tolower $black(badhostword)] {
+if {[string match -nocase $badhost $gethost]} {
+	set found_bad $badhost
+			}
+		}
+if {$found_bad != ""} {
+	blacktools:banner:2 $nick "BADHOST:$found_bad" $chan $chan1 $host "0"
+if {[link:status $chan] == "1"} {
+	foreach c [link:chan:get $chan] {
+	blacktools:banner:2 $nick "BADHOST:$found_bad" $c $c $host "1"
+				}
+	blacktools:link_ban2 [link:get] 0
+			} else { who:chan $chan }
+		}
+	}	
+}
+
+proc badhost:module {nick host hand chan arg} {
+	global black lastbind
+	set type 0
+	set chan1 "$chan"
+	set why [lindex [split $arg] 0]
+	set badh [join [lrange [split $arg] 1 end]]
+	set number [lindex [split $arg] 1]
+if {[regexp {^[&#]} $why] && [matchattr $hand nmo|M $why]} {
+	set chan "$why"
+	set why [lindex [split $arg] 1]
+	set badh [join [lrange [split $arg] 2 end]]
+	set number [lindex [split $arg] 2]
+}
+	set return [blacktools:mychar $lastbind $hand]
+if {$return == "0"} {
+		return
+}
+	prot:module:process $nick $host $hand $chan $chan1 $why $badh $type $number "badhost"
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 72 - 0
BlackTools2.5.2/Protections/BT.badident.tcl

@@ -0,0 +1,72 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+##########################   BADIDENT TCL   #############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc badident:protect:join {nick host hand chan} {
+global black botnick
+	set found_ident ""
+if {![validchan $chan]} { return }
+if {[setting:get $chan badident]} {
+	set chan1 $chan
+if {[matchattr $hand $black(exceptflags) $chan]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+	set ident "[string map {"~" ""} [string tolower [lindex [split $host "@"] 0]]]"
+	set text [check:except $ident $chan $black(badidentwords) $black(badidentexcept) "BADIDENT"]
+	set check_word [check:file:word $chan $text "BADIDENT"]
+if {$check_word != "0"} {
+	set found_ident $check_word
+}
+foreach bit $black(badidentwords) {
+if {[string match -nocase $bit $text]} {		
+	set found_ident $bit
+			}
+		}
+if {$found_ident != ""} {
+	blacktools:banner:2 $nick "BADIDENT:$found_ident" $chan $chan1 $host "0"
+if {[link:status $chan] == "1"} {
+	foreach c [link:chan:get $chan] {
+	blacktools:banner:2 $nick "BADIDENT:$found_ident" $c $c $host "1"
+				}
+	blacktools:link_ban2 [link:get] 0
+			} else { who:chan $chan }	
+		}
+	}
+}
+
+proc badident:module {nick host hand chan arg} {
+	global black lastbind
+	set type 0
+	set chan1 "$chan"
+	set why [lindex [split $arg] 0]
+	set badi [join [lrange [split $arg] 1 end]]
+	set number [lindex [split $arg] 1]
+if {[regexp {^[&#]} $why] && [matchattr $hand nmo|M $why]} {
+	set chan "$why"
+	set why [lindex [split $arg] 1]
+	set badi [join [lrange [split $arg] 2 end]]
+	set number [lindex [split $arg] 2]
+}
+	set return [blacktools:mychar $lastbind $hand]
+if {$return == "0"} {
+		return
+}
+	prot:module:process $nick $host $hand $chan $chan1 $why $badi $type $number "badident"
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 172 - 0
BlackTools2.5.2/Protections/BT.badnick.tcl

@@ -0,0 +1,172 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+###########################   BADNICK TCL   #############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc badnick:protect:join {nick host hand chan} {
+global black botnick
+	set found_nick ""
+if {![validchan $chan]} { return }
+	set chan1 $chan
+if {[setting:get $chan badnick]} {
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+if {[matchattr $hand $black(exceptflags) $chan]} { return }
+	set getnick [check:except $nick $chan $black(badnickwords) $black(badnickexcept) "BADNICK"]
+	set check_word [check:file:word $chan $getnick "BADNICK"]
+if {$check_word != "0"} {
+	set found_nick $check_word
+} else {
+foreach badnick [string tolower $black(badnickwords)] {
+if {[string match -nocase $badnick $getnick]} {
+	set found_nick $badnick
+			}
+		}
+	}
+if {$found_nick != ""} {
+	set getlang [string tolower [setting:get $chan lang]]
+if {$getlang == ""} { set getlang "[string tolower $black(default_lang)]" }
+if {[setting:get $chan badnick-bmethod] == ""} {
+	set bmethod $black(badnbanmethod)
+} else { set bmethod [setting:get $chan badnick-bmethod] }
+
+if {$bmethod == "2"} {
+	blacktools:banner:2 $nick "BADNICK:$found_nick" $chan $chan1 $host "0"
+if {[link:status $chan] == "1"} {
+	foreach c [link:chan:get $chan] {
+	blacktools:banner:2 $nick "BADNICK:$found_nick" $c $c $host "1"
+					}
+	blacktools:link_ban2 [link:get] 0
+				} else { who:chan $chan }
+	return
+			}
+	foreach tmr [utimers] {
+if {[string match "*badnick:check:again $nick $chan*" [join [lindex $tmr 1]]]} {
+	killutimer [lindex $tmr 2]
+	}
+}
+if {[setting:get $chan badnick-banwait] == ""} {
+	set wait_time $black(badnbanwait)
+	utimer $black(badnbanwait) [list badnick:check:again $nick $chan $host]
+} else {
+	set wait_time [setting:get $chan badnick-banwait]
+	utimer $wait_time [list badnick:check:again $nick $chan $host]
+}
+	set text [black:color:set "" $black(say.$getlang.badnick.10)]
+	set reply [join $text]
+	set replace(%time%) $wait_time
+	set message [string map [array get replace] $reply]
+	putquick "PRIVMSG $nick :\[$chan\] $message"
+		}			
+	}
+}
+
+proc badnick:check:again {nick chan host} {
+	global black
+if {[onchan $nick $chan]} {
+	blacktools:banner:2 $nick "BADNICK:$nick" $chan $chan $host "0"
+if {[link:status $chan] == "1"} {
+	foreach c [link:chan:get $chan] {
+	blacktools:banner:2 $nick "BADNICK:$nick" $c $c $host "1"
+			}
+	blacktools:link_ban2 [link:get] 0
+		} else { who:chan $chan }
+	}
+}
+
+proc badnick:protect:change {nick host hand chan newnick} {
+global black botnick
+	set handle [nick2hand $nick]
+	set found_nick ""
+if {![validchan $chan]} { return }
+if {[setting:get $chan badnick]} {
+	set chan1 $chan
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+	set newnick [check:except $newnick $chan $black(badnickwords) $black(badnickexcept) "BADNICK"]
+	set check_word [check:file:word $chan $newnick "BADNICK"]
+if {$check_word != "0"} {
+	set found_nick $check_word
+}
+foreach badnick [string tolower $black(badnickwords)] {
+if {[string match $badnick [string tolower $newnick]]} {
+	set found_nick $badnick
+			}
+		}
+if {$found_nick != ""} {
+	set getlang [string tolower [setting:get $chan lang]]
+if {$getlang == ""} { set getlang "[string tolower $black(default_lang)]" }
+if {[setting:get $chan badnick-bmethod] == ""} {
+	set bmethod $black(badnbanmethod)
+} else { set bmethod [setting:get $chan badnick-bmethod] }
+
+if {$bmethod == "2"} {
+	blacktools:banner:2 $newnick "BADNICK:$found_nick" $chan $chan $host "0"
+if {[link:status $chan] == "1"} {
+	foreach c [link:chan:get $chan] {
+	blacktools:banner:2 $newnick "BADNICK:$found_nick" $c $c $host "1"			
+					}
+	blacktools:link_ban2 [link:get] 0
+				} else { who:chan $chan }
+	return
+				}
+foreach tmr [utimers] {
+if {[string match "*badnick:check:again $newnick $chan*" [join [lindex $tmr 1]]]} {
+	killutimer [lindex $tmr 2]
+	}
+}
+if {[setting:get $chan badnick-banwait] == ""} {
+	set wait_time $black(badnbanwait)
+	utimer $black(badnbanwait) [list badnick:check:again $newnick $chan $host]
+} else {
+	set wait_time [setting:get $chan badnick-banwait]
+	utimer $wait_time [list badnick:check:again $newnick $chan $host]
+}
+	set text [black:color:set "" $black(say.$getlang.badnick.10)]
+	set reply [join $text]
+	set replace(%time%) $wait_time
+	set message [string map [array get replace] $reply]
+	putquick "PRIVMSG $newnick :\[$chan\] $message"
+		}		
+	}
+}
+
+
+proc badnick:module {nick host hand chan arg} {
+	global black lastbind
+	set type 0
+	set chan1 "$chan"
+	set why [lindex [split $arg] 0]
+	set badn [join [lrange [split $arg] 1 end]]
+	set number [lindex [split $arg] 1]
+if {[regexp {^[&#]} $why] && [matchattr $hand nmo|M $why]} {
+	set chan "$why"
+	set why [lindex [split $arg] 1]
+	set badn [join [lrange [split $arg] 2 end]]
+	set number [lindex [split $arg] 2]
+}
+	set return [blacktools:mychar $lastbind $hand]
+if {$return == "0"} {
+		return
+}
+	prot:module:process $nick $host $hand $chan $chan1 $why $badn $type $number "badnick"
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 89 - 0
BlackTools2.5.2/Protections/BT.badrealname.tcl

@@ -0,0 +1,89 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+#########################   BADREALNAME TCL   ###########################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc badrealname:protect:join {nick host hand chan} {
+global botnick black
+	set ::cchan $chan
+	set ::nnick $nick
+	set ::hhost $host
+	set handle [nick2hand $nick]
+if {[setting:get $chan badrealname]} {
+if {[isbotnick $nick]} {
+	return
+}
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+if {[onchan $nick $chan]} {
+	putquick "WHOIS $nick"
+	bind RAW - 311 badrealname:protect
+		}
+	}
+}
+
+proc badrealname:protect { from keyword arguments } {
+global botnick black
+	set chan $::cchan
+	set nick $::nnick	
+	set host $::hhost
+	set chan1 $chan
+	set found_realname ""
+	set fullname [string range [join [lrange [split $arguments] 5 end]] 1 end]
+	set text [check:except $fullname $chan $black(badfwords) $black(badfexcept) "BADREALNAME"]
+	set check_word [check:file:word $chan $text "badrealname"]
+if {$check_word != "0"} {
+	set found_realname $check_word
+}
+  foreach realname $black(badfwords) {
+if {[string match -nocase $realname $text]} {
+	set found_realname $realname
+	}
+}
+if {$found_realname != ""} {
+	blacktools:banner:2 $nick "badrealname:$found_realname" $chan $chan1 $host "0"
+if {[link:status $chan] == "1"} {
+	foreach c [link:chan:get $chan] {
+	blacktools:banner:2 $nick "badrealname:$found_realname" $c $c $host "1"
+		}
+	blacktools:link_ban2 [link:get] 0
+	} else { who:chan $chan }
+}
+	unbind RAW - 311 badrealname:protect
+}
+
+proc badrealname:module {nick host hand chan arg} {
+	global black lastbind
+	set type 0
+	set chan1 "$chan"
+	set why [lindex [split $arg] 0]
+	set badf [join [lrange [split $arg] 1 end]]
+	set number [lindex [split $arg] 1]
+if {[regexp {^[&#]} $why] && [matchattr $hand nmo|M $why]} {
+	set chan "$why"
+	set why [lindex [split $arg] 1]
+	set badf [join [lrange [split $arg] 2 end]]
+	set number [lindex [split $arg] 2]
+}
+	set return [blacktools:mychar $lastbind $hand]
+if {$return == "0"} {
+		return
+}
+	prot:module:process $nick $host $hand $chan $chan1 $why $badf $type $number "badrealname"
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 91 - 0
BlackTools2.5.2/Protections/BT.inviteban.tcl

@@ -0,0 +1,91 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+##########################   INVITEBAN TCL   ############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc inviteban:protect {from type arg} {
+	global black
+	set invitechan [lindex [split $arg] 1]
+	set ::invitechan $invitechan
+if {[string match -nocase "*!*" $from]} {
+	set split_from [split $from "!"]
+	set from_nick [lindex [split $split_from] 0]
+if {[string equal -nocase $from_nick $black(chanserv)]} {
+	return
+}
+	putserv "USERHOST :$from_nick"
+	bind RAW - 302 inviteban:gethost
+	return
+}
+if {[string equal -nocase $from $black(chanserv)]} {
+	return
+}
+	putserv "USERHOST :$from"
+	bind RAW - 302 inviteban:gethost
+}
+
+proc inviteban:gethost {from keyword arguments} {
+	global black
+	set invitechan $::invitechan
+	set hostname [lindex [split $arguments] 1]
+	set channels ""
+if {[regexp {\+} $hostname]} {
+	set split_host [split $hostname "+"]
+} else {
+	set split_host [split $hostname "-"]
+}
+	set mask [lindex $split_host 1]
+	set getnick [string map {
+			"=" ""
+			":" ""
+			} [lindex $split_host 0]]
+if {$getnick != ""} {
+foreach chan [channels] {
+	set bl_protect [blacktools:protect $getnick $chan]
+if {$bl_protect == "1"} { continue }
+if {[matchattr [nick2hand $getnick] $black(exceptflags) $chan]} {
+	continue
+}
+	lappend channels $chan
+		}
+	}
+if {$channels != ""} {
+	inviteban:act $channels 0 $mask $invitechan $getnick
+}
+	check:if:bind "inviteban:gethost" "302"
+}
+
+proc inviteban:act {channels num mask invitechan nick} {
+	global black
+	set chan [join [lindex [split $channels] $num]]
+	set inc 0
+if {$chan == ""} {
+	return
+}
+if {[setting:get $chan inviteban]} {
+if {[onchan $nick $chan]} {
+	blacktools:banner:2 $nick "INVITEBAN:[encoding convertto utf-8 $invitechan]" $chan $chan $mask "0"
+	who:chan $chan
+	}
+}
+	set inc [expr $num + 1]
+if {[lindex $channels $inc] != ""} {
+	utimer 5 [list inviteban:act $channels $inc $mask $invitechan $nick]
+	}
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 64 - 0
BlackTools2.5.2/Protections/BT.nickflood.tcl

@@ -0,0 +1,64 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+##########################   NICKFLOOD TCL   ############################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc nickflood:protect {nick host hand chan arg} {
+global black
+if {![validchan $chan]} { return }
+if {[setting:get $chan nickflood]} {
+	set handle [nick2hand $nick]
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+if {[isbotnick $nick]} { return  }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+	set getset [setting:get $chan nickflood-repeat]
+if {$getset == ""} { set getset "$black(nickfloodrepeats)" }
+	set number [scan $getset %\[^:\]]
+	set time [scan $getset %*\[^:\]:%s]
+if {![info exists black(nick:$host:$chan:flood)]} { 
+	set black(nick:$host:$chan:flood) 0 
+}
+foreach tmr [utimers] {
+if {[string match "*nickflood:unset $host $chan*" [join [lindex $tmr 1]]]} {
+	killutimer [lindex $tmr 2]
+	}
+}
+	incr black(nick:$host:$chan:flood)
+	utimer $time [list nickflood:unset $host $chan]
+if {$black(nick:$host:$chan:flood) >= $number} {
+	blacktools:banner:1 $nick "NICKFLOOD:$arg" $chan $host [get:banmethod "nickflood" $chan] [link:chan:get $chan]
+	nickflood:unset $host $chan
+		}
+	}
+}
+
+
+proc nickflood:unset {host chan} {
+	global black
+foreach tmr [utimers] {
+if {[string match "*nickflood:unset $host $chan*" [join [lindex $tmr 1]]]} {
+	killutimer [lindex $tmr 2]
+	}
+}
+if {[info exists black(nick:$host:$chan:flood)]} { 
+	unset black(nick:$host:$chan:flood)
+	}
+}
+
+##############
+#########################################################################
+##   END                                                               ##
+#########################################################################

+ 50 - 0
BlackTools2.5.2/Protections/BT.repetitivechars.tcl

@@ -0,0 +1,50 @@
+#########################################################################
+##          BlackTools - The Ultimate Channel Control Script           ##
+##                    One TCL. One smart Eggdrop                       ##
+#########################################################################
+#######################   RepetitiveChars TCL   #########################
+#########################################################################
+##						                       ##
+##   BlackTools  : http://blacktools.tclscripts.net	               ##
+##   Bugs report : http://www.tclscripts.net/	                       ##
+##   GitHub page : https://github.com/tclscripts/BlackToolS-TCL-script ##
+##   Online Help : irc://irc.undernet.org/tcl-help 	               ##
+##                 #TCL-HELP / UnderNet                                ##
+##                 You can ask in english or romanian                  ##
+##					                               ##
+#########################################################################
+
+proc repetitivechars:protect {nick host hand chan arg} {
+global black
+if {![validchan $chan]} { return }
+	set handle [nick2hand $nick]
+if {![botisop $chan] && ![setting:get $chan xonly]} { return }
+if {[matchattr $handle $black(exceptflags) $chan]} { return }
+if {[isbotnick $nick]} { return  }
+	set bl_protect [blacktools:protect $nick $chan]
+if {$bl_protect == "1"} { return }
+	set getnum [setting:get $chan repetitivechars-char]
+if {$getnum == ""} { set getnum "$black(repetitivechars:num)" }
+	set llength_chars [string length $arg]
+	set chars [split $arg ""]
+	set counter 0
+	set current_char ""
+for {set i 0 } { $i < $llength_chars } { set i [expr $i + 1] } {
+	set char [lindex $chars $i]
+if {$current_char == ""} {
+	set current_char $char
+	set counter [expr $counter + 1]
+} else {
+if {$char != "$current_char"} {
+	set current_char $char
+	set counter 1
+	} else {
+	set counter [expr $counter + 1]
+		}
+	}
+}
+if {$counter >= $getnum} {
+	blacktools:banner:1 $nick "repetitivechars" $chan $host [get:banmethod "repetitivechars" $chan] [link:chan:get $chan]
+		return 1
+	}
+}