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

	<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-11T14:07:53-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-11T08:55:02-04:00</updated>

		<published>2022-01-11T08:55:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110770#p110770</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110770#p110770"/>
		<title type="html"><![CDATA[ban enforce doesnt stack kicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110770#p110770"><![CDATA[
excellent thanks Spike^^ that seems to do it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Jan 11, 2022 8:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2022-01-11T14:07:53-04:00</updated>

		<published>2022-01-11T01:52:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110768#p110768</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110768#p110768"/>
		<title type="html"><![CDATA[ban enforce doesnt stack kicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110768#p110768"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>namespace eval enforceBans {   variable enforce  ;  variable kickList   set enforce(max) "4"   #set enforce(reason_single) "Ban %ban set in %from matches your host. You are banned!"   set enforce(reason_multi) "A new ban in %from matches your host. You are banned!"   bind mode - "% +b" [namespace current]::enforce   proc enforce {nick uhost hand chan mc ban} {      variable kickList      if {[matchaddr $ban $::botname]} { return 0 }      if {[matchstr "*@*mibbit*" $ban]} { return 0 }      foreach n [chanlist $chan] {         if {![matchaddr $ban $n![getchanhost $n $chan]]} { continue }         if {[isop $n $chan] || [ishalfop $n $chan]} { continue }         if {[matchattr [nick2hand $n] "fnmo|fnmo" $chan]} { continue }         lappend klist $n      }      if {![info exists klist]} { return 0 }      if {![info exists kickList($chan)]} {         set kickList($chan) $klist         after 2000 [list "[namespace current]::enforce:kick" $chan]      } else {  lappend kickList($chan) {*}$klist  }      return 0   }   proc enforce:kick {chan} {      variable enforce      variable kickList      if {![botisop $chan] || ![info exists kickList($chan)]} {         array unset kickList $chan         return 0      }      set knicks [lsort -unique -dictionary $kickList($chan)]      unset kickList($chan)      set max $enforce(max)      set reason [string map [list %from $chan] $enforce(reason_multi)]      while {[set len [llength $knicks]] &gt; 0} {        if {$len &gt; $max} {          set nicks [join [lrange $knicks 0 [expr {$max - 1}]] ","]          set knicks [lrange $knicks $max end]        } else {          set nicks [join $knicks ","]          set knicks ""        }        putquick "KICK $chan $nicks :$reason"      }      return 0   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Tue Jan 11, 2022 1:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-10T13:10:39-04:00</updated>

		<published>2022-01-10T13:10:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110767#p110767</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110767#p110767"/>
		<title type="html"><![CDATA[ban enforce doesnt stack kicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110767#p110767"><![CDATA[
i tried with 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      variable kickList      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 {[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><br>but it doesnt get rid of the nicks that are already kicked it keeps adding the same nicks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Jan 10, 2022 1:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-10T11:10:20-04:00</updated>

		<published>2022-01-10T11:10:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110765#p110765</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110765#p110765"/>
		<title type="html"><![CDATA[ban enforce doesnt stack kicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110765#p110765"><![CDATA[
yes dalnet does 4 and inspircd 20<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Jan 10, 2022 11:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-01-10T10:52:24-04:00</updated>

		<published>2022-01-10T10:52:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110764#p110764</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110764#p110764"/>
		<title type="html"><![CDATA[ban enforce doesnt stack kicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110764#p110764"><![CDATA[
Short question: does your server accept multiple kicks in a single line ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Jan 10, 2022 10:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-10T10:37:02-04:00</updated>

		<published>2022-01-10T10:37:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110763#p110763</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110763#p110763"/>
		<title type="html"><![CDATA[ban enforce doesnt stack kicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110763#p110763"><![CDATA[
i cant figure why it doesnt stack the nicks to kick<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Jan 10, 2022 10:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-10T10:25:03-04:00</updated>

		<published>2022-01-10T10:25:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110762#p110762</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110762#p110762"/>
		<title type="html"><![CDATA[ban enforce doesnt stack kicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110762#p110762"><![CDATA[
i took this code caesar wrote from another post to enforce bans to kick in stack<br>only to find it doesnt seem to stack it sends all found banned nicks to be kicked seperate<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><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Jan 10, 2022 10:25 am</p><hr />
]]></content>
	</entry>
	</feed>
