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

	<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-02-12T06:48:43-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-02-12T06:48:43-04:00</updated>

		<published>2003-02-12T06:48:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16479#p16479</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16479#p16479"/>
		<title type="html"><![CDATA[weird]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16479#p16479"><![CDATA[
I guess because of the lil ',' next to the Monday.. Anyway, found an easier solution for this: set list [join [lreplace [split $list] 0 0 moo,]] and this dose the trick. Thanks to the 'Forum Search' thingy <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Feb 12, 2003 6:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-02-12T06:46:06-04:00</updated>

		<published>2003-02-12T06:46:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16478#p16478</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16478#p16478"/>
		<title type="html"><![CDATA[weird]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16478#p16478"><![CDATA[
The problem is all down to the fact, you are not working on a list, and you are using exact matching.<br><br>While there is nothing legaly wrong (in terms of differance between string and list) with the value of $list, the values arr as follows<br><div class="codebox"><p>Code: </p><pre><code>foreach item $list {  puts stdout "Item: $item"}</code></pre></div>produced<blockquote class="uncited"><div>Item: Monday,<br>Item: 27<br>Item: January<br>Item: 2003</div></blockquote>Note the coma?<br><br>"lsearch" does an exact search (By the way, -exect and glob are the same, only wildcards are not translated, which saves CPU. However, passing "Monday" in both -exact and -glob modes works the same), for monday, and doesn't find it. So it returns -1 to the valud of $index.<br><br>Using -1 as the index in replace, causes the item to be prepended, and doesn't replace a thing.<br><br>If you searched for "Monday,", all would work fine.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Feb 12, 2003 6:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-02-12T06:33:07-04:00</updated>

		<published>2003-02-12T06:33:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16477#p16477</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16477#p16477"/>
		<title type="html"><![CDATA[weird]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16477#p16477"><![CDATA[
bind dcc n test task:test<br><br>proc task:test { hand idx arg } {<br>set list "Monday, 27 January 2003"<br>set index [lsearch -exact $list Monday] <br>set list [lreplace $list $index $index foo] <br>putlog "List: $list"<br>}<br><br>And I still get as a result: 'foo Monday, 27 January 2003' instead 'foo, 27 January 2003'. I'm missing something?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Feb 12, 2003 6:33 am</p><hr />
]]></content>
	</entry>
	</feed>
