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

	<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>2022-09-01T06:45:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[mvp1]]></name></author>
		<updated>2022-08-13T04:53:31-04:00</updated>

		<published>2022-08-13T04:53:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111286#p111286</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111286#p111286"/>
		<title type="html"><![CDATA[Modify Join/Part TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111286#p111286"><![CDATA[
Thanks Simo, I'm testing this. Seems to be working in principle, but will have to see how quick it reacts during flood and does the job.<br><br>Thanks again mate <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12960">mvp1</a> — Sat Aug 13, 2022 4:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mvp1]]></name></author>
		<updated>2022-08-13T04:51:24-04:00</updated>

		<published>2022-08-13T04:51:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111285#p111285</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111285#p111285"/>
		<title type="html"><![CDATA[Modify Join/Part TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111285#p111285"><![CDATA[
Hi Simo,<br><br>On DALnet mate, eggdrop 1.8.3<br><blockquote class="uncited"><div>on wich network / ircd version are u running this ?</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12960">mvp1</a> — Sat Aug 13, 2022 4:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-09-01T06:45:00-04:00</updated>

		<published>2022-08-12T17:36:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111283#p111283</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111283#p111283"/>
		<title type="html"><![CDATA[Modify Join/Part TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111283#p111283"><![CDATA[
you might want to set channel mode like +j 2:2 that helps as well<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Fri Aug 12, 2022 5:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-08-12T17:12:05-04:00</updated>

		<published>2022-08-12T17:12:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111282#p111282</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111282#p111282"/>
		<title type="html"><![CDATA[Modify Join/Part TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111282#p111282"><![CDATA[
on wich network / ircd version are u running this ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Fri Aug 12, 2022 5:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-08-15T21:33:05-04:00</updated>

		<published>2022-08-12T16:59:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111281#p111281</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111281#p111281"/>
		<title type="html"><![CDATA[Modify Join/Part TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111281#p111281"><![CDATA[
try this : <br><div class="codebox"><p>Code: </p><pre><code>set jp(part) 3set jp(lock_modes) "R"setudef flag joinpartbind part - * ban:jpproc ban:jp {nick uhost hand chan arg} {  global jp botnick jpchan kickcount logo  if {[isbotnick $nick] || ![botisop $chan] || ![channel get $chan joinpart]} {    return  }  if {![info exists jpchan($chan)]} {    set jpchan($chan) 0  }  if {[matchattr $hand b] || [matchattr $hand fom|fom $chan]} {    return  }  if {[getchanjoin $nick $chan] &gt;= [expr {[clock seconds]-$jp(part)}]} {    if {$jp(style) == "1"} {   set banmask [jp:banmask $uhost $nick]      jp:lockchan $chan       pushmode $chan +b $banmask      putserv "KICK $chan $nick :$jp(reason) $kickcount $logo"      putlog "JoinPart: Flood Attempt on $chan ($banmask) banned on the channel"    }    if {$jp(style) == "2"} {   set banmask [jp:banmask $uhost $nick]      jp:lockchan $chan      pushmode $chan +b $banmask        putserv "KICK $chan $nick :$jp(reason) $kickcount $logo"      putlog "JoinPart: Flood Attempt on $chan ($banmask) added in the channel banlist"      newchanban "$chan" "$banmask" "JoinPart" "$jp(reason)" "$jp(btime)"    }    if {$jp(style) == "3"} {    set banmask [jp:banmask $uhost $nick]   jp:lockchan $chan      pushmode $chan +b $banmask      putserv "KICK $chan $nick :$jp(reason) $kickcount $logo"      putlog "JoinPart: Flood Attempt on $chan ($banmask) added in the global banlist"      newban "$banmask" "JoinPart" "$jp(reason)" "$jp(btime)"    }    flushmode $chan  }} proc jp:banmask {uhost nick} { global jpban_type  switch -- $jpban_type {   1 { set banmask "*!*@[lindex [split $uhost @] 1]" }   2 { set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]" }   3 { set banmask "*!*$uhost" }   4 { set banmask "*!*[lindex [split [maskhost $uhost] "!"] 1]" }   5 { set banmask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }   6 { set banmask "*$nick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }   7 { set banmask "*$nick*!*@[lindex [split $uhost "@"] 1]" }   8 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split $uhost @] 1]" }   9 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }   default { set banmask "*!*@[lindex [split $uhost @] 1]" }   return $banmask  }}proc jp:lockchan {chan} {  global lock_channel jp  if {![info exists lock_channel($chan)]} {     putnow "mode $chan +$jp(lock_modes)"      timer $jp(unlock) [list putquick "MODE $chan -$jp(lock_modes)"]    set lock_channel($chan) 1    utimer 10 [list unset -nocomplain ::lock_channel($chan)]  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Fri Aug 12, 2022 4:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mvp1]]></name></author>
		<updated>2022-08-11T22:14:36-04:00</updated>

		<published>2022-08-11T22:14:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111276#p111276</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111276#p111276"/>
		<title type="html"><![CDATA[Modify Join/Part TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111276#p111276"><![CDATA[
I have made below changes to above to check for +R modelock check, but the mode check check seems to be too slow when 2-3 nicks do revolving/join-part at the same time and the bot still does the modelocks multiple times.<br>Any solutions, suggestions please?<br><br><br>Modified Code:<br><div class="codebox"><p>Code: </p><pre><code>  if {[getchanjoin $nick $chan] &gt;= [expr {[clock seconds]-$jp(part)}]} {    if {$jp(style) == "1"} { set banmask [jp:banmask $uhost $nick]if {![string match *R* [lindex [getchanmode $chan] 0]]} {putquick "MODE $chan +$jp(lock_modes)b $banmask"timer $jp(unlock) [list putquick "MODE $chan -$jp(lock_modes)"]}      putquick "MODE $chan +b $banmask"       putserv "KICK $chan $nick :$jp(reason) $kickcount $logo"      putlog "JoinPart: Flood Attempt on $chan ($banmask) banned on the channel"#      timer $jp(unlock) [list putquick "MODE $chan -$jp(lock_modes)"]    }</code></pre></div>Below is the example even after above modified code.<br><div class="codebox"><p>Code: </p><pre><code>→ NOONECANSTOPME_}_ joined (~ipr@4ea-8986-f438-9e7b-dce3.83.170.ip)5:04 AM ← NOooo_}_ left (~ipr@4ea-8986-f438-9e7b-dce3.83.170.ip)5:04 AM → NOONooo_ joined (~ipr@4ea-8986-f438-9e7b-dce3.83.170.ip)5:04 AM → noooodsdooo joined (~ybcb@a5e3-836e-d488-e7b3-1c66.111.192.ip)5:04 AM ← nooooasdjdsad left (~ybcb@a5e3-836e-d488-e7b3-1c66.111.192.ip)5:04 AM → asdsadsadsa joined (~ybcb@a5e3-836e-d488-e7b3-1c66.111.192.ip)5:04 AM ← dasdsadsadsa left (~ybcb@a5e3-836e-d488-e7b3-1c66.111.192.ip)5:04 AM •Bot banned *!*@4ea-8986-f438-9e7b-dce3.83.170.ip (+b)5:04 AM Channel mode set to +R by •Bot5:04 AM •Bot banned *!*@a5e3-836e-d488-e7b3-1c66.111.192.ip (+b)5:04 AM Channel mode set to +R by •Bot5:04 AM ← Nooonasdndsadn_ left (~ipr@4ea-8986-f438-9e7b-dce3.83.170.ip)</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12960">mvp1</a> — Thu Aug 11, 2022 10:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mvp1]]></name></author>
		<updated>2022-08-11T03:59:45-04:00</updated>

		<published>2022-08-11T03:59:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111270#p111270</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111270#p111270"/>
		<title type="html"><![CDATA[Modify Join/Part TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111270#p111270"><![CDATA[
Hi folks,<br><br>I am using below code for join/part (revolving door). It is working fine, but when multiple nicks join/part, the script also sets the channel mode command multiple times. <br>Appreciate if anyone can help modify the code in a loop or may be any possible check, so the channel modelock happens only once? May be check the existing channel modes before running a modelock again? Or check existing channel modes every time before running a modelock? Or any other solution that doesn't involve too much lag on the bot. (I still want the bans for each of the join/part nicks)<br><br>Thanks in advance.<br><div class="codebox"><p>Code: </p><pre><code>set jp(part) 3set jp(lock_modes) "R"setudef flag joinpartbind part - * ban:jpproc ban:jp {nick uhost hand chan arg} {  global jp botnick jpchan kickcount logo  if {[isbotnick $nick] || ![botisop $chan] || ![channel get $chan joinpart]} {    return  }  if {![info exists jpchan($chan)]} {    set jpchan($chan) 0  }  if {($chan == $botnick) || [matchattr $hand b] || [matchattr $hand fom|fom $chan]} {    return  }  if {[getchanjoin $nick $chan] &gt;= [expr {[clock seconds]-$jp(part)}]} {    if {$jp(style) == "1"} { set banmask [jp:banmask $uhost $nick]      putquick "MODE $chan +$jp(lock_modes)b $banmask"       putserv "KICK $chan $nick :$jp(reason) $kickcount $logo"      putlog "JoinPart: Flood Attempt on $chan ($banmask) banned on the channel"      timer $jp(unlock) [list putquick "MODE $chan -$jp(lock_modes)"]    }    if {$jp(style) == "2"} {set banmask [jp:banmask $uhost $nick]      putquick "MODE $chan +$jp(lock_modes)b $banmask"       putserv "KICK $chan $nick :$jp(reason) $kickcount $logo"      putlog "JoinPart: Flood Attempt on $chan ($banmask) added in the channel banlist"      newchanban "$chan" "$banmask" "JoinPart" "$jp(reason)" "$jp(btime)"      timer $jp(unlock) [list putquick "MODE $chan -$jp(lock_modes)"]    }    if {$jp(style) == "3"} { set banmask [jp:banmask $uhost $nick]      putquick "MODE $chan +$jp(lock_modes)b $banmask"       putserv "KICK $chan $nick :$jp(reason) $kickcount $logo"      putlog "JoinPart: Flood Attempt on $chan ($banmask) added in the global banlist"      newban "$banmask" "JoinPart" "$jp(reason)" "$jp(btime)"      timer $jp(unlock) [list putquick "MODE $chan -$jp(lock_modes)"]    }  } }proc jp:banmask {uhost nick} { global jpban_type  switch -- $jpban_type {   1 { set banmask "*!*@[lindex [split $uhost @] 1]" }   2 { set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]" }   3 { set banmask "*!*$uhost" }   4 { set banmask "*!*[lindex [split [maskhost $uhost] "!"] 1]" }   5 { set banmask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }   6 { set banmask "*$nick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }   7 { set banmask "*$nick*!*@[lindex [split $uhost "@"] 1]" }   8 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split $uhost @] 1]" }   9 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }   default { set banmask "*!*@[lindex [split $uhost @] 1]" }   return $banmask  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12960">mvp1</a> — Thu Aug 11, 2022 3:59 am</p><hr />
]]></content>
	</entry>
	</feed>
