<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/20112" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2016-03-01T15:26:41-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/20112</id>

		<entry>
		<author><name><![CDATA[F|irT]]></name></author>
		<updated>2016-03-01T15:26:41-04:00</updated>

		<published>2016-03-01T15:26:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104765#p104765</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104765#p104765"/>
		<title type="html"><![CDATA[Tcl Issue..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104765#p104765"><![CDATA[
yeh the same nick with same ident tcl is diffrent and that is working very nice u update it with ban option no problem with that ..<br><br>now was talking about the new tcl wich was writen by i asked if flooder jion with only with same nick or with same ident so u give me this tcl to add it was not working.. as i give u result in paste subject..<div class="codebox"><p>Code: </p><pre><code>## remove-damn-spam-bots.tcl v1.6 (7Feb2016) by SpiKe^^ ## # Spam bots joins, kick-ban on joins:seconds # set rdsb(flood) 3:10 # Spam bots joins kick-ban reason # set rdsb(reasn) "10Possibel/Spammer/Flooder! 1If Not join #gethelp" # Max number of bans to stack in one mode command # set rdsb(maxb) 6 # Length of time in minutes to ban damn spam bots # # - set 0 to disable this script removing bans (ex. set rdsb(btime) 0) # set rdsb(btime) 120 # After a valid damn spam bot join flood, script will continue # # to kick-ban offenders for an additional 'x' seconds # set rdsb(xpire) 60 # Set the type of ban masks to use #                     &lt;- NEW SETTING &lt;- #  1 = use host/ip specific bans (ex. *!*@some.host.com) # #  2 = use wide masked host/ip bans (ex. *!*@*.host.com) # #      note: setting 2 requires eggdrop 1.6.20 or newer. # set rdsb(btype) 2 # Set protected host(s) that should not be wide masked # &lt;- NEW SETTING &lt;- # - Example:  set rdsb(phost) "*.undernet.org" #  Note: this setting only applies to ban type 2 above! # #  Note: set empty to not protect any hosts (ex. set rdsb(phost) "") # #  Note: space separated if listing more than one protected host # set rdsb(phost) "" # Enable username bans for botnets with a common username? # &lt;- NEW SETTING &lt;- # If a botnet was to join with uhosts like this: ~khusra_pu@187.242.163.214 #   ~khusra_pu@192.162.101.84  ~khusra_pu@200.225.1.214 #   should this script set a single uhost ban?  (ex. *!~khusra_pu@*) # #  0 = username bans off: continue setting host/ip bans # #  1 = username bans on: set a username ban when that would work # set rdsb(uban) 1 # Set channel mode(s) on flood detected. # # - set empty to disable setting channel modes (ex. set rdsb(mode) "") # set rdsb(mode) "M-k Flood" # Remove these channel modes after how many seconds? # set rdsb(mrem) 20 # END OF SETTINGS # Don't edit below unless you know what you're doing # bind join - * rdsb_bindjoin proc rdsb_bindjoin {nick uhost hand chan} {   global rdsb rdsc rdsq   if {[isbotnick $nick]} { return 0 }   if {[matchattr $hand f|f $chan]} { return 0 }   if {![string match "~*" $uhost]} { return 0 }   set user [string range [lindex [split $uhost @] 0] 1 9]   if {$user ne [string range $nick 0 8]} { return 0 }   set uhost [string tolower $nick!$uhost]   set chan [string tolower $chan]   set utnow [unixtime]   set target [lindex $rdsb(flood) 0]   if {[info exists rdsc($chan)]} {     set uhlist [lassign $rdsc($chan) cnt ut]     set utend [expr {$ut + [lindex $rdsb(flood) 1]}]     set expire [expr {$utend + $rdsb(xpire)}]     if {$cnt &lt; $target} {       if {$utnow &gt; $utend} { unset rdsc($chan) }     } elseif {$utnow &gt; $expire} { unset rdsc($chan) }   }   if {![info exists rdsc($chan)]} {     set rdsc($chan) [list 1 $utnow $uhost]     return 0   }   incr cnt   if {$cnt &lt;= $target} {     if {[lsearch $uhlist $uhost] == -1} { lappend uhlist $uhost }     if {$cnt &lt; $target} {       set rdsc($chan) [linsert $uhlist 0 $cnt $ut]     } else {       set rdsc($chan) [list $cnt $ut]       if {$rdsb(mode) ne "" &amp;&amp; [string is digit -strict $rdsb(mrem)]} {         putquick "MODE $chan +$rdsb(mode)"         utimer $rdsb(mrem) [list putquick "MODE $chan -$rdsb(mode)"]       }       rdsb_dobans $chan $uhlist     }     return 0   }   if {![info exists rdsq($chan)]} {     utimer 2 [list rdsb_bque $chan]     set rdsq($chan) [list $uhost]   } elseif {[lsearch $rdsq($chan) $uhost] == -1} {     lappend rdsq($chan) $uhost   }   if {[llength $rdsq($chan)] &gt;= $rdsb(maxb)} {     rdsb_dobans $chan $rdsq($chan)     set rdsq($chan) ""   } elseif {[botisop $chan]} { putquick "KICK $chan $nick :$rdsb(reasn)" }   return 0 } proc rdsb_dobans {chan uhlist} {   global rdsb rdsu   if {![botisop $chan]} return   set banList ""   set nickList ""   set banned ""   if {[info exists rdsu($chan)]} {  set banned $rdsu($chan)  }   set userList $banned   foreach ele $uhlist {     scan $ele {%[^!]!%[^@]@%s} nick user host     set bmask ""     if {$rdsb(uban) == 1} {       if {[lsearch $userList $user] &gt; -1} {         if {[lsearch $banned $user] == -1} {           if {$banned eq ""} {  utimer 10 [list unset rdsu($chan)]  }           set bmask "*!$user@*"           lappend banned $user           set rdsu($chan) $banned         } else {  set bmask 0  }       } else {  lappend userList $user  }     }     if {$bmask eq "" &amp;&amp; $rdsb(btype) == 2} {       set type 4       foreach ph $rdsb(phost) {         if {[string match -nocase $ph $host]} {           set type 2  ;  break         }       }       set bmask [maskhost $ele $type]     } elseif {$bmask eq ""} {  set bmask "*!*@$host"  }     if {$bmask ne "0" &amp;&amp; [lsearch $banList $bmask] == -1} {       lappend banList $bmask     }     if {[lsearch $nickList $nick] == -1} { lappend nickList $nick }   }   stack_bans $chan $rdsb(maxb) $banList   foreach nk $nickList {     if {[onchan $nk $chan]} { putquick "KICK $chan $nk :$rdsb(reasn)" }   }   if {$rdsb(btime) &gt; 0} {     set expire [expr {[unixtime] + $rdsb(btime)}]     lappend rdsb(rmls) [list $expire $chan $banList]   } } proc stack_bans {chan max banlist {opt +} } {   set len [llength $banlist]   while {$len &gt; 0} {     if {$len &gt; $max} {       set mode [string repeat "b" $max]       set masks [join [lrange $banlist 0 [expr {$max - 1}]]]       set banlist [lrange $banlist $max end]       incr len -$max     } else {       set mode [string repeat "b" $len]       set masks [join $banlist]       set len 0     }     putquick "MODE $chan ${opt}$mode $masks"   } } proc rdsb_bque {chan} {   global rdsq   if {![info exists rdsq($chan)]} { return }   if {$rdsq($chan) eq ""} { unset rdsq($chan) ; return }   rdsb_dobans $chan $rdsq($chan)   unset rdsq($chan) } proc rdsb_breset {} {   global rdsc rdsb   set utnow [unixtime]   set target [lindex $rdsb(flood) 0]   foreach {key val} [array get rdsc] {     lassign $val cnt ut     set utend [expr {$ut + [lindex $rdsb(flood) 1]}]     set expire [expr {$utend + $rdsb(xpire)}]     if {$cnt &lt; $target} {       if {$utnow &gt; $utend} { unset rdsc($key) }     } elseif {$utnow &gt; $expire} { unset rdsc($key) }   }   if {[info exists rdsb(rmls)]} {     while {[llength $rdsb(rmls)]} {       set next [lindex $rdsb(rmls) 0]       lassign $next expire chan banList       if {$expire &gt; $utnow} {  break  }       set rdsb(rmls) [lreplace $rdsb(rmls) 0 0]       if {![info exists rmAra($chan)]} {  set rmAra($chan) $banList       } else {  set rmAra($chan) [concat $rmAra($chan) $banList]  }     }     foreach {key val} [array get rmAra] {       set banList ""       foreach mask $val {         if {![ischanban $mask $key]} {  continue  }         lappend banList $mask       }       if {$banList eq ""} {  continue  }       if {![botisop $key]} {         set rdsb(rmls) [linsert $rdsb(rmls) 0 [list $utnow $key $banList]]       } else {  stack_bans $key $rdsb(maxb) $banList -  }     }     if {![llength $rdsb(rmls)]} {  unset rdsb(rmls)  }   }   utimer 30 [list rdsb_breset] } if {![info exists rdsb_running]} {   utimer 20 [list rdsb_breset]   set rdsb_running 1 } set rdsb(flood) [split $rdsb(flood) :] set rdsb(btime) [expr {$rdsb(btime) * 60}] set rdsb(phost) [split [string trim $rdsb(phost)]] if {$rdsb(btime)==0 &amp;&amp; [info exists rdsb(rmls)]} {  unset rdsb(rmls)  } putlog "Loaded remove-damn-spam-bots.tcl v1.6 by SpiKe^^"</code></pre></div><div class="codebox"><p>Code: </p><pre><code>## mass-join-protection.tcl v1.5.1 (25Feb2016) by SpiKe^^ ## # Mass joins, kick-ban on joins:seconds # set mjp(flood) 5:2 # Mass joins kick-ban reason # set mjp(reasn) "10Mass Join Flood. Need HeLp Join 1#gethelp!" # Max number of bans to stack in one mode command # set mjp(maxb) 6 # Length of time in minutes to ban mass join flooders # # - set 0 to disable this script removing bans (ex. set mjp(btime) 0) # set mjp(btime) 10 # After a valid mass join flood, script will continue # # to kick-ban offenders for an additional 'x' seconds # set mjp(xpire) 10 # Set the type of ban masks to use # #  1 = use host/ip specific bans (ex. *!*@some.host.com) # #  2 = use wide masked host/ip bans (ex. *!*@*.host.com) # #      note: setting 2 requires eggdrop 1.6.20 or newer. # set mjp(btype) 2 # Set protected host(s) that should not be wide masked # # - Example:  set mjp(phost) "*.undernet.org" #  Note: this setting only applies to ban type 2 above! # #  Note: set empty to not protect any hosts (ex. set mjp(phost) "") # #  Note: space separated if listing more than one protected host # set mjp(phost) "" # Set channel mode(s) on flood detected. # # - set empty to disable setting channel modes (ex. set mjp(mode) "") # set mjp(mode) "R-k MaSs-JoIn" # Remove these channel modes after how many seconds? # set mjp(mrem) 15 # END OF SETTINGS # Don't edit below unless you know what you're doing # bind join - * mjp_bindjoin proc mjp_bindjoin {nick uhost hand chan} {   global mjp mjpc mjpq   if {[isbotnick $nick]} { return 0 }   if {[matchattr $hand f|f $chan]} { return 0 }   set uhost [string tolower $nick!$uhost]   set chan [string tolower $chan]   set utnow [unixtime]   set target [lindex $mjp(flood) 0]   if {[info exists mjpc($chan)]} {     set uhlist [lassign $mjpc($chan) cnt ut]     set utend [expr {$ut + [lindex $mjp(flood) 1]}]     set expire [expr {$utend + $mjp(xpire)}]     if {$cnt &lt; $target} {       if {$utnow &gt; $utend} { unset mjpc($chan) }     } elseif {$utnow &gt; $expire} { unset mjpc($chan) }   }   if {![info exists mjpc($chan)]} {     set mjpc($chan) [list 1 $utnow $uhost]     return 0   }   incr cnt   if {$cnt &lt;= $target} {     if {[lsearch $uhlist $uhost] == -1} { lappend uhlist $uhost }     if {$cnt &lt; $target} {       set mjpc($chan) [linsert $uhlist 0 $cnt $ut]     } else {       set mjpc($chan) [list $cnt $ut]       if {$mjp(mode) ne "" &amp;&amp; [string is digit -strict $mjp(mrem)]} {         putquick "MODE $chan +$mjp(mode)"         utimer $mjp(mrem) [list putquick "MODE $chan -$mjp(mode)"]       }       mjp_dobans $chan $uhlist     }     return 0   }   if {![info exists mjpq($chan)]} {     utimer 2 [list mjp_bque $chan]     set mjpq($chan) [list $uhost]   } elseif {[lsearch $mjpq($chan) $uhost] == -1} {     lappend mjpq($chan) $uhost   }   if {[llength $mjpq($chan)] &gt;= $mjp(maxb)} {     mjp_dobans $chan $mjpq($chan)     set mjpq($chan) ""   } elseif {[botisop $chan]} { putquick "KICK $chan $nick :$mjp(reasn)" }   return 0 } proc mjp_dobans {chan uhlist} {   global mjp   if {![botisop $chan]} return   set banList ""   set nickList ""   foreach ele $uhlist {     scan $ele {%[^!]!%[^@]@%s} nick user host     if {$mjp(btype) == 2} {       set type 4       foreach ph $mjp(phost) {         if {[string match -nocase $ph $host]} {           set type 2  ;  break         }       }       set bmask [maskhost $ele $type]     } else {  set bmask "*!*@$host"  }     if {[lsearch $banList $bmask] == -1} { lappend banList $bmask }     if {[lsearch $nickList $nick] == -1} { lappend nickList $nick }   }   stack_bans $chan $mjp(maxb) $banList   foreach nk $nickList {     if {[onchan $nk $chan]} { putquick "KICK $chan $nk :$mjp(reasn)" }   }   if {$mjp(btime) &gt; 0} {     set expire [expr {[unixtime] + $mjp(btime)}]     lappend mjp(rmls) [list $expire $chan $banList]   } } proc stack_bans {chan max banlist {opt +} } {   set len [llength $banlist]   while {$len &gt; 0} {     if {$len &gt; $max} {       set mode [string repeat "b" $max]       set masks [join [lrange $banlist 0 [expr {$max - 1}]]]       set banlist [lrange $banlist $max end]       incr len -$max     } else {       set mode [string repeat "b" $len]       set masks [join $banlist]       set len 0     }     putquick "MODE $chan ${opt}$mode $masks"   } } proc mjp_bque {chan} {   global mjpq   if {![info exists mjpq($chan)]} { return }   if {$mjpq($chan) eq ""} { unset mjpq($chan) ; return }   mjp_dobans $chan $mjpq($chan)   unset mjpq($chan) } proc mjp_breset {} {   global mjpc mjp   set utnow [unixtime]   set target [lindex $mjp(flood) 0]   foreach {key val} [array get mjpc] {     lassign $val cnt ut     set utend [expr {$ut + [lindex $mjp(flood) 1]}]     set expire [expr {$utend + $mjp(xpire)}]     if {$cnt &lt; $target} {       if {$utnow &gt; $utend} { unset mjpc($key) }     } elseif {$utnow &gt; $expire} { unset mjpc($key) }   }   if {[info exists mjp(rmls)]} {     while {[llength $mjp(rmls)]} {       set next [lindex $mjp(rmls) 0]       lassign $next expire chan banList       if {$expire &gt; $utnow} {  break  }       set mjp(rmls) [lreplace $mjp(rmls) 0 0]       if {![info exists rmAra($chan)]} {  set rmAra($chan) $banList       } else {  set rmAra($chan) [concat $rmAra($chan) $banList]  }     }     foreach {key val} [array get rmAra] {       set banList ""       foreach mask $val {         if {![ischanban $mask $key]} {  continue  }         lappend banList $mask       }       if {$banList eq ""} {  continue  }       if {![botisop $key]} {         set mjp(rmls) [linsert $mjp(rmls) 0 [list $utnow $key $banList]]       } else {  stack_bans $key $mjp(maxb) $banList -  }     }     if {![llength $mjp(rmls)]} {  unset mjp(rmls)  }   }   utimer 30 [list mjp_breset] } if {![info exists mjp_running]} {   utimer 20 [list mjp_breset]   set mjp_running 1 } set mjp(flood) [split $mjp(flood) :] set mjp(btime) [expr {$mjp(btime) * 60}] set mjp(phost) [split [string trim $mjp(phost)]] if {$mjp(btime)==0 &amp;&amp; [info exists mjp(rmls)]} {  unset mjp(rmls)  } putlog "Loaded mass-join-protection.tcl v1.5.1 by SpiKe^^"</code></pre></div>now there is another issue with mass join tcl this is good tcl 5 nick with in 2 sec bot ban lock the channel mode ban ips kick user till 10 sec but there is a problem i just watch today it was netsplit server when server up see what happend  here are some logs<br><div class="codebox"><p>Code: </p><pre><code>* Joins: nicefriends (~nicefrien@39.48.101.190)* Joins: shahidjee (~Mibbit@119.159.192.112)* Joins: iffi^-^ (Major@Moody.Person.ignorelist.com)* Joins: nobody- (~Billi@p5DCE911B.dip0.t-ipconnect.de)* Joins: HAndsomerob (S@2602:ffea:1:36f::157)* Joins: KriminaL (MaStEr@2602:ffca:a::194c:8bd4)* Joins: InsErT (Sky@2602:ffca:a::489a:af9b)* Joins: UHUb (InCeSt@chan-stats.tk)* Joins: Renix (~DeMoN@2602:ffea:1001:919::122)* Joins: NoNSt0p (NoNStOp@NoNStOp-AlcohoL.unixguru.tk)* Joins: whynot (Khan@Buddy.of.ChannelLaHoRe.bestforever.com)* Joins: sarpino (City@I.Hate.Rules.hacked.jp)* underworld.se.eu.dal.net sets mode: +ovov iffi^-^ UHUb NoNSt0p whynot* NoNSt0p sets mode: +R-k MaSs-JoIn* NoNSt0p sets mode: +bbbbb *!*@39.48.89.* *!*@119.159.192.* *!*@39.48.101.* *!*@39.47.42.* *!*@119.153.166.** ZoR^AaWar was kicked by NoNSt0p (Mass Join Flood. Need HeLp Join #getHeLp!)* shahidjee was kicked by NoNSt0p (Mass Join Flood. Need HeLp Join #getHeLp!)* nicefriends was kicked by NoNSt0p (Mass Join Flood. Need HeLp Join #gettHeLp!)* uff-meri-mature-ami was kicked by NoNSt0p (Mass Join Flood. Need HeLp Join #gettHeLp!)* Taimur_ was kicked by NoNSt0p (Mass Join Flood. Need HeLp Join #gettHeLp!)* sarim-dubai-hard was kicked by NoNSt0p (Mass Join Flood. Need HeLp Join #gettHeLp!)* You were kicked by NoNSt0p (Mass Join Flood. Need HeLp Join #gethelp!)</code></pre></div>Spicily Thanks to SpiKe^^ to be always around to make it always rite what i asked for . and thanks to all senior tcl maker administrator Supporters to active on this site. to help other's<br><br>i have issue with mass join after server split mass join protection is on lit has to be changed.<br>and in other tcl  flooder with same nick tcl script does not ban flooder with same nick .<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12521">F|irT</a> — Tue Mar 01, 2016 3:26 pm</p><hr />
]]></content>
	</entry>
	</feed>
