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

	<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-01-10T10:10:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-10T10:10:28-04:00</updated>

		<published>2022-01-10T10:10:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110761#p110761</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110761#p110761"/>
		<title type="html"><![CDATA[enforcebans kicker with timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110761#p110761"><![CDATA[
oh i actually found the pasted code odly doesnt stack the kicks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Jan 10, 2022 10:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-10T09:43:59-04:00</updated>

		<published>2022-01-10T09:43:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110760#p110760</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110760#p110760"/>
		<title type="html"><![CDATA[enforcebans kicker with timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110760#p110760"><![CDATA[
actually we use this :<br><div class="codebox"><p>Code: </p><pre><code>namespace eval enforceBans {   set enforce(max) "4"   set enforce(reason) "Ban %ban set in %from matches your host. You are banned!"    bind mode - "% +b" [namespace current]::enforce   proc enforce {nick uhost hand chan mc ban} {      variable enforce      set reason [string map [list "%from" $chan "%ban" $ban "%who" $nick] $enforce(reason)]      if {![botisop $chan]} { return 0 }      set ban [string map {"\\" "\\\\" "\[" "\\["} $ban]       if {[matchstr "*@*mibbit*" "$ban"]} { return 0 }       if {[string match -nocase $ban $::botname]} { return }         foreach n [chanlist $chan] {            if {![matchaddr $ban $n![getchanhost $n $chan]]} continue            if {[isop $n $chan] || [ishalfop $n $chan] || [matchattr [nick2hand $n] "fnmo|fnmo" $chan]} continue          if {[onchan $n $chan]} { lappend kickList($chan) $n }         }      if {[llength $kickList($chan)]  &gt; 2} { return }         if {[info exists kickList($chan)]} {         set kickList($chan) [lsort -dictionary $kickList($chan)]            set len [llength $kickList($chan)]            while {$len &gt; 0} {               if {$len &gt; $enforce(max)} {                  set users [join [lrange $kickList($chan) 0 [expr {$enforce(max) - 1}]] ,]                  set kickList($chan) [lrange $kickList($chan) $enforce(max) end]                  incr len -$enforce(max)               } else {                  set users [join $kickList($chan) ,]                  set len 0               }             after [expr {2*1000*1}] [list putnow "kick $chan $users $reason"]            }         }      }   }</code></pre></div>i was wondering how to send the stored nicks to be kicked in this line<br><blockquote class="uncited"><div>after [expr {2*1000*1}] [list putnow "kick $chan $users $reason"]</div></blockquote>to perhaps check if they are still online before kicking to make sure its not kicking out nicks that already have been kicked out or left channel<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Jan 10, 2022 9:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-03T14:35:34-04:00</updated>

		<published>2022-01-03T14:35:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110736#p110736</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110736#p110736"/>
		<title type="html"><![CDATA[enforcebans kicker with timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110736#p110736"><![CDATA[
i was trying out this enforce bans code <br><br>and was wondering how to edit it to have banned users kicked out but with a timer<br>and to have it check afterwards if the banned nick is actually still on channel and perhaps if multiple nicks have been banned within short period to send it with just a single timer to prevent a bunch of  timers do to the same job on multiple nicks<br><br><div class="codebox"><p>Code: </p><pre><code>bind mode - "* +b" enforcebansq proc enforcebansq {nick uhost hand chan mc ban} {  if {![string match -nocase [string map {"\\" "\\\\" "\[" "\\["} $ban] $::botname]} {    foreach n [chanlist $chan] {      if {[string match -nocase [string map {"\\" "\\\\" "\[" "\\["} $ban] $n![getchanhost $n $chan]]} {       if {![isop $n $chan] &amp;&amp; ![ishalfop $n $chan] &amp;&amp; ![matchattr $hand o|o $chan]} { after [expr {5*1000*1}] [list checkenforceq $chan $n] }      }    }  } else {        return   }}   proc checkenforceq {chan nick} {   if {[onchan $nick $chan]} { putserv "kick $chan $nick :PLease follow our rules terms and conditions of our network thank you for more info use: /rules"    } else { return }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Jan 03, 2022 2:35 pm</p><hr />
]]></content>
	</entry>
	</feed>
