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

	<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>2009-03-01T13:26:55-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-03-01T13:26:55-04:00</updated>

		<published>2009-03-01T13:26:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87645#p87645</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87645#p87645"/>
		<title type="html"><![CDATA[stange results with file access]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87645#p87645"><![CDATA[
The ~-file is merely a temporary cache created by gedit, partly to allow you to resume editing upon a crash without having to save every 2 seconds. I assume you remembered to save in gedit, and .rehash/.restart in eggdrop?<br><br>Are there any other functions/scripts/programs accessing that triggers.txt file? Most linux and *bsd systems allows one file to be opened in multiple instances under certain conditions. More so, one may open a file for writing while some other process has opened it for reading. In this case, the other process will not see your changes until it closes the file and opens it again for reading.<br><br>This is flawed (yet unrelated to your issues):<div class="codebox"><p>Code: </p><pre><code>set thestb [lindex $text 1]#use this insteadset thestb [lindex [split $text] 1]#Same goes for this lineputs $out [lrange $text 1 end]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Mar 01, 2009 1:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[topdawg_b]]></name></author>
		<updated>2009-03-01T10:06:18-04:00</updated>

		<published>2009-03-01T10:06:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87643#p87643</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87643#p87643"/>
		<title type="html"><![CDATA[stange results with file access]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87643#p87643"><![CDATA[
i have a  file called ftaserv.tcl when i  access this   tcl to make a change with gedit when i save  the file. a hidden file appears called ftaserv.tcl~  and the  changes i made   dont take  affect. if i access this new file  and make  the  changes in it. another hidden file opens called ftaserv.tcl~~  etc...  this same script accesses a  file in the  eggdrop dir called triggers.txt. I access this file with<div class="codebox"><p>Code: </p><pre><code>proc trig:add {nick user@host handle text} {putserv "privmsg #just :this is a test"putserv "privmsg topdawg :this is another test"set thestb [lindex $text 1]set in [open "triggers.txt" r] set data [read $in] set line [split $data \n] set here [lsearch [string tolower $line] "$thestb *"]if {$here != -1} {putserv "privmsg $nick :$thestb already on file. use .trigupd $thestb address";return}close $inset out [open "triggers.txt" a]puts $out [lrange $text 1 end]close $out}</code></pre></div>if i access this  with  .trigadd newtest this is a test.<br>the  first time it accepts it. if I do it again it  says already on file  like its suppose to. however there is nothing in the file and  none of the other scripts can access the newly added info. been looking at it for hours. this was working  fine  yesterday. and  still works fine on my other bot. (on a different box). im really  confused. thanks in advance<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10347">topdawg_b</a> — Sun Mar 01, 2009 10:06 am</p><hr />
]]></content>
	</entry>
	</feed>
