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

	<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>2023-05-08T10:14:29-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2023-05-07T13:35:22-04:00</updated>

		<published>2023-05-07T13:35:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111934#p111934</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111934#p111934"/>
		<title type="html"><![CDATA[remove last ban or a range of last set bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111934#p111934"><![CDATA[
on suggestion of Spike^^ i came up with this :<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- "!rlb" unban:lastbansproc unban:lastbans {nick uhost hand chan text} {    if {![isop $nick $chan] &amp;&amp; ![ishalfop $nick $chan] &amp;&amp; ![matchattr $hand o|o $chan]} { return 0 }     set n [join [lindex $text 0]]    if {![string is digit $n]} { putserv "notice $nick :value must be digits only like\: !rlb 3"  ; return 0 }    if {![string is digit -strict $n] || $n == 0} { set n 1 }     set chanbanlist [lsort -index 2 -integer -decreasing [chanbans $chan]]     set lasts [lrange $chanbanlist end-[expr {$n - 1}] end]     foreach last $lasts {       pushmode $chan -b "[lindex $last 0]"     }}</code></pre></div>not sure if its all written proper but it seems to work as expected thanks so far gentz<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun May 07, 2023 1:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2023-05-07T13:19:51-04:00</updated>

		<published>2023-05-07T13:19:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111932#p111932</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111932#p111932"/>
		<title type="html"><![CDATA[remove last ban or a range of last set bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111932#p111932"><![CDATA[
the single<br><blockquote class="uncited"><div> !rlb  </div></blockquote>still doesnt seem to trigger at all tho<br><br>from what i understood of the code is  it expect a range everytime iic<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun May 07, 2023 1:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2023-05-08T10:14:29-04:00</updated>

		<published>2023-05-07T13:07:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111931#p111931</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111931#p111931"/>
		<title type="html"><![CDATA[remove last ban or a range of last set bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111931#p111931"><![CDATA[
on suggestion of Spike^^ i came up with this wich seems to work but not sure if its proper wiritten :<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- "!rlb" unban:lastbansproc unban:lastbans {nick uhost hand chan text} {    if {![isop $nick $chan] &amp;&amp; ![ishalfop $nick $chan] &amp;&amp; ![matchattr $hand o|o $chan]} { return 0 }     set n [join [lindex $text 0]]    if {![string is digit $n]} { putserv "notice $nick :value must be digits only like\: !rlb 3 "  ; return 0 }     if {![string is integer -strict $n]} { set n 0 }     set chanbanlist [lsort -index 2 -integer -decreasing [chanbans $chan]]     set lasts [lrange $chanbanlist end-[expr {$n - 1}] end]     foreach last $lasts {       pushmode $chan -b "[lindex $last 0]"       }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun May 07, 2023 1:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2023-05-07T12:24:57-04:00</updated>

		<published>2023-05-07T12:24:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111930#p111930</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111930#p111930"/>
		<title type="html"><![CDATA[remove last ban or a range of last set bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111930#p111930"><![CDATA[
tried your suggestion as well Spike^^ like this :<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- "!rlb" unban:lastbansproc unban:lastbans {nick uhost hand chan text} {   global botnick    if {![isop $nick $chan] &amp;&amp; ![ishalfop $nick $chan] &amp;&amp; ![matchattr $hand o|o $chan]} { return 0 }     set n [join [lindex $text 0]]     if {![string is integer -strict $n]} { set n 0 }     set chanbanlist [lsort -index 2 -integer -decreasing [chanbans $chan]]     set lasts [lrange $chanbanlist end-[expr {$n - 1}] end]     foreach last $lasts {       pushmode $chan -b $last     }}</code></pre></div>when i use like:<br><br> !rlb 5<br><br><br>for some reason it removes only 2 while there are 10 bans in the banlist<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun May 07, 2023 12:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2023-05-07T12:21:06-04:00</updated>

		<published>2023-05-07T12:21:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111929#p111929</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111929#p111929"/>
		<title type="html"><![CDATA[remove last ban or a range of last set bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111929#p111929"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set lasts [lrange $chanbanlist end-[expr {$n - 1}] end]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun May 07, 2023 12:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2023-05-07T12:14:59-04:00</updated>

		<published>2023-05-07T12:14:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111928#p111928</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111928#p111928"/>
		<title type="html"><![CDATA[remove last ban or a range of last set bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111928#p111928"><![CDATA[
thanks for the reply CrazyCat i tested it and found it sometimes when for example using like:<br><br> <blockquote class="uncited"><div>  !rlb 2  </div></blockquote>it removes 3 instead of 2<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun May 07, 2023 12:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2023-05-07T11:52:36-04:00</updated>

		<published>2023-05-07T11:52:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111927#p111927</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111927#p111927"/>
		<title type="html"><![CDATA[remove last ban or a range of last set bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111927#p111927"><![CDATA[
Quite easy, you didn't search a lot I guess:<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- "!rlb" unban:lastbansproc unban:lastbans {nick uhost hand chan text} {   global botnick    if {![isop $nick $chan] &amp;&amp; ![ishalfop $nick $chan] &amp;&amp; ![matchattr $hand o|o $chan]} { return 0 }     set n [join [lindex $text 0]]     if {![string is integer -strict $n]} { set n 0 }     set chanbanlist [lsort -index 2 -integer -decreasing [chanbans $chan]]     set lasts [lrange $chanbanlist end-$n end]     foreach last $lasts {         putquick "MODE $chan -b $last"     }  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sun May 07, 2023 11:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2023-05-07T11:17:37-04:00</updated>

		<published>2023-05-07T11:17:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111926#p111926</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111926#p111926"/>
		<title type="html"><![CDATA[remove last ban or a range of last set bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111926#p111926"><![CDATA[
greetingz folks,<br><br>we have been using this code for a while now and it works fine removing the last set single ban im wondering how this could be edited to remove either last few set bans or just the single last one that was set :<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- "!rlb" unban:lastbansproc unban:lastbans {nick uhost hand chan text} {   global botnick    if {![isop $nick $chan] &amp;&amp; ![ishalfop $nick $chan] &amp;&amp; ![matchattr $hand o|o $chan]} { return 0 }     set chanbanlist [lsort -index 2 -integer -decreasing [chanbans $chan]]     set last [lindex [lindex $chanbanlist end] 0]     if {[llength $chanbanlist] &gt; 0} {     putquick "MODE $chan -b $last"     return 0  }}</code></pre></div><br>for example :<br><br><blockquote class="uncited"><div> !rlb 4 </div></blockquote>to remove the last 4 set bans <br><br>or : <br><br><blockquote class="uncited"><div> !rlb </div></blockquote> <br><br>to remove only the single last set ban<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun May 07, 2023 11:17 am</p><hr />
]]></content>
	</entry>
	</feed>
