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

	<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>2005-07-11T06:42:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Doos]]></name></author>
		<updated>2005-07-11T06:42:19-04:00</updated>

		<published>2005-07-11T06:42:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52241#p52241</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52241#p52241"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52241#p52241"><![CDATA[
Ah now I see, it's a quotation without interpolation.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6449">Doos</a> — Mon Jul 11, 2005 6:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-10T20:03:06-04:00</updated>

		<published>2005-07-10T20:03:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52211#p52211</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52211#p52211"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52211#p52211"><![CDATA[
It's not advisable to use '-' in a variable name, if you used $kick-nick instead of ${kick-nick} then it would've told you "tcl error no such variable kick" (i.e. it's the same as putting $kick). I remember reading about this 2 years ago, maybe it's in the forum I'm not sure.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jul 10, 2005 8:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Doos]]></name></author>
		<updated>2005-07-10T11:59:32-04:00</updated>

		<published>2005-07-10T11:59:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52181#p52181</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52181#p52181"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52181#p52181"><![CDATA[
Yes that part I understand (I experimented with $kick-nick) , I was actually thinking of what ${kick-nick} does .. is that some sort of reference?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6449">Doos</a> — Sun Jul 10, 2005 11:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-10T11:27:13-04:00</updated>

		<published>2005-07-10T11:27:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52178#p52178</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52178#p52178"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52178#p52178"><![CDATA[
It's pretty simple if you think about it, $nick is the one who kicked ${kick-nick}, thus $nick is till in the channel while ${kick-nick} is out and should be removed from the list.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jul 10, 2005 11:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Doos]]></name></author>
		<updated>2005-07-10T11:19:02-04:00</updated>

		<published>2005-07-10T11:19:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52177#p52177</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52177#p52177"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52177#p52177"><![CDATA[
Thanks, that did the trick.<br><br>Care to explain a bit what happened?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6449">Doos</a> — Sun Jul 10, 2005 11:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-10T10:37:20-04:00</updated>

		<published>2005-07-10T10:37:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52173#p52173</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52173#p52173"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52173#p52173"><![CDATA[
you should use ${kick-nick} instead of $nick.<br><br>PS: I suggest you change kick-nick to something else like kn or targ.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jul 10, 2005 10:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Doos]]></name></author>
		<updated>2005-07-10T06:50:23-04:00</updated>

		<published>2005-07-10T06:50:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52162#p52162</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52162#p52162"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52162#p52162"><![CDATA[
Maybe I should explain how I think when I see that code (I'm new to Tcl).<br><br>if {[set idx [lsearch -exact $::nicks $nick]] != -1} { ##here you test if the nick is in the $::nick list (an array I presume) and set the result (the nick) in $idx<br><br>set ::nicks [lreplace $::nicks $idx $idx] ##here you replace the $idx'ed entry in the array to the same nick in $idx (here is where I get totally lost)<br><br>Then write it to file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6449">Doos</a> — Sun Jul 10, 2005 6:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Doos]]></name></author>
		<updated>2005-07-10T06:32:13-04:00</updated>

		<published>2005-07-10T06:32:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52160#p52160</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52160#p52160"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52160#p52160"><![CDATA[
Thanks all for the help.<br>Most of it works now (except the bind kick).<br><br>I added a nickchange detector which actually seems to work, don't ask me how.<br><br>When the following kick proc gets executed, it deletes the first entry in the list (or the one who does the kick). Anyone has a suggestion?<br><div class="codebox"><p>Code: </p><pre><code>bind kick - * log_kickproc log_kick {nick uhost handle chan kick-nick msg} {  if {[set idx [lsearch -exact $::nicks $nick]] != -1} {    set ::nicks [lreplace $::nicks $idx $idx]  set fd [open /home/me/whoisonline.txt w]  puts $fd [join $::nicks]  close $fd  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6449">Doos</a> — Sun Jul 10, 2005 6:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-08T21:05:01-04:00</updated>

		<published>2005-07-08T21:05:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52064#p52064</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52064#p52064"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52064#p52064"><![CDATA[
of course, you also need to bind to SIGN (that's quit) and KICK - two other events that take out nicks off the channel<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Jul 08, 2005 9:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-08T20:11:31-04:00</updated>

		<published>2005-07-08T20:11:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52061#p52061</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52061#p52061"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52061#p52061"><![CDATA[
01**** (which is the same as 01* btw) will trigger every hour at 01 minutes. If you want to save the list every minute then * should do it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Jul 08, 2005 8:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Doos]]></name></author>
		<updated>2005-07-08T15:37:11-04:00</updated>

		<published>2005-07-08T15:37:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52022#p52022</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52022#p52022"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52022#p52022"><![CDATA[
Interesting demond,<br><br>I'm going to study that.<br>Just a short question before I dive into Tcl, if I replace ?0* with 01**** .. would that update every minute?<br><br>Oh nevermind, I should just get of my lazy ass and read the fabulous manual.<br><br>Thanks <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=6449">Doos</a> — Fri Jul 08, 2005 3:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-08T14:48:39-04:00</updated>

		<published>2005-07-08T14:48:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52007#p52007</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52007#p52007"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52007#p52007"><![CDATA[
you are missing the fact that PART bind triggers before eggdrop removing nick from [chanlist]<br><br>here's how this should be done:<div class="codebox"><p>Code: </p><pre><code>bind join - * log_joinbind part - * log_partbind time - ?0* log_save ;# save chanlist every 10 minutesif {[botonchan #chan]} {set nicks [chanlist #chan]} {set nicks {}}proc log_join {nick uhost handle chan} {  if {[lsearch -exact $::nicks $nick] == -1} {    lappend ::nicks $nick  }}proc log_part {nick uhost handle chan msg} {  if {[set idx [lsearch -exact $::nicks $nick]] != -1} {    set ::nicks [lreplace $::nicks $idx $idx]  }}proc log_save {min hour day mon year} {  set fd [open /home/me/whoisonline.txt w]  puts $fd [join $::nicks]  close $fd  }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Jul 08, 2005 2:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Doos]]></name></author>
		<updated>2005-07-08T07:12:27-04:00</updated>

		<published>2005-07-08T07:12:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51991#p51991</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51991#p51991"/>
		<title type="html"><![CDATA[memory issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51991#p51991"><![CDATA[
Hi all,<br><br>I'm trying to write a small script that reads the nicks in the channel to file.<br>Which then later will be used on a webpage.<br><br>My problem is that when someone does a /part, his/her nick stays in the list. I'm probably missing the obvious in my test script, but could someone give me some pointers.<br><br>Thanks.<br><div class="codebox"><p>Code: </p><pre><code>bind join - * log_joinbind part - * log_partproc log_join {nick uhost handle chan} {  set fd [open "/home/me/whoisonline.txt" w]  set nicks [chanlist $chan]  puts $fd [join $nicks]  close $fd  return 0}proc log_part {nick uhost handle chan msg} {  set fd [open "/home/me/whoisonline.txt" w]  set nicks [chanlist $chan]  puts $fd [join $nicks]  close $fd  return 0}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6449">Doos</a> — Fri Jul 08, 2005 7:12 am</p><hr />
]]></content>
	</entry>
	</feed>
