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

	<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>2018-05-24T00:43:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-05-24T00:43:28-04:00</updated>

		<published>2018-05-24T00:43:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106859#p106859</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106859#p106859"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106859#p106859"><![CDATA[
Your welcome. Sure, no problem.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu May 24, 2018 12:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-05-23T13:47:59-04:00</updated>

		<published>2018-05-23T13:47:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106858#p106858</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106858#p106858"/>
		<title type="html"><![CDATA[Super]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106858#p106858"><![CDATA[
The script works, thank you caesar! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>And thanks for willyw as well!<br><br>May I upload it to the tclarchive.org?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Wed May 23, 2018 1:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2018-05-23T02:24:15-04:00</updated>

		<published>2018-05-23T02:24:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106857#p106857</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106857#p106857"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106857#p106857"><![CDATA[
excellent it works well  <br><br>thnx caesar.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed May 23, 2018 2:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-05-23T01:10:12-04:00</updated>

		<published>2018-05-23T01:10:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106856#p106856</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106856#p106856"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106856#p106856"><![CDATA[
/facepalm<div class="codebox"><p>Code: </p><pre><code>if {![info exists $data]} return</code></pre></div>should be:<div class="codebox"><p>Code: </p><pre><code>if {![info exists data]} return</code></pre></div>notice the missing $ <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br><br>First is with clearbans(max) set to 5, then set it to 2 to see what happens.<blockquote class="uncited"><div>[08:02] * cez sets mode: +bbbbb *!*@host.com *!*@something.net *!bla@* john!*@* *!*@host.net<br>[08:02] * bot sets mode: -bbb *!*@host.net *!*@something.net *!*@host.com<br><br>[08:02] * cez sets mode: +bbb *!*@host.com *!*@something.net *!*@host.net<br>[08:02] * bot sets mode: -bb *!*@host.net *!*@host.com</div></blockquote>Set it to 3 and removes 3 oldest bans as should:<blockquote class="uncited"><div>[08:03] * cez sets mode: +bbb *!*@host.com *!*@something.net *!*@host.net<br>[08:05] * cez sets mode: +b *!*@host.org<br>[08:05] * bot sets mode: -bbb *!*@host.net *!*@something.net *!*@host.com</div></blockquote>And it works as expected. <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=187">caesar</a> — Wed May 23, 2018 1:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2018-05-22T18:16:31-04:00</updated>

		<published>2018-05-22T18:16:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106855#p106855</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106855#p106855"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106855#p106855"><![CDATA[
i tried it as well and nottin happens i made sure banlist is full and executed the script but it didnt do anything and no errors in PL<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue May 22, 2018 6:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-05-23T13:44:34-04:00</updated>

		<published>2018-05-22T11:44:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106854#p106854</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106854#p106854"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106854#p106854"><![CDATA[
Hello,<br><br>Sorry for the late answer, I was far from the "modern" world. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I tried the updated script but still no result. After "clearbans #channel" nothing happens.<br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Tue May 22, 2018 11:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2018-05-18T13:49:19-04:00</updated>

		<published>2018-05-18T13:49:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106852#p106852</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106852#p106852"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106852#p106852"><![CDATA[
<blockquote class="uncited"><div>Initially had that piece of code inside another function, but then decided to drop it and forgot to ....."</div></blockquote>Do I ever know THAT feeling ....   heheehehe<blockquote class="uncited"><div> Thanks willyw. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"></div></blockquote>You're welcome.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri May 18, 2018 1:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-05-18T00:43:04-04:00</updated>

		<published>2018-05-18T00:43:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106851#p106851</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106851#p106851"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106851#p106851"><![CDATA[
willyw is right. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> <br><br>Initially had that piece of code inside another function, but then decided to drop it and forgot to replace the <em class="text-italics">$max</em> variable with <em class="text-italics">$clearbans(max)</em> to suit the names in this code.<br><br>Anyway, updated the code above and should be good now. Thanks willyw. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri May 18, 2018 12:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2018-05-17T18:24:44-04:00</updated>

		<published>2018-05-17T18:24:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106850#p106850</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106850#p106850"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106850#p106850"><![CDATA[
<blockquote class="uncited"><div>...<br>Haven't tested this so let me know if you get any errors.</div></blockquote>Me either ... I haven't loaded it.<br>But I found it interesting.  <br><br>Have a look at this line:<div class="codebox"><p>Code: </p><pre><code>  if {$len &gt; $max)} {</code></pre></div>I don't see what sets $max prior to that line.<br>Maybe you meant to use the array var there? <br>That possibility might account for the unmatched  )   too.    <br><br>I hope this saves you some time.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Thu May 17, 2018 6:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-05-17T13:01:37-04:00</updated>

		<published>2018-05-17T13:01:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106849#p106849</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106849#p106849"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106849#p106849"><![CDATA[
<blockquote class="uncited"><div>The #channel is a valid channel, bot is on it and has channel operator? Are there any channel bans set in the format you said you want?</div></blockquote>Yes of course! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I forgot to mention a haven't got any error msgs aftet clearbans #channel.<br>Just nothing happened.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Thu May 17, 2018 1:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-05-17T12:58:33-04:00</updated>

		<published>2018-05-17T12:58:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106848#p106848</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106848#p106848"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106848#p106848"><![CDATA[
The #channel is a valid channel, bot is on it and has channel operator? Are there any channel bans set in the format you said you want?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu May 17, 2018 12:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-05-17T12:30:10-04:00</updated>

		<published>2018-05-17T12:30:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106847#p106847</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106847#p106847"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106847#p106847"><![CDATA[
Hi caesar!<br><br>Thank you for your help again.<br>I tested it but no action after <strong class="text-strong">clearbans #channel</strong> private command.<br><br>If I use <strong class="text-strong">clearbans</strong> I got: Usage: clearbans #channel<br>and <strong class="text-strong">clearbans channel</strong> (without #) I got: Error: help is not a valid input.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Thu May 17, 2018 12:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-05-23T01:11:55-04:00</updated>

		<published>2018-05-17T03:30:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106846#p106846</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106846#p106846"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106846#p106846"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set clearbans(max) 5bind msg o|o clearbans clear:bansproc clear:bans {nick uhost hand text} {if {[scan $text {%s} chan] != 1} {puthelp "PRIVMSG $nick :Usage: clearbans #channel"return}if {[string first # $chan] == -1 || ![validchan $chan]} {puthelp "PRIVMSG $nick :Error: $chan is not a valid input."return}if {![botonchan $chan]} {puthelp "PRIVMSG $nick :Error: I'm not on $chan channel."return}if {![botisop $chan]} {puthelp "PRIVMSG $nick :Error: I'm not a channel operator on $chan channel."return}global clearbansforeach {ban bywho age} [join [chanbans $chan]] {scan $ban {%[^!]!%[^@]@%s} n u h# format is *!*@hostif {$n != "*" || $u != "*"} continuelappend data [list $age $ban]}if {![info exists data]} returnset data [lsort -decreasing -integer -index 0 $data]set no 0foreach {age ban} [join $data] {incr noif {$no &gt; $clearbans(max)} breaklappend banlist $ban}set len [llength $banlist]while {$len &gt; 0} {if {$len &gt; $clearbans(max)} {set mode [string repeat "b" $clearbans(max)]set masks [join [lrange $banlist 0 [expr {$clearbans(max) - 1}]]]set banlist [lrange $banlist $clearbans(max) end]incr len -$clearbans(max)} else {set mode [string repeat "b" $len]set masks [join $banlist]set len 0}puthelp "MODE $chan -$mode $masks"}}</code></pre></div>Haven't tested this so let me know if you get any errors.<br><br>Edit: Fixed variables.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu May 17, 2018 3:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-05-23T13:48:31-04:00</updated>

		<published>2018-05-16T14:21:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106845#p106845</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106845#p106845"/>
		<title type="html"><![CDATA[[Solved]Old ban remover]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106845#p106845"><![CDATA[
Hello to everyone!<br><br>May I ask Your help to create a script for me?<br><br>My channel banlist often fills up and I thought  my bot should remove the 5 oldest ban if a halfop gives a private command to the bot.<br><br>The bans are only channel bans and the format is *!*@host. <br>Nickbans should not be removed.<br><br>The private command and the nr. of bans should be configured in the script.<br><br>Thanks for your replies!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Wed May 16, 2018 2:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
