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

	<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>2003-07-02T00:16:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-07-02T00:16:46-04:00</updated>

		<published>2003-07-02T00:16:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22870#p22870</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22870#p22870"/>
		<title type="html"><![CDATA[post for a friend: need random read help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22870#p22870"><![CDATA[
<blockquote class="uncited"><div>but the first part of the line changes, 1056129388 was just an example from the file</div></blockquote><blockquote class="uncited"><div>set line [join [lrange [split $line] 1 end]]</div></blockquote>That line would remove the first word no matter what it is, so it should work if all your lines start with that timestamp you want removed.<br><br>btw: i don't see a "close $fd" in the script you pasted...that kinda sucks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br>(file opened on the 'set ::randread_data ...' line)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Jul 02, 2003 12:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SmokeyOne]]></name></author>
		<updated>2003-07-02T00:00:59-04:00</updated>

		<published>2003-07-02T00:00:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22869#p22869</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22869#p22869"/>
		<title type="html"><![CDATA[post for a friend: need random read help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22869#p22869"><![CDATA[
but the first part of the line changes, 1056129388 was just an example from the file, will 105 stay the same if on every entry, <br><br>and can i try useing set line "*105*" and it would remove anything with 105 in it ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2530">SmokeyOne</a> — Wed Jul 02, 2003 12:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-06-23T14:13:30-04:00</updated>

		<published>2003-06-23T14:13:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22459#p22459</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22459#p22459"/>
		<title type="html"><![CDATA[post for a friend: need random read help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22459#p22459"><![CDATA[
Huh? We already told you how to fix it :)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Mon Jun 23, 2003 2:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SmokeyOne]]></name></author>
		<updated>2003-06-23T06:09:11-04:00</updated>

		<published>2003-06-23T06:09:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22432#p22432</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22432#p22432"/>
		<title type="html"><![CDATA[post for a friend: need random read help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22432#p22432"><![CDATA[
okay this is how wcc's randrom read works<br>##############<br>## COMMANDS ##<br>######################################################################<br>## DCC ## .chanset &lt;channel&gt; +/-randread                            ##<br>######### Enables or disables the sending of random messages to the ##<br>######### specified channel.                                        ##<br>######################################################################<br><br>##########################################################<br>## Just load the script, edit the settings, and rehash. ##<br>##########################################################<br><br>##################################################<br># Set the time in seconds between messages here. #<br>##################################################<br><br>set randread_setting(timer) "90"<br><br>############################################################################<br># Set the file to read from here. This file must exist. NOTE: Changing the #<br># contents of this file requires a rehash for the changes to take effect.  #<br>############################################################################<br><br>set randread_setting(file) "./README"<br><br>####################<br># Code begins here #<br>####################<br><br>if {![string match 1.6.* $version]} { putlog "\002RANDREAD:\002 \002WARNING:\002 This script is intended to run on eggdrop 1.6.x or later." }<br>if {[info tclversion] &lt; 8.2} { putlog "\002RANDREAD:\002 \002WARNING:\002 This script is intended to run on Tcl Version 8.2 or later." }<br><br>set ::randread_data [split [read [set fd [open $::randread_setting(file) r]]] "\n"]<br>setudef flag randread<br><br>if {[lsearch -glob [utimers] "* randread_timeread *"] == -1} { utimer $randread_setting(timer) randread_timeread }<br><br>proc randread_timeread {} {<br>foreach chan [channels] {<br>set index [rand [llength $::randread_data]]<br>if {[botonchan $chan] &amp;&amp; [lsearch -exact [channel info $chan] +randread] != -1} { putserv "PRIVMSG $chan :[join [lrange $::randread_data $index $index]]" }<br>}<br>if {[lsearch -glob [utimers] "* randread_timeread *"] == -1} { utimer $::randread_setting(timer) randread_timeread }<br>}<br><br>putlog "\002RANDREAD:\002 RandRead.tcl Version 1.1 by Wcc is loaded."<br><br><br>maybe someone can help<br><br>this will add randomly read from the database which each lined added into the database from the other scripts looks like this<br><br>1056129388 test <br>1056129388 test 2<br>1056129388 test 3<br>1056129388 test 4<br><br>it adds the utime to the begining everytime.  This is what my friend told me to post for an asnwer... he's too lazy to do it himself i guess lol<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2530">SmokeyOne</a> — Mon Jun 23, 2003 6:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-22T00:59:03-04:00</updated>

		<published>2003-06-22T00:59:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22353#p22353</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22353#p22353"/>
		<title type="html"><![CDATA[post for a friend: need random read help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22353#p22353"><![CDATA[
<img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed">  I have no ideea..  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes">  Guess is one of thouse BAD days.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Jun 22, 2003 12:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-06-22T00:50:11-04:00</updated>

		<published>2003-06-22T00:50:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22352#p22352</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22352#p22352"/>
		<title type="html"><![CDATA[post for a friend: need random read help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22352#p22352"><![CDATA[
Hehe what are you trying to do caesar?<br><br>set line [join [lrange [split $line] 1 end]]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sun Jun 22, 2003 12:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-22T00:38:06-04:00</updated>

		<published>2003-06-22T00:38:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22348#p22348</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22348#p22348"/>
		<title type="html"><![CDATA[post for a friend: need random read help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22348#p22348"><![CDATA[
Using the lreplace like this:<div class="codebox"><p>Code: </p><pre><code>set line "1056129388 test"set index [lsearch -exact $line [strlwr [lindex $line 0]]]set line [lreplace $line $index $index]</code></pre></div>and the result is from "test" to the end of the "$line"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Jun 22, 2003 12:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SmokeyOne]]></name></author>
		<updated>2003-06-21T23:04:32-04:00</updated>

		<published>2003-06-21T23:04:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22345#p22345</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22345#p22345"/>
		<title type="html"><![CDATA[post for a friend: need random read help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22345#p22345"><![CDATA[
I'm posting this for a friend cause he needs a little help. I'm not sure on how to help him so i thought I would ask you guys.<br><br>He is useing the random read script by wcc, and all he wants to do is use for his channel.  the problem is the other script that he is useing saves the utime into the file, he wants to know how do you modify the radom read script to remove the utime at the begining of the line. here is an example of how it looks<br><br>1056129388 test<br><br>so he wants to remove all thoses numbers from the line and keep the "test" text.<br><br>I told him he could filter out all numbers and only output the text from the string, but I thought someone would have a better way for him..<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2530">SmokeyOne</a> — Sat Jun 21, 2003 11:04 pm</p><hr />
]]></content>
	</entry>
	</feed>
