<?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/21493" />

	<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>2024-04-07T09:35:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2024-04-07T09:35:46-04:00</updated>

		<published>2024-04-07T09:35:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112691#p112691</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112691#p112691"/>
		<title type="html"><![CDATA[Anti Join Part with +R if multiple JoinParts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112691#p112691"><![CDATA[
greetz , <br><br>im using this tcl wich checks join parts and sets ban if they join and part within 3 seconds and if multiple nicks join part it sets +R as well, but for some reason it sets +R even if a nick (who was already on channel) just parts and then a join part happens by another nick right after that while we only want a +R set if multipl nicks are join parting within lets say 5 seconds while we check for join parts itselve if its within 3 seconds to set ban<br><br>this is what we work with atm:<br><div class="codebox"><p>Code: </p><pre><code>bind part - * join-part:floodingproc join-part:flooding {nick uhost hand chan arg} {  global botnick jpartfld ChanJPFlood     if {[isbotnick $nick] || ![botisop $chan]} { return  }  if {[matchattr $hand b] || [matchattr $hand fom|fom $chan]} { return  }   if {[getchanjoin $nick $chan] &gt;= [expr {[clock seconds]-2}]} {           set TargHost "*!*@[lindex [split $uhost @] 1]"           if {![ischanban $TargHost $chan]} { pushmode $chan +b $TargHost }                       incr jpartfld($chan)           if {![info exists ::jpartfldchk($chan)]} {  set ::jpartfldchk($chan) [after [expr {20*1000*1}] [list unset -nocomplain ::jpartfldchk($chan)]]  }          if {$jpartfld($chan) &gt;= 2} { jpflod:lock2024 $chan $TargHost ; set jpartfld($chan) 0 ; return 0 }   } }proc JP:flood:list u { global ChanJPFlood  if {[info exists ChanJPFlood($u)]} { incr ChanJPFlood($u) -1 }}proc jpflod:lock2024 {chan banmask} {    global jpflnick_flooded  if {![info exists jpflnick_flooded($chan)]} {    set jpflnick_flooded($chan) 1    if {![regexp R [getchanmode $chan]]} { pushmode $chan +R }    if {![regexp M [getchanmode $chan]]} { pushmode $chan +M }     after [expr {10*1000*1}] [list jpflod:unlock2024 $chan]    utimer 5 [list unset -nocomplain ::jpflnick_flooded($chan)]  }} proc jpflod:unlock2024 {chan} {    global unbanjpflnick_flooded  if {![info exists unbanjpflnick_flooded($chan)]} {    set unbanjpflnick_flooded($chan) 1    if {[regexp R [getchanmode $chan]]} { pushmode $chan -R }    if {[regexp M [getchanmode $chan]]} { pushmode $chan -M }    utimer 5 [list unset -nocomplain ::unbanjpflnick_flooded($chan)]  }}</code></pre></div>it doesnt seem to unset the multiple join part section properly so even minutes later if a single join part occurs it sets a +R<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun Apr 07, 2024 9:35 am</p><hr />
]]></content>
	</entry>
	</feed>
