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

	<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>2002-01-13T21:06:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-13T21:06:00-04:00</updated>

		<published>2002-01-13T21:06:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3774#p3774</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3774#p3774"/>
		<title type="html"><![CDATA[Write/reading file question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3774#p3774"><![CDATA[
Thnx it works now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mad.gif" width="15" height="15" alt=":mad:" title="Mad"><br>(this is my first script so it's still kinda hard ;P)<br><p>Statistics: Posted by Guest — Sun Jan 13, 2002 9:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-13T20:21:00-04:00</updated>

		<published>2002-01-13T20:21:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3771#p3771</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3771#p3771"/>
		<title type="html"><![CDATA[Write/reading file question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3771#p3771"><![CDATA[
1st:<br>set fs [open "REQ.db" a]<br>(a will append, w will truncate and overwrite)<br><br>the second is a weird error wich shouldn't happen afaik, you can try to put REQ.db in quotes ("REQ.db") and try r+ instead of r<br><br>it could be a tcl problem (wich version are you using?)<br><br>btw.<br>putserv "NOTICE $nick : $fs" isn't right, it should be $info instead of $fs, but also, $info will have eol chars in it when using read, use something like<br><div class="codebox"><p>Code: </p><pre><code>foreach line [split $info "n"] {  putserv "NOTICE $nick : $line"}</code></pre></div>hope this helps atleast a bit<br><br><br><p>Statistics: Posted by Guest — Sun Jan 13, 2002 8:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-10T13:26:00-04:00</updated>

		<published>2002-01-10T13:26:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3678#p3678</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3678#p3678"/>
		<title type="html"><![CDATA[Write/reading file question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3678#p3678"><![CDATA[
k i got 2 questions.<br>1) <div class="codebox"><p>Code: </p><pre><code>bind pub - !addREQ pub:addREQproc pub:addREQ {nick uhost hand chan REQ} {global REQdirif {$REQ != ""} {set fs [open REQ.db w]puts $fs "$REQ"puthelp "NOTICE $nick : $REQ added to request list"close $fs} else { puthelp "NOTICE $nick :Usage: !addREQ &lt;requested file&gt;" } } </code></pre></div>This part keeps overwriting the added request instead of adding it to the file/list.<br>f.e. if i type !addREQ  test  and !addREQ test2 the REQ.db should have both lines in it and currently it only has the last one. :<br><br>2) For the reading part i have this<div class="codebox"><p>Code: </p><pre><code>bind pub = !viewREQ pub:viewREQproc pub:viewREQ {nick uhost hand chan arg } {set fs [open REQ.db r]set info [read $fs]putserv "NOTICE $nick : $fs" close $fs}</code></pre></div>But if i type !viewREQ i get this -&gt; TCL error [pub:viewREQ]: channel "file10" wasn't opened for reading  and typing !viewREQ again makes it  file11 , file12 etc etc.<br>I don't know where the hell he gets it from but i just wan't to see the list of requests from the REQ.db<br><br>Thnx for all you help<br><br>-Da Newbie Out<br><br>&lt;font size=-1&gt;[ This Message was edited by: Ixje on 2002-01-10 10:52 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Thu Jan 10, 2002 1:26 pm</p><hr />
]]></content>
	</entry>
	</feed>
