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

	<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>2002-09-10T00:26:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-10T00:26:46-04:00</updated>

		<published>2002-09-10T00:26:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10716#p10716</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10716#p10716"/>
		<title type="html"><![CDATA[lindex issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10716#p10716"><![CDATA[
Dunno, maybe you're using the wrong variable?<br><br>Remember that regsub modifies the string, so copy it to a temporary variable.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Sep 10, 2002 12:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-10T00:01:03-04:00</updated>

		<published>2002-09-10T00:01:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10715#p10715</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10715#p10715"/>
		<title type="html"><![CDATA[lindex issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10715#p10715"><![CDATA[
well spoke to soon <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">  It works the first time after a rehash or a restart, but then it just substitues the same things everytime after that.  Pointers on what I am doing wrong? <br><br>   Thanks<p>Statistics: Posted by Guest — Tue Sep 10, 2002 12:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-09T23:40:02-04:00</updated>

		<published>2002-09-09T23:40:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10714#p10714</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10714#p10714"/>
		<title type="html"><![CDATA[lindex issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10714#p10714"><![CDATA[
works perfect! thanks!<p>Statistics: Posted by Guest — Mon Sep 09, 2002 11:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-09T23:24:02-04:00</updated>

		<published>2002-09-09T23:24:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10713#p10713</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10713#p10713"/>
		<title type="html"><![CDATA[lindex issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10713#p10713"><![CDATA[
If 'text' is the variable containing %nick that you want to substitute into,<br><br>regsub -all %nick $text $nick text<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Mon Sep 09, 2002 11:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-09T23:15:55-04:00</updated>

		<published>2002-09-09T23:15:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10712#p10712</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10712#p10712"/>
		<title type="html"><![CDATA[lindex issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10712#p10712"><![CDATA[
do you have an example of how to do this?  I tried playing with that a little and could not get it to work either.<br><br>Thanks!<p>Statistics: Posted by Guest — Mon Sep 09, 2002 11:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-09T23:00:10-04:00</updated>

		<published>2002-09-09T23:00:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10710#p10710</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10710#p10710"/>
		<title type="html"><![CDATA[lindex issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10710#p10710"><![CDATA[
Use subst to substitute variables into text the way you're doing it.<br><br>But a better idea is to use your own variable names (like %nick instead of $nick) and then use regsub to substitute in fixed values. That's a lot more secure.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Mon Sep 09, 2002 11:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-09T21:39:17-04:00</updated>

		<published>2002-09-09T21:39:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10708#p10708</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10708#p10708"/>
		<title type="html"><![CDATA[lindex issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10708#p10708"><![CDATA[
Hi,<br>  Sorry if this sounds newbish, but I am new.  I spent some time searching here and deja but cannot seem to find an answer.  I want to be able to run a command like "@hi jimmy" and have it display something out of list.  The problem is that I have variables in list that I want substituted, and it does not seem that lindex can do this.  Is there another way to accomplish this?<br><br>    Thanks!<br><br><br>bind pub o @hi pub_hi<br><br>set list { <br>        "hi $args"<br>        "hello $args"<br>}<br><br>proc pub_hi {nick mask hand channel args} {<br>   global list<br>   puthelp "PRIVMSG $channel :[lindex $list [rand [llength $list]]]"<br>   }<p>Statistics: Posted by Guest — Mon Sep 09, 2002 9:39 pm</p><hr />
]]></content>
	</entry>
	</feed>
