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

	<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-04-10T06:54:45-04:00</updated>

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

		<entry>
		<author><name><![CDATA[eiSi]]></name></author>
		<updated>2003-04-09T10:46:21-04:00</updated>

		<published>2003-04-09T10:46:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18784#p18784</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18784#p18784"/>
		<title type="html"><![CDATA[problem with split]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18784#p18784"><![CDATA[
hehe but thank you anyway! <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=939">eiSi</a> — Wed Apr 09, 2003 10:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-04-09T10:20:21-04:00</updated>

		<published>2003-04-09T10:20:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18780#p18780</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18780#p18780"/>
		<title type="html"><![CDATA[problem with split]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18780#p18780"><![CDATA[
ok ignore my reply ..  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by Guest — Wed Apr 09, 2003 10:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-04-10T06:54:45-04:00</updated>

		<published>2003-04-09T10:19:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18779#p18779</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18779#p18779"/>
		<title type="html"><![CDATA[problem with split]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18779#p18779"><![CDATA[
The '{' and '}' are used to define the start and end of a list(object).<br><br>I think ur problem occurs because u use the variable name 'args' which already creates a list from the rest of the input string. Try this:<br><div class="codebox"><p>Code: </p><pre><code>proc qrequest {nick uhost hand chan arg} {   global qqueue home   set commands [split $arg]    lappend qqueue [lindex $commands 0]  lappend qqueue $nick   lappend qqueue [lindex $commands 1]  set qqlength [expr [llength $qqueue] / 3]   notice $nick "$nick, your request for $channel \(Type: $chantype\) has   been queued. There are $qqlength items in queue." } </code></pre></div><p>Statistics: Posted by Guest — Wed Apr 09, 2003 10:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eiSi]]></name></author>
		<updated>2003-04-09T10:17:12-04:00</updated>

		<published>2003-04-09T10:17:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18778#p18778</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18778#p18778"/>
		<title type="html"><![CDATA[problem with split]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18778#p18778"><![CDATA[
ah thanks!<br><br>I didn't know that.<br><br>But now all works fine <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thanks again! <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=939">eiSi</a> — Wed Apr 09, 2003 10:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-04-09T10:13:26-04:00</updated>

		<published>2003-04-09T10:13:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18776#p18776</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18776#p18776"/>
		<title type="html"><![CDATA[problem with split]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18776#p18776"><![CDATA[
This is because fo the way you split it, and the variable name you used.<br><br>$args has a special function in Tcl, and is used to access unlimited length argument lists. Examples of this include the "list" command, where can keep on specifying items to add.<br><br>The $args vaiable is allready a list of the arguments passed, so you don't need to split it.<br><br>Change this to arg in the definition, and the same in the split.<br><br>Second, you dont need the " " in the split. Split uses " " by default.<br><br>That should be enough to fix the script for you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Apr 09, 2003 10:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eiSi]]></name></author>
		<updated>2003-04-09T10:07:07-04:00</updated>

		<published>2003-04-09T10:07:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18775#p18775</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18775#p18775"/>
		<title type="html"><![CDATA[problem with split]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18775#p18775"><![CDATA[
hi there!<br><br>this is my little proc:<br><br>proc qrequest {nick uhost hand chan args} {<br>global qqueue home<br>set commands [split $args " "]<br>set channel [lindex $commands 0]<br>set chantype [lindex $commands 1]<br>lappend qqueue $channel<br>lappend qqueue $nick<br>lappend qqueue $chantype<br>set qqlength [expr [llength $qqueue] / 3]<br>notice $nick "$nick, your request for $channel (Type: $chantype) has been queued. There are $qqlength items in queue."<br>}<br><br>but the response I get:<br><br>tuxX, your request for {#rbot (Type: private}) has been queued. There are 1 items in queue.<br><br>why are there those {} brackets?<br><br>thanks for any help!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=939">eiSi</a> — Wed Apr 09, 2003 10:07 am</p><hr />
]]></content>
	</entry>
	</feed>
