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

	<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-04-23T18:32:22-04:00</updated>

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

		<entry>
		<author><name><![CDATA[DjBeNNeTT]]></name></author>
		<updated>2006-04-23T18:32:22-04:00</updated>

		<published>2006-04-23T18:32:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62276#p62276</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62276#p62276"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62276#p62276"><![CDATA[
Weird, i've never experianced a problem with wordpad.<br>I know that Notepad shows the squares for the next line command thingy.. (lol). Where in wordpad it converts it so that it is a next line, but when i save it, it seems perfectly happy.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7387">DjBeNNeTT</a> — Sun Apr 23, 2006 6:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-04-23T17:52:59-04:00</updated>

		<published>2006-04-23T17:52:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62274#p62274</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62274#p62274"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62274#p62274"><![CDATA[
<blockquote class="uncited"><div>Try <a href="http://notepad-plus.sourceforge.net" class="postlink">Notepad++</a>.</div></blockquote>Both Wordpad and Word add invisible controls at the end of each carriage return and therefore Tcl code generated with either are prone to error generation/mis-reading. Text editors that leave scripts in Unix format are error free.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sun Apr 23, 2006 5:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DjBeNNeTT]]></name></author>
		<updated>2006-04-23T13:16:05-04:00</updated>

		<published>2006-04-23T13:16:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62262#p62262</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62262#p62262"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62262#p62262"><![CDATA[
OMFG! lol. I'm blind.<br><br>Works perfect. Thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><div class="codebox"><p>Code: </p><pre><code>set sex "scripts/sex.txt"bind pub - !sex sex:msgproc sex:msg {nick uhost hand chan arg} {  global sex  set sexmsg [string range [randomline $sex] 0 end]  puthelp "privmsg $chan :[subst -nocommands $sexmsg]"}proc randomline f { set data [split [read [set file [open $f]]][close $file] \n] set position [rand [llength $data]] lindex $data $position}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7387">DjBeNNeTT</a> — Sun Apr 23, 2006 1:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-04-23T13:01:36-04:00</updated>

		<published>2006-04-23T13:01:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62261#p62261</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62261#p62261"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62261#p62261"><![CDATA[
How many <strong class="text-strong">$sexmsg</strong>s are there in that code?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Apr 23, 2006 1:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DjBeNNeTT]]></name></author>
		<updated>2006-04-23T05:29:12-04:00</updated>

		<published>2006-04-23T05:29:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62255#p62255</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62255#p62255"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62255#p62255"><![CDATA[
<img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> where  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> <br><br>LoL sorry :p<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7387">DjBeNNeTT</a> — Sun Apr 23, 2006 5:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-04-23T04:40:58-04:00</updated>

		<published>2006-04-23T04:40:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62250#p62250</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62250#p62250"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62250#p62250"><![CDATA[
use <div class="codebox"><p>Code: </p><pre><code>[subst -nocommands $sexmsg]</code></pre></div>instead of just $sexmsg.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Apr 23, 2006 4:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DjBeNNeTT]]></name></author>
		<updated>2006-04-23T03:21:35-04:00</updated>

		<published>2006-04-23T03:21:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62246#p62246</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62246#p62246"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62246#p62246"><![CDATA[
Thanks, i'll give it a try.<br><br>Is there a way that if it has $nick in the .txt file it will say the nickname who did the command? Or can that only be done in the code itself to say for each message?.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7387">DjBeNNeTT</a> — Sun Apr 23, 2006 3:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-04-22T20:32:41-04:00</updated>

		<published>2006-04-22T20:32:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62238#p62238</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62238#p62238"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62238#p62238"><![CDATA[
Try <a href="http://notepad-plus.sourceforge.net" class="postlink">Notepad++</a>.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Apr 22, 2006 8:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DjBeNNeTT]]></name></author>
		<updated>2006-04-22T20:11:34-04:00</updated>

		<published>2006-04-22T20:11:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62236#p62236</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62236#p62236"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62236#p62236"><![CDATA[
Thank you both for your time. Sir_Fz worked perfectly! Thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>And i actually use WordPad for scripts... as Notepad likes to bugger up most the time and not set out the next lines properly making it unreadable... Bugger thing.<br><br>Ah well<br><br>Thanks both 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=7387">DjBeNNeTT</a> — Sat Apr 22, 2006 8:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-04-22T19:48:15-04:00</updated>

		<published>2006-04-22T19:48:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62234#p62234</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62234#p62234"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62234#p62234"><![CDATA[
Excellent Sir_Fz. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I concur. I should have thought of that in the first place. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><br><blockquote class="uncited"><div>What you mean "using pico"?</div></blockquote>pico is a *nix text editor. I was unaware you were using a Windrop in which case you'd be using notepad/EditPlus to edit scripts.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sat Apr 22, 2006 7:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-04-22T19:48:56-04:00</updated>

		<published>2006-04-22T19:43:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62233#p62233</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62233#p62233"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62233#p62233"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set sex "./sex.txt"bind pub - !sex sex:msgproc sex:msg {nick uhost hand chan arg} {  global sex  set sexmsg [string range [randomline $sex] 0 end]  puthelp "privmsg $chan :$sexmsg"}proc randomline f { set data [split [read [set file [open $f]]][close $file] \n] set position [rand [llength $data]] lindex $data $position}</code></pre></div>But the best solution would be to read the file into a list and use the list instead of the file everytime the command is called. Try to search the forum about how that can be implemented, it has been implemented 100 times here.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Apr 22, 2006 7:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DjBeNNeTT]]></name></author>
		<updated>2006-04-22T19:39:07-04:00</updated>

		<published>2006-04-22T19:39:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62232#p62232</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62232#p62232"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62232#p62232"><![CDATA[
Mines windrop and Still getting same message...<br><br>my sex.txt file has:<blockquote class="uncited"><div>Ohhh babeh!<br>Hmmmm!<br>YES YES YEEESSHHHH!!!!<br>With You? [censored] off!<br>Send Me Your Pic First <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>Get Away From Me With That Filthy Anaconda!</div></blockquote> All as it looks there..<br>What you mean "using pico"?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7387">DjBeNNeTT</a> — Sat Apr 22, 2006 7:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-04-22T19:27:55-04:00</updated>

		<published>2006-04-22T19:27:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62231#p62231</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62231#p62231"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62231#p62231"><![CDATA[
change:<div class="codebox"><p>Code: </p><pre><code>set sex "./sex.txt"</code></pre></div>to<div class="codebox"><p>Code: </p><pre><code>set sex "scripts/sex.txt"</code></pre></div>.. making certain the file (sex.txt) actually exists and you have added the lines of text you want (using pico).<br><br>I tested on a Windrop and it worked 100%. <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=3646">Alchera</a> — Sat Apr 22, 2006 7:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DjBeNNeTT]]></name></author>
		<updated>2006-04-22T18:33:15-04:00</updated>

		<published>2006-04-22T18:33:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62229#p62229</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62229#p62229"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62229#p62229"><![CDATA[
Your a god for loads of stuff i want if this works!!!<br>Just the one prob i find atm...<br><br>on !sex...<br>[23:30:51] [BooByBoT] [22:30] Tcl error [sex:msg]: random limit must be greater than zero<br><br>I've changed both "set sexmsg [string range [randomline $sex] <span style="text-decoration:underline">0</span> end] " and "* rand()" to (3) and still nothing...<br>I'm turning blind (must be tired) lol<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7387">DjBeNNeTT</a> — Sat Apr 22, 2006 6:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-04-22T18:05:38-04:00</updated>

		<published>2006-04-22T18:05:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62228#p62228</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62228#p62228"/>
		<title type="html"><![CDATA[Read from .txt file...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62228#p62228"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set sex "./sex.txt" bind pub - !sex sex:msgproc sex:msg {nick uhost hand chan arg} {  global sex  set sexmsg [string range [randomline $sex] 0 end]  puthelp "privmsg $chan :$sexmsg"}proc randomline { filename } {  set position [rand [expr [file size $filename] - 1024]]  set fd [open $filename r]  catch {    seek $fd $position    set text [read $fd 1024]  }  close $fd  set lines [split $text \n]  set lineno [randrange 1 [expr [llength $lines] - 1]]  return [lindex $lines $lineno]}proc randrange { lowerbound upperbound } { return [expr {int(($upperbound - $lowerbound + 1) * rand() + $lowerbound)}]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sat Apr 22, 2006 6:05 pm</p><hr />
]]></content>
	</entry>
	</feed>
