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

	<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-05-27T02:43:36-04:00</updated>

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

		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-05-27T02:43:36-04:00</updated>

		<published>2006-05-27T02:43:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63459#p63459</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63459#p63459"/>
		<title type="html"><![CDATA[factbot based on chuck norris script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63459#p63459"><![CDATA[
Thought i'm not sure how it would work since you don't use ":" (which _should_ make the ircd only send the first word)<br><br>Here is a more compact and cleaner version of what you had:<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !fact pub_factproc pub_fact {n u h c arg} {  if {![llength [set target [lindex [split $arg] 0]]]} {    set target $n  }  set data [split [read [set fd [open fact.txt]]] \n][close $fd]  set randline [lindex $data [rand [llength $data]]]  putserv "privmsg $c :$target $randline"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sat May 27, 2006 2:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[b4ugobye]]></name></author>
		<updated>2006-05-26T17:17:31-04:00</updated>

		<published>2006-05-26T17:17:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63441#p63441</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63441#p63441"/>
		<title type="html"><![CDATA[not exactly]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63441#p63441"><![CDATA[
below is example of what it should do (b4ugobye)(done with irc) and what the above code gives (factbot)<br><br>&lt;@himself&gt; !fact Maniac<br>&lt;@b4ugobye&gt; Maniac can win a game of Connect Four in only three moves.<br>&lt;+Factbot&gt; himself does not sleep. He waits.<br><br>****<br>tried a few more things, and finally got it.<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !fact pub_fact proc pub_fact {n u h c arg} { set fl [open fact.txt] set data [read $fl] set arg [split $arg] set x [lindex $arg 0] close $fl set lines [split $data \n] set randline [lindex $lines [rand [llength $lines]]] putserv "privmsg $c $x $randline"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7798">b4ugobye</a> — Fri May 26, 2006 5:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-05-26T13:52:28-04:00</updated>

		<published>2006-05-26T13:52:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63433#p63433</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63433#p63433"/>
		<title type="html"><![CDATA[factbot based on chuck norris script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63433#p63433"><![CDATA[
putserv "privmsg $c $n $randline"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Fri May 26, 2006 1:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[b4ugobye]]></name></author>
		<updated>2006-05-26T13:20:10-04:00</updated>

		<published>2006-05-26T13:20:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63432#p63432</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63432#p63432"/>
		<title type="html"><![CDATA[ty, but i need the other step]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63432#p63432"><![CDATA[
thats what I'm looking for except I want to make it personalize so if someone types !fact bob .... it will say bob then the fact..<br><br>so i think i need a set line to set whatever is typed after !fact<br><br>final output: putserv "privmsg $c $factnick $randline" <br><br><br>something along that line. Sorry to be a pain.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7798">b4ugobye</a> — Fri May 26, 2006 1:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-05-26T02:26:01-04:00</updated>

		<published>2006-05-26T02:26:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63405#p63405</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63405#p63405"/>
		<title type="html"><![CDATA[factbot based on chuck norris script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63405#p63405"><![CDATA[
The following should pull a random line from ~/eggdrop/fact.txt<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !fact pub_factproc pub_fact {n u h c t} {  set fl [open fact.txt]  set data [read $fl]  close $fl  set lines [split $data \n]  set randline [lindex $lines [rand [llength $lines]]]   putserv "privmsg $c $randline"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Fri May 26, 2006 2:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[krimson]]></name></author>
		<updated>2006-05-26T01:31:32-04:00</updated>

		<published>2006-05-26T01:31:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63403#p63403</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63403#p63403"/>
		<title type="html"><![CDATA[factbot based on chuck norris script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63403#p63403"><![CDATA[
<blockquote class="uncited"><div>$read(filename, [ntswrp], [matchtext], [N])<br><br>Returns a single line of text from a file.<br><br>This identifier works in conjunction with the /write command.<br><br>//echo $read(funny.txt)<br><br>Reads a random line from the file funny.txt.<br><br><em class="text-italics">[........]</em><br><br>If the n switch is specified then the line read in will not be evaluated and will be treated as plain text.<br><br>If the p switch is specified, command | separators are treated as such instead of as plain text.<br><br>If the first line in the file is a number, it must represent the total number of lines in the file. If you specify N = 0, mIRC returns the value of the first line if it's a number.<br><br>If the t switch is specified then mIRC will treat the first line in the file as plain text, even if it is a number.</div></blockquote>%fact is just a variable<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7663">krimson</a> — Fri May 26, 2006 1:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-05-25T22:48:28-04:00</updated>

		<published>2006-05-25T22:48:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63396#p63396</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63396#p63396"/>
		<title type="html"><![CDATA[Re: ...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63396#p63396"><![CDATA[
<blockquote class="uncited"><div>in reality, I just need this one line converted to tcl, then I can make a txt file named facts.txt.<br><br>On *:TEXT:!fact*:#: Set %fact $read(facts.txt) | /msg $chan $2 %fact }</div></blockquote>Ok, please convert all the variable to expanded functions first. Quite a lot of us do not use that IRC client. so you have to epand out what "%fact" and "$read" actually are.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Thu May 25, 2006 10:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[b4ugobye]]></name></author>
		<updated>2006-05-25T21:32:32-04:00</updated>

		<published>2006-05-25T21:32:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63390#p63390</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63390#p63390"/>
		<title type="html"><![CDATA[...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63390#p63390"><![CDATA[
in reality, I just need this one line converted to tcl, then I can make a txt file named facts.txt.<br><br>On *:TEXT:!fact*:#: Set %fact $read(facts.txt) | /msg $chan $2 %fact }<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7798">b4ugobye</a> — Thu May 25, 2006 9:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[b4ugobye]]></name></author>
		<updated>2006-05-25T21:00:09-04:00</updated>

		<published>2006-05-25T21:00:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63389#p63389</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63389#p63389"/>
		<title type="html"><![CDATA[pub_chuck was typo..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63389#p63389"><![CDATA[
missed that edit, but fixed... normally the chuck script reads a random line from the set fact (set chuck previously) <br>eg: "\"Chuck Norris is not Politically Correct He is just Correct Always.\"" <br><br>my goal is to make the trigger !fact &lt;nick&gt; <br>so when you do !fact b4ugobye:<br>it sends to chan:<br>b4ugobye (read from set facts)is not Politically Correct He is just Correct Always.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7798">b4ugobye</a> — Thu May 25, 2006 9:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-05-25T20:49:20-04:00</updated>

		<published>2006-05-25T20:49:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63388#p63388</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63388#p63388"/>
		<title type="html"><![CDATA[factbot based on chuck norris script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63388#p63388"><![CDATA[
the bind is calling "pub_fact", proc named "pub_chuck" won't work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Thu May 25, 2006 8:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[b4ugobye]]></name></author>
		<updated>2006-05-25T20:55:40-04:00</updated>

		<published>2006-05-25T19:59:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63386#p63386</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63386#p63386"/>
		<title type="html"><![CDATA[factbot based on chuck norris script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63386#p63386"><![CDATA[
I'm trying to make a fact bot off the idea of the chuck norris facts script by Outz.<br>my desired outcome:<blockquote class="uncited"><div>!fact &lt;nick&gt;<br>&lt;nick&gt; once did open heart surgery... on himself.</div></blockquote>the script so far:<div class="codebox"><p>Code: </p><pre><code>bind pub - !fact pub_factproc pub_fact {nick mask hand channel args} {   global fact   puthelp "PRIVMSG $channel :[lindex $fact [rand [llength $fact]]]"   }set fact {"\" 's tears cure cancer. Too bad he has never cried. Ever.\""</code></pre></div>_______________________________________________--<br>I am a total newb when it comes to tcl... if it were irc scripting, it would have been up and running... lol... I tried a few things and just ended up with errors. I did at least try, so I'm not just someone who wants ppl to do work for me, just know somone else can look at this and redo it in a matter of a minute. And that would make my life so much easier. So please someone hook me up with a moment of your time and post a solution for my needs.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7798">b4ugobye</a> — Thu May 25, 2006 7:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
