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

	<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-09-16T11:16:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[JoshuaUK]]></name></author>
		<updated>2005-09-16T11:16:20-04:00</updated>

		<published>2005-09-16T11:16:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55778#p55778</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55778#p55778"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55778#p55778"><![CDATA[
<blockquote class="uncited"><div>Sorted it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> is there a way I can alter things like have!get changed to !test for example? if not that's cool, I know I can change get to anything like another word so like !info chart for example. But it seems to work with those ones so far <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> getting somewhere now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"></div></blockquote>So it could be just a trigger of !rules or !chart etc... just curious, sorry to be a pain lol I know I am being a pain to all you guys really,but fantastic that I can now actually call info from a text file in chat <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=6566">JoshuaUK</a> — Fri Sep 16, 2005 11:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JoshuaUK]]></name></author>
		<updated>2005-09-14T16:46:53-04:00</updated>

		<published>2005-09-14T16:46:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55724#p55724</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55724#p55724"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55724#p55724"><![CDATA[
Sorted it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> is there a way I can alter things like have!get changed to !test for example? if not that's cool, I know I can change get to anything like another word so like !info chart for example. But it seems to work with those ones so far <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> getting somewhere now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6566">JoshuaUK</a> — Wed Sep 14, 2005 4:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-14T16:24:57-04:00</updated>

		<published>2005-09-14T16:24:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55723#p55723</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55723#p55723"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55723#p55723"><![CDATA[
I didn't say <em class="text-italics">!key1</em>, I said <em class="text-italics">!get key1</em><br><br>if you are not sure if you have a particular file in a particular directory, you shouldn't be running eggdrop<br><br>and <em class="text-italics">key1</em> is a placeholder for your actual key (0509, Rules, Chart or whatever), it couldn't be more obvious than that<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Sep 14, 2005 4:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JoshuaUK]]></name></author>
		<updated>2005-09-14T16:03:46-04:00</updated>

		<published>2005-09-14T16:03:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55722#p55722</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55722#p55722"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55722#p55722"><![CDATA[
Loads now without crashing, but not able to get it to say anything when I type !key1 or (can I alter that too to another key?) Not sure I have the text file "file.txt" in the main directory and the tcl is set in config and is called info.tcl<br><br>This is the code..<div class="codebox"><p>Code: </p><pre><code>array unset data {} if {![catch {set f [open file.txt]}]} {    foreach t [split [read $f] \n] {       if {[string match !* $t]} {          set k [string range $t 1 e]          set data($k) {}       } {          lappend data($k) $t       }    }    close $f } bind pub - !get foo proc foo {n u h c t} {    if {[info exists ::data($t)]} {       foreach e $::data($t) {puthelp "notice $n :$e"}    } {       puthelp "notice $n :no data found for $t"    } }</code></pre></div>the file.txt is also in the bot directory just had it there too...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6566">JoshuaUK</a> — Wed Sep 14, 2005 4:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-13T21:48:27-04:00</updated>

		<published>2005-09-13T21:48:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55712#p55712</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55712#p55712"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55712#p55712"><![CDATA[
<blockquote class="uncited"><div>There's already a variable called <strong class="text-strong">data</strong> on your bot, thus you can't use it as an array. Replace <strong class="text-strong">data</strong> with some other array name.</div></blockquote>nah... actually I'm initializing <em class="text-italics">data</em> incorrectly<br><br>JoshuaUK, substitute first line of the script with <em class="text-italics">array unset data</em><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Sep 13, 2005 9:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-09-13T20:16:30-04:00</updated>

		<published>2005-09-13T20:16:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55707#p55707</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55707#p55707"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55707#p55707"><![CDATA[
There's already a variable called <strong class="text-strong">data</strong> on your bot, thus you can't use it as an array. Replace <strong class="text-strong">data</strong> with some other array name.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Sep 13, 2005 8:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JoshuaUK]]></name></author>
		<updated>2005-09-13T19:52:55-04:00</updated>

		<published>2005-09-13T19:52:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55706#p55706</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55706#p55706"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55706#p55706"><![CDATA[
[00:49] can't set "data(key1 )": variable isn't array<br>    while executing<br>"set data($k) {} "<br>    ("foreach" body line 4)<br>    invoked from within<br>"foreach t [split [read $f] \n] {<br>      if {[string match !* $t]} {<br>         set k [string range $t 1 e]<br>         set data($k) {}<br>      } {<br>      ..."<br>    invoked from within<br>"if {![catch {set f [open file.txt]}]} {<br>   foreach t [split [read $f] \n] {<br>      if {[string match !* $t]} {<br>         set k [string range $t 1 e] ..."<br>    (file "scripts/info.tcl" line 2)<br>    invoked from within<br>"source scripts/info.tcl"<br>    (file "eggdrop.conf" line 1349)<br>[00:49] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)<br><br>Seem to get that error now :S Not sure  why it is showing that ...  it's late here so maybe I have done somrthing completly wrong lol.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6566">JoshuaUK</a> — Tue Sep 13, 2005 7:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JoshuaUK]]></name></author>
		<updated>2005-09-13T05:20:42-04:00</updated>

		<published>2005-09-13T05:20:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55681#p55681</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55681#p55681"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55681#p55681"><![CDATA[
Uhuh, ok I'll give it a go, currently got a little trouble with the bot itself atm, so going to have to re-install it or get it re-installed but will give it a go A.S.A.P <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Thanks again <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6566">JoshuaUK</a> — Tue Sep 13, 2005 5:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-12T20:39:24-04:00</updated>

		<published>2005-09-12T20:39:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55666#p55666</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55666#p55666"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55666#p55666"><![CDATA[
the .txt file must be in bot's main directory, not in <em class="text-italics">scripts</em> directory<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Sep 12, 2005 8:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JoshuaUK]]></name></author>
		<updated>2005-09-12T18:28:17-04:00</updated>

		<published>2005-09-12T18:28:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55662#p55662</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55662#p55662"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55662#p55662"><![CDATA[
Cheers <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">:D so now what I do is have say file.tcl say added in my config file and then put a .txt file say called file.tct in the scripts directory ? not managed to get it to work for me yte but I may be doing something wrong<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6566">JoshuaUK</a> — Mon Sep 12, 2005 6:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-12T16:39:04-04:00</updated>

		<published>2005-09-12T16:39:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55660#p55660</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55660#p55660"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55660#p55660"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set data {}if {![catch {set f [open file.txt]}]} {   foreach t [split [read $f] \n] {      if {[string match !* $t]} {         set k [string range $t 1 e]         set data($k) {}      } {         lappend data($k) $t      }   }   close $f}bind pub - !get fooproc foo {n u h c t} {   if {[info exists ::data($t)]} {      foreach e $::data($t) {puthelp "notice $n :$e"}   } {      puthelp "notice $n :no data found for $t"   }}</code></pre></div>your <em class="text-italics">file.txt</em> looks like this:<div class="codebox"><p>Code: </p><pre><code>!key1line1 for key1line2 for key1...lineN for key1!key2line1 for key2line2 for key2...lineM for key2!key3...</code></pre></div>and you retrieve data for <em class="text-italics">keyK</em> by typing <em class="text-italics">!get keyK</em><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Sep 12, 2005 4:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JoshuaUK]]></name></author>
		<updated>2005-09-12T16:00:40-04:00</updated>

		<published>2005-09-12T16:00:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55659#p55659</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55659#p55659"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55659#p55659"><![CDATA[
Right wel what I would like is to have a !Chart option !Rules and !srealses0509 !areleases0509 etc.. for music releases and I can just alter the trigger when I update and remove them and add new ones, and can modify new additions to the lists for each one everytime like the chart etc.. each week through a text file and just .rehash the bot<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6566">JoshuaUK</a> — Mon Sep 12, 2005 4:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-12T15:51:26-04:00</updated>

		<published>2005-09-12T15:51:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55657#p55657</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55657#p55657"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55657#p55657"><![CDATA[
what do you need multiple triggers for? If you cannot clearly and unambiguously describe what you need, nobody could help you even if they wanted to<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Sep 12, 2005 3:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JoshuaUK]]></name></author>
		<updated>2005-09-12T13:53:59-04:00</updated>

		<published>2005-09-12T13:53:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55656#p55656</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55656#p55656"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55656#p55656"><![CDATA[
Can't see any that read from txt files <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> or that I can have multiple triggers for.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6566">JoshuaUK</a> — Mon Sep 12, 2005 1:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JoshuaUK]]></name></author>
		<updated>2005-09-12T13:40:27-04:00</updated>

		<published>2005-09-12T13:40:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55655#p55655</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55655#p55655"/>
		<title type="html"><![CDATA[Read the five newest inputs from a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55655#p55655"><![CDATA[
Yeah I have looked into it, but I can't seem to get it to work, going to try again with it, but not sure if it will work, and not sure what I should search for! I looked for Trigger scripts, reading from text file etc.. and not really sure what it would come under.. I will try FAQ and rules etc.. and see <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=6566">JoshuaUK</a> — Mon Sep 12, 2005 1:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
