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

	<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>2006-05-08T01:42:32-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Nivko]]></name></author>
		<updated>2006-05-08T01:42:32-04:00</updated>

		<published>2006-05-08T01:42:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62790#p62790</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62790#p62790"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62790#p62790"><![CDATA[
Nope, he works a couple of minutes and after that he isnt working anymore..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6984">Nivko</a> — Mon May 08, 2006 1:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nivko]]></name></author>
		<updated>2006-05-07T14:08:30-04:00</updated>

		<published>2006-05-07T14:08:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62773#p62773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62773#p62773"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62773#p62773"><![CDATA[
Thanks all, working perfect!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6984">Nivko</a> — Sun May 07, 2006 2:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nivko]]></name></author>
		<updated>2006-05-07T14:03:07-04:00</updated>

		<published>2006-05-07T14:03:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62771#p62771</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62771#p62771"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62771#p62771"><![CDATA[
Ok i gonna test <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=6984">Nivko</a> — Sun May 07, 2006 2:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-05-07T14:01:43-04:00</updated>

		<published>2006-05-07T14:01:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62770#p62770</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62770#p62770"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62770#p62770"><![CDATA[
No, that's for every 10 minutes. For saving every 10 seconds:<div class="codebox"><p>Code: </p><pre><code>bind join - * addtolistbind part - * remfromlistbind sign - * remfromlistif {![file exists online.txt]} { close [open online.txt w] }set nicklist [split [read [set oltxt [open online.txt]]] \n][close $oltxt]set recentnicks 0if {[utimerexists savelist]==""} { utimer 10 savelist}proc savelist {} { global recentnicks if {$recentnicks} {  set file [open online.txt w]  foreach n $::nicklist {   if {$n != ""} { puts $file $n }  }  close $file  set recentnicks 0 } utimer 10 savelist}proc addtolist {nick uhost hand chan} { global nicklist recentnicks set nick [string tolower $nick] if {[lsearch -exact $nicklist $nick] == -1} {  lappend nicklist $nick  set recentnicks 1 }}proc remfromlist {nick uhost hand chan rsn} { global nicklist recentnicks set nick [string tolower $nick] if {[set i [lsearch -exact $nicklist $nick]] != -1} {  set nicklist [lreplace $nicklist $i $i]  set recentnicks 1 }}</code></pre></div>Note: alltools.tcl should be loaded for the utimerexists command to work.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun May 07, 2006 2:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nivko]]></name></author>
		<updated>2006-05-07T13:56:17-04:00</updated>

		<published>2006-05-07T13:56:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62769#p62769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62769#p62769"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62769#p62769"><![CDATA[
Ok i will save on every 10 seconds should i use this:?<br><div class="codebox"><p>Code: </p><pre><code>bind time - ?10* savelist bind join - * addtolist bind part - * remfromlist bind sign - * remfromlist if {![file exists online.txt]} { close [open online.txt w] } set nicklist [split [read [set oltxt [open online.txt]]] \n][close $oltxt] proc savelist args {  set file [open online.txt w]  foreach n $::nicklist {   if {$n != ""} { puts $file $n }  }  close $file } proc addtolist {nick uhost hand chan} {  global nicklist  set nick [string tolower $nick]  if {[lsearch -exact $nicklist $nick] == -1} {   lappend nicklist $nick  } } proc remfromlist {nick uhost hand chan rsn} {  global nicklist  set nick [string tolower $nick]  if {[set i [lsearch -exact $nicklist $nick]] != -1} {   set nicklist [lreplace $nicklist $i $i]  } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6984">Nivko</a> — Sun May 07, 2006 1:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-05-07T13:37:39-04:00</updated>

		<published>2006-05-07T13:37:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62767#p62767</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62767#p62767"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62767#p62767"><![CDATA[
if you want max speed on casual events and make slow on more frequent events, you could use a var like "recentlysaved" and set it to 1 each time you save, use a utimer to wait for 10sec until next save. or you generally initialize a 1 sec delayed save on each event (which gives time for more events to be saved within that 1sec).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun May 07, 2006 1:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nivko]]></name></author>
		<updated>2006-05-07T11:47:40-04:00</updated>

		<published>2006-05-07T11:47:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62764#p62764</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62764#p62764"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62764#p62764"><![CDATA[
So this:<br><div class="codebox"><p>Code: </p><pre><code>proc addtolist {nick uhost hand chan} {  global nicklist  set nick [string tolower $nick]  if {[lsearch -exact $nicklist $nick] == -1} {   lappend nicklist $nick   savelist  } } proc remfromlist {nick uhost hand chan rsn} {  global nicklist  set nick [string tolower $nick]  if {[set i [lsearch -exact $nicklist $nick]] != -1} {   set nicklist [lreplace $nicklist $i $i]   savelist  } }proc savelist args {  set file [open online.txt w]  foreach n $::nicklist {   if {$n != ""} { puts $file $n }  }  close $file } </code></pre></div>I gonna this it and else i use your way<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6984">Nivko</a> — Sun May 07, 2006 11:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-05-07T11:38:35-04:00</updated>

		<published>2006-05-07T11:38:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62763#p62763</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62763#p62763"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62763#p62763"><![CDATA[
It's not recommended because it becomes CPU intensive to open and close the file everytime someone joins/parts/quits especially on mass events. Your code is alright, you only need to change these procs:<div class="codebox"><p>Code: </p><pre><code>proc addtolist {nick uhost hand chan} { global nicklist set nick [string tolower $nick] if {[lsearch -exact $nicklist $nick] == -1} {  lappend nicklist $nick  savelist }}proc remfromlist {nick uhost hand chan rsn} { global nicklist set nick [string tolower $nick] if {[set i [lsearch -exact $nicklist $nick]] != -1} {  set nicklist [lreplace $nicklist $i $i]  savelist }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun May 07, 2006 11:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nivko]]></name></author>
		<updated>2006-05-07T11:29:05-04:00</updated>

		<published>2006-05-07T11:29:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62762#p62762</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62762#p62762"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62762#p62762"><![CDATA[
Why it isnt recommed? BTW is this good without timer?:<br><div class="codebox"><p>Code: </p><pre><code>bind join - * addtolist bind part - * remfromlist bind sign - * remfromlist if {![file exists online.txt]} { close [open online.txt w] } set nicklist [split [read [set oltxt [open online.txt]]] \n][close $oltxt] proc savelist args {  set file [open online.txt w]  foreach n $::nicklist {   if {$n != ""} { puts $file $n }  }  close $file } proc addtolist {nick uhost hand chan} {  global nicklist  set nick [string tolower $nick]  if {[lsearch -exact $nicklist $nick] == -1} {   lappend nicklist $nick  } } proc remfromlist {nick uhost hand chan rsn} {  global nicklist  set nick [string tolower $nick]  if {[set i [lsearch -exact $nicklist $nick]] != -1} {   set nicklist [lreplace $nicklist $i $i]  } }</code></pre></div>[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6984">Nivko</a> — Sun May 07, 2006 11:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-05-07T11:26:08-04:00</updated>

		<published>2006-05-07T11:26:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62761#p62761</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62761#p62761"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62761#p62761"><![CDATA[
Well, what you're requesting is not recommended. If you want it to save immediately, you know what to fix.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun May 07, 2006 11:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nivko]]></name></author>
		<updated>2006-05-07T11:24:06-04:00</updated>

		<published>2006-05-07T11:24:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62760#p62760</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62760#p62760"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62760#p62760"><![CDATA[
Sorry, but i need live if somone parts he must write and joins too:$<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6984">Nivko</a> — Sun May 07, 2006 11:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-05-07T11:22:43-04:00</updated>

		<published>2006-05-07T11:22:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62759#p62759</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62759#p62759"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62759#p62759"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind time - ?0* savelistbind join - * addtolistbind part - * remfromlistbind sign - * remfromlistif {![file exists online.txt]} { close [open online.txt w] }set nicklist [split [read [set oltxt [open online.txt]]] \n][close $oltxt]proc savelist args { set file [open online.txt w] foreach n $::nicklist {  if {$n != ""} { puts $file $n } } close $file}proc addtolist {nick uhost hand chan} { global nicklist set nick [string tolower $nick] if {[lsearch -exact $nicklist $nick] == -1} {  lappend nicklist $nick }}proc remfromlist {nick uhost hand chan rsn} { global nicklist set nick [string tolower $nick] if {[set i [lsearch -exact $nicklist $nick]] != -1} {  set nicklist [lreplace $nicklist $i $i] }}</code></pre></div>This will add the nicks on join to the list and will remove the nicks from the list on part/quit. The list will be saved every 10 minutes into the file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun May 07, 2006 11:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nivko]]></name></author>
		<updated>2006-05-07T10:29:19-04:00</updated>

		<published>2006-05-07T10:29:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62755#p62755</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62755#p62755"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62755#p62755"><![CDATA[
Uhm, i cant script TCL... Could you make it for me..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6984">Nivko</a> — Sun May 07, 2006 10:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-05-07T10:26:49-04:00</updated>

		<published>2006-05-07T10:26:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62754#p62754</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62754#p62754"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62754#p62754"><![CDATA[
best you save the nicks as a list. and lsearch/lreplace the nick (or lappend in case to add one).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun May 07, 2006 10:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nivko]]></name></author>
		<updated>2006-05-07T09:49:49-04:00</updated>

		<published>2006-05-07T09:49:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62751#p62751</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62751#p62751"/>
		<title type="html"><![CDATA[Writing to a TXT]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62751#p62751"><![CDATA[
Ok, thanks that is the first part of the script <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><br><br>Now how remove the line if somone parts  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mad.gif" width="15" height="15" alt=":x" title="Mad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6984">Nivko</a> — Sun May 07, 2006 9:49 am</p><hr />
]]></content>
	</entry>
	</feed>
