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

	<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>2004-05-03T06:08:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-05-03T06:08:46-04:00</updated>

		<published>2004-05-03T06:08:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36054#p36054</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36054#p36054"/>
		<title type="html"><![CDATA[Tricky Database Question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36054#p36054"><![CDATA[
In tcl, you can make lists with actual list commands rather than a string with entries separated by commas. It will be much easier to change stuff around. Then, if you need the comma-separated string for something later, you can use the join command to get it.<br><br>For instance:<br><br>set names <ul><li>set string "names=[join $names ,]"<br><br>now string = "names=name1,name2,name3,name4"</li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Mon May 03, 2004 6:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SomeGuy]]></name></author>
		<updated>2004-05-02T13:26:11-04:00</updated>

		<published>2004-05-02T13:26:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36037#p36037</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36037#p36037"/>
		<title type="html"><![CDATA[Tricky Database Question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36037#p36037"><![CDATA[
Thanks to alot of searching, I found something that does just the job I need for this.<br><div class="codebox"><p>Code: </p><pre><code>proc varrep {string what with} {    if {![string match "*$what*" $string]} {return $string}    set cutstart [expr [string first $what $string] - 1]    set cutstop  [expr $cutstart + [string length $what] + 1]    set string [string range $string 0 $cutstart]$with[string range $string $cutstop end]    return $string } </code></pre></div>Then called with<br><br>set changed_var [varrep $string $what $with]<br><br>Having changed those var's of course ;p<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4901">SomeGuy</a> — Sun May 02, 2004 1:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SomeGuy]]></name></author>
		<updated>2004-05-02T12:18:56-04:00</updated>

		<published>2004-05-02T12:18:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36036#p36036</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36036#p36036"/>
		<title type="html"><![CDATA[Tricky Database Question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36036#p36036"><![CDATA[
Ok, say I have a line that looks like this:<br><br>name=char1,char2,char3,char4,<br><br>Now I have got my script to properly append new things on to that, as well as I have got it to list.  Now where I get stuck is when I try to delete say char3, but leave everything else intact.<br><br>So say if I wanted to use a command to delete char 3, I want the line to in turn look like this:<br><br>name=char1,char2,char4,<br><br>I'm sure lreplace or append could do exactly what I lookin for here, but I'm such a newb when it comes to using lists.  It took a long time just to get the adding and listing done.<br><br>If someone has a good link that may direct me on to how to do this that would be awesome.  Or even just a push in the right direction, cuz i'm at a blank right now.  Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4901">SomeGuy</a> — Sun May 02, 2004 12:18 pm</p><hr />
]]></content>
	</entry>
	</feed>
