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

	<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-03-22T06:09:58-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Danko]]></name></author>
		<updated>2006-03-22T06:09:58-04:00</updated>

		<published>2006-03-22T06:09:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61265#p61265</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61265#p61265"/>
		<title type="html"><![CDATA[Need a small add script :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61265#p61265"><![CDATA[
Hi there,<br><br>I need a small script for adding and reading data from a file.<br><br>The trigger it must respond to looks like this:<br>!add data type<br><br>If I'm not mistaken code for that part should be <div class="codebox"><p>Code: </p><pre><code>set data [lindex [split $arg] 1]set type [lindex [split $arg] 2] </code></pre></div>However, I need to write whats added to a texfile, new line each time something gets added. Textfile should look like "<em class="text-italics">unixtime type data</em>".<br><br>For the reading part, trigger would be <em class="text-italics">!find data</em>.<br>Output to chan would be <strong class="text-strong">FOUND: <em class="text-italics">data</em> was added XXX </strong>(w/d/hr/m/s)<strong class="text-strong"> ago (mmdd).</strong>.<br><br>Thats all I need. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>However, if possible and if its not too much work, there would also be quite nice with;<br><br><strong class="text-strong">·</strong> Reading from textfile before adding to check if <em class="text-italics">data</em> allready exists. If so, return/halt.<br><strong class="text-strong">·</strong> Adding the recently added data into cach/memory for 3600 seconds, and check cach/memory if data is allready there before checking from textfile (would prevent unnecessary lag/reading afaik).<br><br>I'd be greatful for any help I could get. <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=7471">Danko</a> — Wed Mar 22, 2006 6:09 am</p><hr />
]]></content>
	</entry>
	</feed>
