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

	<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>2001-10-25T00:12:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2001-10-25T00:12:00-04:00</updated>

		<published>2001-10-25T00:12:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=1040#p1040</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=1040#p1040"/>
		<title type="html"><![CDATA[getting different words/splitting variables up into differen]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=1040#p1040"><![CDATA[
Don't use "args" as the name of your last argument in your procedure. It is a special tcl keyword that creates a list out of the remaining arguments, which adds the extra { and } that you are seeing.<br><br>Just rename it to "text" or something else, and it should be fine.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Oct 25, 2001 12:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-10-24T22:38:00-04:00</updated>

		<published>2001-10-24T22:38:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=1038#p1038</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=1038#p1038"/>
		<title type="html"><![CDATA[getting different words/splitting variables up into differen]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=1038#p1038"><![CDATA[
K, Having a problem using it.... maybe you could clear it up, or will I HAVE to remove  the { for this to work?<br><br>using a bind to<br>bind msg - test handletest<br><br>proc handletest { nick host hand args } {<br>#shows what the output is<br>putlog "hand [lindex [split $args] 0]"<br><br>if {[validuser [lindex [split $args] 0]]} {<br>puthelp "NOTICE $nick :your handle is ok"<br><br>}<br>return 0<br>}<br><br>/msg bot test HANDLE <br>works fine, problem is...<br>/msg bot test HANDLE &lt;anything else here&gt;<br><br>returns {handle - thus causing the error and not checking right, so have I got the syntax of the check wrong, or am I going to have to remove the  { } brackets?<br><p>Statistics: Posted by Guest — Wed Oct 24, 2001 10:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-10-24T21:24:00-04:00</updated>

		<published>2001-10-24T21:24:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=1030#p1030</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=1030#p1030"/>
		<title type="html"><![CDATA[getting different words/splitting variables up into differen]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=1030#p1030"><![CDATA[
Having {} chars in the text does not matter, so long as you handle the string correctly.<br><br>If you use [split] on the text, it should work correctly.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Oct 24, 2001 9:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-10-24T16:29:00-04:00</updated>

		<published>2001-10-24T16:29:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=1024#p1024</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=1024#p1024"/>
		<title type="html"><![CDATA[getting different words/splitting variables up into differen]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=1024#p1024"><![CDATA[
kewl that works...<br><br>another problem (I've seen you give that answer to a previous post about names with { } in them.....<br><br>is there a way of removing characters? e.g those { } ones...<br><br>I'd assume it would envolve finding the position of the character and then doing somthing to replace it?<br><br>I couldn't really figure it out yesterday, could anyone shed some light? ta<p>Statistics: Posted by Guest — Wed Oct 24, 2001 4:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-10-23T20:33:00-04:00</updated>

		<published>2001-10-23T20:33:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=996#p996</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=996#p996"/>
		<title type="html"><![CDATA[getting different words/splitting variables up into differen]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=996#p996"><![CDATA[
Yes and no.<br><br>Taking your example, to get the second word from the string, you can use the follwing.<br><blockquote class="uncited"><div>set word [lindex [split $testvar] 1]</div></blockquote>OK, so the "set word you can undertsand.<br><br>The lindex command is used to get an item out of a list. You have to pass it the list, and the item number you want from the list. The split command is used to convert a string into a list (this is also required to make things safe for later). The 1 is the index within the list that you wish to get. Note the index is 1, but the word we want is word 2, this is because, like in most languages, the first eliment is 0.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Oct 23, 2001 8:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-10-23T19:51:00-04:00</updated>

		<published>2001-10-23T19:51:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=995#p995</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=995#p995"/>
		<title type="html"><![CDATA[getting different words/splitting variables up into differen]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=995#p995"><![CDATA[
Hey.<br><br>How can I split a variable or peramiter, that contains more than one word, into different sections?<br>ex.<br>set testvar "word1 word2"<br><br>how could I get what the first word is and what the second word is from the variable?<br><br>do I have to put them into a list and use lindex or somthing?<br><br><br>ta<p>Statistics: Posted by Guest — Tue Oct 23, 2001 7:51 pm</p><hr />
]]></content>
	</entry>
	</feed>
