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

	<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>2007-11-03T04:46:37-04:00</updated>

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

		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-11-03T04:46:37-04:00</updated>

		<published>2007-11-03T04:46:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77417#p77417</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77417#p77417"/>
		<title type="html"><![CDATA[help with read/output file, public trigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77417#p77417"><![CDATA[
<blockquote class="uncited"><div>Start off with a basic TCL tutorial first, your code doesn't look like TCL to me :p</div></blockquote>That was rude <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=5982">iamdeath</a> — Sat Nov 03, 2007 4:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-11-02T22:04:16-04:00</updated>

		<published>2007-11-02T22:04:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77409#p77409</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77409#p77409"/>
		<title type="html"><![CDATA[help with read/output file, public trigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77409#p77409"><![CDATA[
Here's a basic script for reading text and spitting out random lines:<br><a href="http://members.dandy.net/~fbn/jokes.tcl.txt" class="postlink">http://members.dandy.net/~fbn/jokes.tcl.txt</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Fri Nov 02, 2007 10:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2007-11-02T20:07:22-04:00</updated>

		<published>2007-11-02T20:07:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77407#p77407</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77407#p77407"/>
		<title type="html"><![CDATA[help with read/output file, public trigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77407#p77407"><![CDATA[
Start off with a basic TCL tutorial first, your code doesn't look like TCL to me :p<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Fri Nov 02, 2007 8:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iNFERNiS]]></name></author>
		<updated>2007-11-02T15:29:21-04:00</updated>

		<published>2007-11-02T15:29:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77401#p77401</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77401#p77401"/>
		<title type="html"><![CDATA[help with read/output file, public trigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77401#p77401"><![CDATA[
I'm very new to tcl and coding in general. I wanted to make a simple script that reads from a textfile, grabs a random line and outputs it to a channel, with a public trigger.<br><br>Suffice to say i failed horribly, i'm kind of stuck now. Can someone point me into the right direction?<br><blockquote class="uncited"><div>bind pub o|o !randtext pub:randtext<br><br>proc pub:randtext { } {<br>putserv "PRIVMSG $channel : randline("randomness.txt")"<br>}<br><br>proc randline {file} {<br>set fs [open $file r]<br>set data [read -nonewline $fs]<br>close $fs<br>return [lindex $data [expr {int(rand()*[llength $data])}]]<br>}</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9246">iNFERNiS</a> — Fri Nov 02, 2007 3:29 pm</p><hr />
]]></content>
	</entry>
	</feed>
