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

	<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>2009-06-14T19:18:51-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Mabus4444]]></name></author>
		<updated>2009-06-14T19:18:51-04:00</updated>

		<published>2009-06-14T19:18:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89195#p89195</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89195#p89195"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89195#p89195"><![CDATA[
Hey guys, It works perfectly now. Thanks a bunch <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=8329">Mabus4444</a> — Sun Jun 14, 2009 7:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-06-14T11:58:25-04:00</updated>

		<published>2009-06-14T11:58:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89193#p89193</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89193#p89193"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89193#p89193"><![CDATA[
<blockquote class="uncited"><div>This looks very sketchy and amateur.</div></blockquote>Nah, it's just other way of doing the same action.<br>Both are working OK, but of course there are diffrent words in text.<br><br>User's proc is simple and working great.<br><br><strong class="text-strong">Mabus4444</strong> choose one, i fixed it for you.<br>Thanks speechles.<br><div class="codebox"><p>Code: </p><pre><code># tomekk, http://forum.egghelp.org/viewtopic.php?t=16942# commands channelsset file_web_channels {#channel #channel2}# max chars per line (with full words, without spliting in the middle like: word wo\nrd word, will be: word word\nword, if possible)variable lineSplit 340# syntax: "channel_command_name|http://address/somefile"set file_web_links {"!rule|http://localhost/rules.txt""!test|http://localhost/test.txt"}#############################################################bind pubm -|- * pub_procpackage require http# LINE_WRAP # takes a long line in, and chops it before the specified length # http://forum.egghelp.org/viewtopic.php?t=6690 # proc line_wrap {str {splitChr { }}} { set out [set cur {}] set i 0 set len $::lineSplit foreach word [split [set str][set str ""] $splitChr] { if {[incr i [string length $word]] &gt; $len} { lappend out [join $cur $splitChr] set cur [list $word] set i [string length $word] } else { lappend cur $word } incr i } lappend out [join $cur $splitChr] }proc pub_proc { nick uhost hand chan arg } {global file_web_links file_web_channels max_per_lineif {[lsearch $file_web_channels $chan] == -1} {return                         } set spt_args [split $arg]set command_name [lindex $spt_args 0]set command_data [lindex $spt_args 1]if {![regexp {^([0-9]+)$} $command_data]} {return} {set command_data [expr $command_data - 1]if {$command_data &lt;= -1} {return}}set the_url ""foreach link_line $file_web_links {if {$link_line != ""} {set sep_rows [split $link_line "|"]set ch_cmd_name [string trim [lindex $sep_rows 0]]set ch_cmd_url [string trim [lindex $sep_rows 1]]if {$command_name == $ch_cmd_name} {set the_url $ch_cmd_url}}}if {$the_url != ""} {if {![catch {set http_handle [http::geturl $the_url -timeout 10000]}]} {set http_status [http::status $http_handle]if {$http_status == "ok"} {if {[http::ncode $http_handle] == 200} {set http_data [http::data $http_handle]set line_by_line [split $http_data "\n"]if {$command_data &lt;= [llength $line_by_line]} {foreach splitline [line_wrap [lindex $line_by_line $command_data]] { putserv "PRIVMSG $chan :$splitline" }}}} elseif {$http_status == "timeout"} {putquick "NOTICE $nick :error: connection timed out"} } {putquick "NOTICE $nick :error: connection failed"}}}putlog "file-grabber.tcl ver 0.1 by tomekk loaded"</code></pre></div><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sun Jun 14, 2009 11:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-06-14T09:23:31-04:00</updated>

		<published>2009-06-14T09:23:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89191#p89191</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89191#p89191"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89191#p89191"><![CDATA[
There is a better way than counting words. Doing it the "count word" way there will be VAST differences in the length of each "split" line because the length of words can vary so much. This looks very sketchy and amateur.<br><br>Instead you can use this proc by user and it does the job much more elegantly.<div class="codebox"><p>Code: </p><pre><code># LINE_WRAP# takes a long line in, and chops it before the specified length# http://forum.egghelp.org/viewtopic.php?t=6690#proc line_wrap {str {splitChr { }}} {   set out [set cur {}]  set i 0  set len $::lineSplit  foreach word [split [set str][set str ""] $splitChr] {     if {[incr i [string length $word]] &gt; $len} {       lappend out [join $cur $splitChr]       set cur [list $word]       set i [string length $word]     } else {       lappend cur $word     }     incr i   }   lappend out [join $cur $splitChr] }</code></pre></div>Then add this var to the top of your script:<div class="codebox"><p>Code: </p><pre><code>variable lineSplit 340</code></pre></div>Then to use it in your script would work like so:<div class="codebox"><p>Code: </p><pre><code>               if {$command_data &lt;= [llength $line_by_line]} {                  foreach splitline [line_wrap [lindex $line_by_line $command_data]] {                    putserv "PRIVMSG $chan :$splitline"                  }               } </code></pre></div>User r0x! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Jun 14, 2009 9:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-06-14T04:40:30-04:00</updated>

		<published>2009-06-14T04:40:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89187#p89187</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89187#p89187"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89187#p89187"><![CDATA[
try:<div class="codebox"><p>Code: </p><pre><code># tomekk, http://forum.egghelp.org/viewtopic.php?t=16942# commands channelsset file_web_channels {#channel #channel2}# max "words" per line (it means: test test on. &lt;- space separator, "test" "test" "on.", 3 "words" here)set max_per_line 30# syntax: "channel_command_name|http://address/somefile"set file_web_links {"!rule|http://localhost/rules.txt""!test|http://localhost/test.txt"}#############################################################bind pubm -|- * pub_procpackage require httpproc pub_proc { nick uhost hand chan arg } {global file_web_links file_web_channels max_per_lineif {[lsearch $file_web_channels $chan] == -1} {return                         } set spt_args [split $arg]set command_name [lindex $spt_args 0]set command_data [lindex $spt_args 1]if {![regexp {^([0-9]+)$} $command_data]} {return} {set command_data [expr $command_data - 1]if {$command_data &lt;= -1} {return}}set the_url ""foreach link_line $file_web_links {if {$link_line != ""} {set sep_rows [split $link_line "|"]set ch_cmd_name [string trim [lindex $sep_rows 0]]set ch_cmd_url [string trim [lindex $sep_rows 1]]if {$command_name == $ch_cmd_name} {set the_url $ch_cmd_url}}}if {$the_url != ""} {if {![catch {set http_handle [http::geturl $the_url -timeout 10000]}]} {set http_status [http::status $http_handle]if {$http_status == "ok"} {if {[http::ncode $http_handle] == 200} {set http_data [http::data $http_handle]set line_by_line [split $http_data "\n"]if {$command_data &lt;= [llength $line_by_line]} {set line_list [split [lindex $line_by_line $command_data]]set line_length [llength $line_list]if {$line_length &gt; $max_per_line} {set parts [expr $line_length / $max_per_line]if {[expr $parts * $max_per_line] &lt; $line_length} {incr parts 1}set start_idx 0set end_idx [expr $max_per_line - 1]for {set i 0} {$i &lt; $parts} {incr i 1} {putquick "PRIVMSG $chan :[join [lrange $line_list $start_idx $end_idx]]"incr start_idx $max_per_lineincr end_idx $max_per_line}} {putquick "PRIVMSG $chan :[lindex $line_by_line $command_data]"}}}} elseif {$http_status == "timeout"} {putquick "NOTICE $nick :error: connection timed out"} } {putquick "NOTICE $nick :error: connection failed"}}}putlog "file-grabber.tcl ver 0.1 by tomekk loaded"</code></pre></div><blockquote class="uncited"><div>10:39:21 &lt;@tomekk&gt; !rule 1<br>10:39:28 &lt; botty&gt; 1) Threats of any kind of violence towards any member of our channel is subject to immediate<br>                  and permanent removal from the channel. This includes any stalking behaviour that occurs<br>10:39:31 &lt; botty&gt; on our, or other channels our members happen to go on. This includes users following our<br>                  members into our channel from other channels to harrass them. Attempts to uncover personal<br>10:39:34 &lt; botty&gt; information about our users to use personal offline information about our users to in any way<br>                  embarrass or harm a user is strictly prohibited.</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sun Jun 14, 2009 4:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mabus4444]]></name></author>
		<updated>2009-06-13T16:15:57-04:00</updated>

		<published>2009-06-13T16:15:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89180#p89180</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89180#p89180"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89180#p89180"><![CDATA[
I sent this to you in PM as you asked for, but thought I'd also update it here as well;<br><br>Thanks for your help with this.<br><br>The file is just a text file called rules.txt The contents of the file are;<br><br>1) Threats of any kind of violence towards any member of our channel is subject to immediate and permanent removal from the channel. This includes any stalking behaviour that occurs on our, or other channels our members happen to go on. This includes users following our members into our channel from other channels to harrass them. Attempts to uncover personal information about our users to use personal offline information about our users to in any way embarrass or harm a user is strictly prohibited.<br>2) Negative remarks directed at our members beliefs or claims are protected provided they remain reasonable, however offensive remarks directed specifically and deliberately at the character of a fellow channel member him or herself is strictly prohibited. This includes swearing at the person or any other derogatory comments of of a similar nature. Attack the beliefs, and not the individual holding the beliefs.<br><br><br>Just two very long lines. The first line does not display at all, the bot just sits there silently. The second line displays perfectly.<br><br>If you want/need to download the textfile itself you can download it at <br><a href="http://www.dalnetdebates.com/rules/rules.txt" class="postlink">http://www.dalnetdebates.com/rules/rules.txt</a><br><br>Thanks again for your help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8329">Mabus4444</a> — Sat Jun 13, 2009 4:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-06-13T14:37:35-04:00</updated>

		<published>2009-06-13T14:37:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89179#p89179</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89179#p89179"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89179#p89179"><![CDATA[
works for me even with 20k chars in one line, but of course on irc see only IRC max in one line,<br><br>could you pm me with this file? i will look into it, maybe its something else<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sat Jun 13, 2009 2:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mabus4444]]></name></author>
		<updated>2009-06-09T14:26:40-04:00</updated>

		<published>2009-06-09T14:26:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89148#p89148</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89148#p89148"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89148#p89148"><![CDATA[
One question, if it's not too much trouble. The script stops (does not spit out the line) if the line is too long. Is there an easy way to make it split a sentence up into two parts if it's too long?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8329">Mabus4444</a> — Tue Jun 09, 2009 2:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mabus4444]]></name></author>
		<updated>2009-06-09T11:05:57-04:00</updated>

		<published>2009-06-09T11:05:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89146#p89146</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89146#p89146"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89146#p89146"><![CDATA[
It WORKS!!!!<br><br>The problem turned out to be the channels setting. I got rid of the second channel somehow that worked, anyway it works perfectly now. Thanks a lot for all your help <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=8329">Mabus4444</a> — Tue Jun 09, 2009 11:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-06-09T03:25:59-04:00</updated>

		<published>2009-06-09T03:25:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89140#p89140</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89140#p89140"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89140#p89140"><![CDATA[
can be without #channel2, its example:<div class="codebox"><p>Code: </p><pre><code>set file_web_channels {#mabusbottest}</code></pre></div>and use:<blockquote class="uncited"><div>!rule &lt;line number&gt;</div></blockquote>example, i used your host in my script ("!rule|<a href="http://www.dalnetdebates.com/rules.txt" class="postlink">http://www.dalnetdebates.com/rules.txt</a>"):<blockquote class="uncited"><div>09:22:59 &lt;@tomekk&gt; !rule 1<br>09:23:01 &lt; botty&gt; rules file line 1<br>09:23:03 &lt;@tomekk&gt; !rule 2<br>09:23:04 &lt; botty&gt; rules file line 2<br>09:23:06 &lt;@tomekk&gt; !rule 5<br>09:23:07 &lt; botty&gt; test file line 1</div></blockquote>because, your 'rule.txt' file:<blockquote class="uncited"><div>rules file line 1 //line num 1<br>rules file line 2  //line num 2<br>rules file line 3  //line num 3<br>                       //line num 4<br>test file line 1  //line num 5<br>test file line 2 //line num 6<br>test file line 3 //line num 7</div></blockquote>its working OK, remember, like u said, &lt;command&gt; &lt;line number&gt;<br><br>:&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Tue Jun 09, 2009 3:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mabus4444]]></name></author>
		<updated>2009-06-08T15:41:29-04:00</updated>

		<published>2009-06-08T15:41:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89135#p89135</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89135#p89135"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89135#p89135"><![CDATA[
First off, thanks for taking a shot at this. I appreciate it.<br><br>That said, the first attempt didn't t seem to work for me. Just to summarise, so as to make sure I did not misunderstand anything. I created two files. One was called rule.txt and the other was test.txt<br><br>I was not sure what text was supposed to go where, so I put the full text I saw in your output into both files like so;<br><br>rules file line 1 <br>rules file line 2 <br>rules file line 3 <br><br>test file line 1 <br>test file line 2 <br>test file line 3 <br><br>The above is the full contents of both text files.<br><br>As far as the settings are concerned, I changed them to the following;<br><br># commands channels <br>set file_web_channels {#mabusbottest  #channel2} <br><br># syntax: "channel_command_name|<a href="http://address/somefile" class="postlink">http://address/somefile</a>" <br>set file_web_links { <br>   "!rule|<a href="http://www.dalnetdebates.com/rules.txt" class="postlink">http://www.dalnetdebates.com/rules.txt</a>" <br>   "!test|<a href="http://www.dalnetdebates.com/test.txt" class="postlink">http://www.dalnetdebates.com/test.txt</a>" <br>} <br><br>I restarted the bot, to make sure it loaded the script (not merely rehashed).<br><br>In the channel I typed <br>!rule <br>and <br>!test<br><br>The result of both was silence. No errors of any kind, but no response either. Any idea what the problem could be?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8329">Mabus4444</a> — Mon Jun 08, 2009 3:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-06-08T14:33:22-04:00</updated>

		<published>2009-06-08T14:33:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89134#p89134</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89134#p89134"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89134#p89134"><![CDATA[
try:<div class="codebox"><p>Code: </p><pre><code># tomekk, http://forum.egghelp.org/viewtopic.php?t=16942# commands channelsset file_web_channels {#channel #channel2}# syntax: "channel_command_name|http://address/somefile"set file_web_links {"!rule|http://localhost/rules.txt""!test|http://localhost/test.txt"}#############################################################bind pubm -|- * pub_procpackage require httpproc pub_proc { nick uhost hand chan arg } {global file_web_links file_web_channelsif {[lsearch $file_web_channels $chan] == -1} {return                         } set spt_args [split $arg]set command_name [lindex $spt_args 0]set command_data [lindex $spt_args 1]if {![regexp {^([0-9]+)$} $command_data]} {return} {set command_data [expr $command_data - 1]if {$command_data &lt;= -1} {return}}set the_url ""foreach link_line $file_web_links {if {$link_line != ""} {set sep_rows [split $link_line "|"]set ch_cmd_name [string trim [lindex $sep_rows 0]]set ch_cmd_url [string trim [lindex $sep_rows 1]]if {$command_name == $ch_cmd_name} {set the_url $ch_cmd_url}}}if {$the_url != ""} {if {![catch {set http_handle [http::geturl $the_url -timeout 10000]}]} {set http_status [http::status $http_handle]if {$http_status == "ok"} {if {[http::ncode $http_handle] == 200} {set http_data [http::data $http_handle]set line_by_line [split $http_data "\n"]if {$command_data &lt;= [llength $line_by_line]} {putquick "PRIVMSG $chan :[lindex $line_by_line $command_data]"}}} elseif {$http_status == "timeout"} {putquick "NOTICE $nick :error: connection timed out"} } {putquick "NOTICE $nick :error: connection failed"}}}putlog "file-grabber.tcl ver 0.1 by tomekk loaded"</code></pre></div><blockquote class="uncited"><div>20:31:19 &lt;@tomekk&gt; !rule 2<br>20:31:24 &lt; botty&gt; rules file line 2<br>20:31:29 &lt;@tomekk&gt; !test 3<br>20:31:29 &lt; botty&gt; test file line 3</div></blockquote>two diffrent files, with data line by line:<blockquote class="uncited"><div>[tomekk@zonk]:/home/www# cat rules.txt test.txt<br>rules file line 1<br>rules file line 2<br>rules file line 3<br><br>test file line 1<br>test file line 2<br>test file line 3</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Mon Jun 08, 2009 2:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mabus4444]]></name></author>
		<updated>2009-06-08T12:56:55-04:00</updated>

		<published>2009-06-08T12:56:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89132#p89132</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89132#p89132"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89132#p89132"><![CDATA[
<blockquote class="uncited"><div>you can make second file in the same directory or something, text file with rules 1 by 1 </div></blockquote>Yeah that's what I'm doing at the moment, but it creates a ton of different files. Would be much cleaner (as you said) if a script like this could just read off a single text file. Also I imagine it could be adapted to many other things and have many other uses.<br><blockquote class="uncited"><div>I can write TCL for you if want, but with txt file (its less work for me and for sure that will always work, 2nd thing, you can mod your html source without changing the TCL script code because its based on "clear" text file)</div></blockquote>If you could do it so it reads a text file off the web that would work great.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8329">Mabus4444</a> — Mon Jun 08, 2009 12:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-06-08T04:37:16-04:00</updated>

		<published>2009-06-08T04:37:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89122#p89122</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89122#p89122"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89122#p89122"><![CDATA[
you can make second file in the same directory or something, text file with rules 1 by 1<br><br>rules.txt<br>1. rule /1st line<br>2 .rule /2nd line<br>3. rule /3rd line<br>n. rule /n line<br><br>I can write TCL for you if want, but with txt file (its less work for me and for sure that will always work, 2nd thing, you can mod your html source without changing the TCL script code because its based on "clear" text file)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Mon Jun 08, 2009 4:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mabus4444]]></name></author>
		<updated>2009-06-07T11:54:52-04:00</updated>

		<published>2009-06-07T11:54:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89111#p89111</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89111#p89111"/>
		<title type="html"><![CDATA[Script to read numbered line of text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89111#p89111"><![CDATA[
My channel has a rules page with numbered rules for example;<br><br>1) no killing people<br>2) no playing barry manilow songs<br>3) no used disco balls<br><br>As I have it now, if someone types "!rules" in the channel the bot will respond with a url for the rules page. Nice and simple. <br><br>What I would LIKE to do however, is so that when an op types "!rule 1" in the channel, the bot replies by going to the webpage and reads that rule back to the channel.<br><br>The way I have it imagined in my head, I could have the html set like so,<br>&lt;!-- rule 1 start --&gt;<br>1) no killing people<br>&lt;!-- rule 1 end --&gt;<br><br>When looking a the webpage all people would see is the rule itself, and you could have the bot start and stop reading with the remmed out tags.<br><br>Any help with this would be greatly appreciated<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8329">Mabus4444</a> — Sun Jun 07, 2009 11:54 am</p><hr />
]]></content>
	</entry>
	</feed>
