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

	<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-07T02:58:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-05-07T02:58:35-04:00</updated>

		<published>2006-05-07T02:58:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62721#p62721</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62721#p62721"/>
		<title type="html"><![CDATA[A Short Joke Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62721#p62721"><![CDATA[
why not simply use 'lappend joke [gets $jokefile]' and '[lindex $joke $w)]' instead of those arrays? If the file ends with an empty line, this will also be included, but could be removed with an lreplace or even more simple, lower i by 1, so it cannot be chosen (should be considered for a bigger file to lower memory usage).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun May 07, 2006 2:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-05-06T17:47:01-04:00</updated>

		<published>2006-05-06T17:47:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62706#p62706</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62706#p62706"/>
		<title type="html"><![CDATA[A Short Joke Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62706#p62706"><![CDATA[
it's because your incr before setting it.<br><br>Place the incr after it and it should work fine<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sat May 06, 2006 5:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[EVRAMP]]></name></author>
		<updated>2006-05-06T17:31:56-04:00</updated>

		<published>2006-05-06T17:31:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62704#p62704</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62704#p62704"/>
		<title type="html"><![CDATA[A Short Joke Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62704#p62704"><![CDATA[
Tcl error [pub:joke]: can't read "joke(0)": no such element in array<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7706">EVRAMP</a> — Sat May 06, 2006 5:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-05-03T10:35:13-04:00</updated>

		<published>2006-05-03T10:35:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62597#p62597</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62597#p62597"/>
		<title type="html"><![CDATA[A Short Joke Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62597#p62597"><![CDATA[
post the information from <div class="codebox"><p>Code: </p><pre><code>.set errorInfo</code></pre></div>you need to show the error(s) you get<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Wed May 03, 2006 10:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[EVRAMP]]></name></author>
		<updated>2006-05-03T09:21:30-04:00</updated>

		<published>2006-05-03T09:21:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62596#p62596</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62596#p62596"/>
		<title type="html"><![CDATA[A Short Joke Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62596#p62596"><![CDATA[
the one and only error is that it doesnt work. bot doesnt send a joke to channel x|<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7706">EVRAMP</a> — Wed May 03, 2006 9:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-05-02T11:40:03-04:00</updated>

		<published>2006-05-02T11:40:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62582#p62582</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62582#p62582"/>
		<title type="html"><![CDATA[A Short Joke Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62582#p62582"><![CDATA[
What's the error then?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Tue May 02, 2006 11:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[EVRAMP]]></name></author>
		<updated>2006-04-28T09:54:03-04:00</updated>

		<published>2006-04-28T09:54:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62458#p62458</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62458#p62458"/>
		<title type="html"><![CDATA[A Short Joke Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62458#p62458"><![CDATA[
Hi,<br>i made script which sends jokes to channel form file joke.txt, but it doesnt work.<br>Here is source:<div class="codebox"><p>Code: </p><pre><code>bind pub - !joke pub:jokebind pub w !addjoke pub:addjokeproc pub:addjoke { nick uhost handle channel arg } {if { $arg == "" } {putserv "NOTICE $nick :USAGE: !addjoke &lt;joke&gt;"return 0}set joke [open "joke.txt" a]puts $joke "$arg"close $jokeputserv "NOTICE $nick :joke added"}proc pub:joke { nick uhost handle channel arg } {set jokefile [open "joke.txt" r]set i 0while { [eof $jokefile] != 1 } {incr i 1set joke($i) [gets $jokefile]}set w [rand $i]set outjoke $joke($w)putserv "PRIVMSG $channel :$outjoke"}putlog "joke.tcl successfully loaded"</code></pre></div>Please can you help me where i did mistake? Thx!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7706">EVRAMP</a> — Fri Apr 28, 2006 9:54 am</p><hr />
]]></content>
	</entry>
	</feed>
