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

	<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>2011-07-14T09:19:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[blake]]></name></author>
		<updated>2011-07-14T09:19:20-04:00</updated>

		<published>2011-07-14T09:19:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97199#p97199</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97199#p97199"/>
		<title type="html"><![CDATA[Sending text from a file to a channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97199#p97199"><![CDATA[
Hey<br><br>I wrote this some time back with a little help here on the forums i want to change it slightly<br><br>Currently I have to type !next line number in pm with the bot id like to get it so I only have to type !next and it will output the next line of text<br><div class="codebox"><p>Code: </p><pre><code>set out_chan "#Trainingroom" set txt_file "training.txt" bind msg SA|SA !next next_proc bind msg SA|SA !back back_proc proc tr_proc { nick uhost hand arg } {   global out_chan txt_file   set line [lindex [split $arg] 0]   if {$line == ""} {     putserv "PRIVMSG $chan :Usage: !next &lt;line number&gt;"     return   }   set take_me [open $txt_file r]   set take_all [split [read $take_me] "\n"]   close $take_me   set data [lindex $take_all [expr $line - 1]]   putquick "PRIVMSG $out_chan :$data" } proc back_proc { nick uhost hand arg } {   global out_chan txt_file   set line [lindex [split $arg] 0]   if {$line == ""} {     putserv "PRIVMSG $chan :Usage: !back &lt;line number&gt;"     return   }   set take_me [open $txt_file r]   set take_all [split [read $take_me] "\n"]   close $take_me   set data [lindex $take_all [expr $line - 1]]   putquick "PRIVMSG $out_chan :$data" } </code></pre></div>Many Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10512">blake</a> — Thu Jul 14, 2011 9:19 am</p><hr />
]]></content>
	</entry>
	</feed>
