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

	<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>2007-08-05T10:20:37-04:00</updated>

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

		<entry>
		<author><name><![CDATA[BrewMaster]]></name></author>
		<updated>2007-08-05T10:20:37-04:00</updated>

		<published>2007-08-05T10:20:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=75020#p75020</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=75020#p75020"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=75020#p75020"><![CDATA[
works great!   thank you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9131">BrewMaster</a> — Sun Aug 05, 2007 10:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-07-31T13:01:14-04:00</updated>

		<published>2007-07-31T13:01:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74877#p74877</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74877#p74877"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74877#p74877"><![CDATA[
Would easiest be a matter of changing the binding into this:<div class="codebox"><p>Code: </p><pre><code>bind dcc nm purgebans dcc:purgebans</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Jul 31, 2007 1:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BrewMaster]]></name></author>
		<updated>2007-07-31T11:29:54-04:00</updated>

		<published>2007-07-31T11:29:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74874#p74874</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74874#p74874"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74874#p74874"><![CDATA[
One last request....and I think this is easy, but I have no idea how to do it.<br><br>Can we make the binded command only usable by a +m or higher user?<br><br>I don't really want to have anyone but the bot masters and owners triggering the purgebans command.<br><br><br>Excellent work on that script..It works great!<br><br>brew<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9131">BrewMaster</a> — Tue Jul 31, 2007 11:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BrewMaster]]></name></author>
		<updated>2007-07-31T10:16:47-04:00</updated>

		<published>2007-07-31T10:16:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74872#p74872</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74872#p74872"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74872#p74872"><![CDATA[
nml375<br><br>Worked Great!!   Just what I was looking for.  Thank you.<br><br>Brew<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9131">BrewMaster</a> — Tue Jul 31, 2007 10:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-07-31T09:25:20-04:00</updated>

		<published>2007-07-31T09:25:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74870#p74870</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74870#p74870"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74870#p74870"><![CDATA[
Fixed.<br>Must've been abit too tired when writing that code. I hav'nt seen any further obvious flaws as of now. As soon as I get access to my devel-eggies, I'll have a more throughout bughunt, but it should work fine now.<br>Post above updated again.<br><span style="color:red">Edit: <em class="text-italics">Finally got in touch with those eggies, revealed one additional typo, apart from that, runs like a charm for me.</em></span><br><br>@Awyeah: Your script still does not alter the internal banlist, which is the topic of this thread.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Jul 31, 2007 9:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BrewMaster]]></name></author>
		<updated>2007-07-31T06:33:01-04:00</updated>

		<published>2007-07-31T06:33:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74867#p74867</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74867#p74867"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74867#p74867"><![CDATA[
nml375<br><br>the new error:<br><br>Tcl error [dcc:purgebans]: missing close-bracket<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9131">BrewMaster</a> — Tue Jul 31, 2007 6:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2007-07-31T04:16:52-04:00</updated>

		<published>2007-07-31T04:16:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74862#p74862</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74862#p74862"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74862#p74862"><![CDATA[
Perhaps this might lure your interest:<br><a href="http://forum.egghelp.org/viewtopic.php?t=13839" class="postlink">http://forum.egghelp.org/viewtopic.php?t=13839</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Tue Jul 31, 2007 4:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BrewMaster]]></name></author>
		<updated>2007-07-31T00:07:48-04:00</updated>

		<published>2007-07-31T00:07:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74859#p74859</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74859#p74859"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74859#p74859"><![CDATA[
that was all Greek to me awyeah.<br>I was thinking that this script would run when triggered by a dcc command, then post what it removed. I guess I am off on my assumptions.<br><br>brew<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9131">BrewMaster</a> — Tue Jul 31, 2007 12:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2007-07-30T20:58:48-04:00</updated>

		<published>2007-07-30T20:58:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74858#p74858</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74858#p74858"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74858#p74858"><![CDATA[
Well I think he wanted the script to be automated, so instead of bind dcc here, you have to use bind time BrewMaster or just use a proc with a continuous timer calling the ban remove proc.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Jul 30, 2007 8:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-07-30T14:49:53-04:00</updated>

		<published>2007-07-30T14:49:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74852#p74852</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74852#p74852"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74852#p74852"><![CDATA[
Minor bummer by me  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> <br>Updated the post above to properly read the variable containing -<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon Jul 30, 2007 2:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BrewMaster]]></name></author>
		<updated>2007-07-30T14:43:12-04:00</updated>

		<published>2007-07-30T14:43:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74851#p74851</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74851#p74851"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74851#p74851"><![CDATA[
Tcl error [dcc:purgebans]: can't read "::default": no such variable<br><br>(using dcc chat interface code)<br><br>I used .purgebans in dcc chat<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9131">BrewMaster</a> — Mon Jul 30, 2007 2:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BrewMaster]]></name></author>
		<updated>2007-07-30T13:10:03-04:00</updated>

		<published>2007-07-30T13:10:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74847#p74847</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74847#p74847"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74847#p74847"><![CDATA[
Thank you very much for the help.<br><br>I am off to go test this script!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9131">BrewMaster</a> — Mon Jul 30, 2007 1:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-07-30T07:55:19-04:00</updated>

		<published>2007-07-30T07:55:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74845#p74845</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74845#p74845"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74845#p74845"><![CDATA[
1: Where you place the bindings really does'nt matter, as long as the proc exists once the binding is triggered. Last piece of code was just a quick user interface for the first script (which could be used by other scripts aswell).<br><br>2: Short answer: yes.<br>Long answer: Kinda, it is the default age to be used, should the scripter not provide one when calling the purgebanlist function. As I was a lazy coder when writing the user interface, I just went for the default.<br><br>3: B. The script will check both "added at" and "last used", and make sure both are older than the specified age before removing the ban. It will, however, currently not check wether the ban has an expire-time set, so it will remove bans that might've been scheduled for later removal.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon Jul 30, 2007 7:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BrewMaster]]></name></author>
		<updated>2007-07-30T07:08:44-04:00</updated>

		<published>2007-07-30T07:08:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74843#p74843</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74843#p74843"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74843#p74843"><![CDATA[
two quick questions...<br>1. I place the binds at the beginning of the script? or is it irrelevant where they are placed.<br><br>2. The first line ....       set default-purgeage ###   is where I set the age of the unused bans I want to  remove?  I assume a value of 90 would remove all bans set over 90 days ago from the bots ban listing.<br><br>Finally, because I don't understand/read code well,  If I have a ban in the bots ban list  for example: <blockquote class="uncited"><div>[05:55] &lt;MyBot&gt;   [2331] *!*@192.168.1.1 (perm)<br>[05:55] &lt;MyBot&gt;         Larry: Flooders<br>[05:55] &lt;MyBot&gt;         Created 37 days ago, last used 2 days ago</div></blockquote>And I have the line set default-purgeage 35   set in the script. what will be the outcome?<br><br>A.  The ban will be flushed because it was created 37 days ago (purge age set to 35)<br>OR<br>B.  The ban will not be flushed because even though it was created 37 days ago it has been used within the last 35 days. (last used 2 days ago)<br><br>I hope I am not confusing you.   Thank you in advance for all the help!!<br><br>brew<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9131">BrewMaster</a> — Mon Jul 30, 2007 7:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-07-31T09:34:53-04:00</updated>

		<published>2007-07-29T16:51:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74837#p74837</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74837#p74837"/>
		<title type="html"><![CDATA[Bot banlist cleaner/administrator]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74837#p74837"><![CDATA[
Although not a complete script, I do have bits'n'pieces that will clean your banlist of old, unused bans..<div class="codebox"><p>Code: </p><pre><code>set default-purgeage 180#purgebanlist ?-age days? ?&amp;/#channel?#Checks through the specified banlist and removes any and all older#bans that have not been in use in the specified number of days.#Returns: A list of ban-structures, format similar to "banlist".proc purgebanlist args { #Initialize local variables if {[info exists ::default-purgeage]} {  set purgeage ${::default-purgeage} } set removed [list] #Read and interpret parameters #Only takes -age and optional channelname sofar... guess more might be added further on for {set i 0} {$i &lt; [llength $args]} {incr i} {  switch -glob -- [lindex $args $i] {   "-age" {    if {[string is integer [lindex $args [incr i]]]} {     set purgeage [lindex $args $i]    } {     error "Age is not an integer: [lindex $args $i]"    }   }   "#*" -   "&amp;*" {    set channel [lindex $args $i]    if {![validchan $channel]} {     error "Invalid channel: $channel"    }   }   default {error "Unknown option: [lindex $args $i]"}  } } #Lets make sure we have a sane value to check age against #If not, just error out since we really don't know how to fix #it anyway if {[info exists purgeage] &amp;&amp; [string is integer $purgeage]} {  set threshold [expr [clock seconds] - $purgeage * 86400] } {  error "No valid age-setting was found." } #Get the list of bans... if {[info exists channel]} {  set bans [banlist $channel] } {  set bans [banlist] } #...and start processing them. Save the removed bans for now. foreach ban $bans {  if {[lindex $ban 3] &lt; $threshold &amp;&amp; [lindex $ban 4] &lt; $threshold} {   if {[info exists channel]} {    killchanban $channel [lindex $ban 0]   } {    killban [lindex $ban 0]   }   lappend removed $ban  } } #Return the list of removed bans, so the scripter can present this #in some fancy way with pretty colors *yuck* return $removed}</code></pre></div><span style="color:red">Edit: <em class="text-italics">fix for troublesome variablenames containing -</em><br>Edit: <em class="text-italics">fixed missing close-bracket</em><br>Edit: <em class="text-italics">missing space in "is integer"</em></span><br><br>This could be used with something like this, in order to provide some dcc-chat interface:<div class="codebox"><p>Code: </p><pre><code>bind dcc - purgebans dcc:purgebansproc dcc:purgebans {hand idx text} { foreach chan [channels] {  foreach ban [purgebanlist $chan] {   putidx $idx "Removed \"[lindex $ban 0]\" from $chan"  } } foreach ban [purgebanlist] {  putidx $idx "Removed \"[lindex $ban 0]\" from global banlist" }}</code></pre></div>Of course, this could be extended to allow you to specify how old a ban must be in order to be removed, which banlist to cleanse, some fancy bells'n'whistles, etc.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Jul 29, 2007 4:51 pm</p><hr />
]]></content>
	</entry>
	</feed>
