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

	<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-06-22T14:50:33-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-06-22T14:50:33-04:00</updated>

		<published>2003-06-22T14:50:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22401#p22401</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22401#p22401"/>
		<title type="html"><![CDATA[Variable interpolation]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22401#p22401"><![CDATA[
Try subst?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sun Jun 22, 2003 2:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-06-22T14:06:34-04:00</updated>

		<published>2003-06-22T14:06:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22395#p22395</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22395#p22395"/>
		<title type="html"><![CDATA[Variable interpolation]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22395#p22395"><![CDATA[
Hello,<br><br>I would like to get my bot to greet people as they enter the channel, but using a random string from a list. The code I'm using is as follows:-<br><div class="codebox"><p>Code: </p><pre><code>set greets {     "Hi $nick, good to see you"     "$nick, come on in and warm your feet"     "Look guys, it's $nick!"}proc user_join {nick uhost hand chan args} {     global greets     putchan $chan "[lindex $greets [rand [llength $greets]]]"}bind join * "*" user_join</code></pre></div><br>It's working fine, except that the $nick variable is being parsed literally, with the greet coming out as "Look guys, it's $nick!" rather than "Look guys, it's AmazingWilf!". I've been browsing through tcl documentation for a couple of days now to try to figure out how I can get the interpreter to interpolate the value of $nick rather than the literal, but to no avail.<br><br>Can anyone help with this?<br><br>Thanks in advance,<br><br>David<p>Statistics: Posted by Guest — Sun Jun 22, 2003 2:06 pm</p><hr />
]]></content>
	</entry>
	</feed>
