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

	<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-11-17T09:36:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-11-17T09:36:17-04:00</updated>

		<published>2003-11-17T09:36:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30182#p30182</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30182#p30182"/>
		<title type="html"><![CDATA[more than one arg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30182#p30182"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc pub:distance { nick uhost hand chan arg } { if {[llength $arg] &gt;= 2} {   catch {string trim [exec /home/darky/scripts/planet [lindex [split $arg] 0] [lindex [split $arg] 1]]} distance   putserv "privmsg $chan :$distance\r"} else {   putserv "PRIVMSG $chan :Give 2 planets !"}</code></pre></div>notice the "lindex" 0 for first arg and 1 for second arg. (unless you're using pubm or msgm bind)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Nov 17, 2003 9:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-11-17T06:37:19-04:00</updated>

		<published>2003-11-17T06:37:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30172#p30172</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30172#p30172"/>
		<title type="html"><![CDATA[more than one arg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30172#p30172"><![CDATA[
$arg contains the entire string passed to the proc.<br><br>Note, try feeding your script somthing like "!d test {test"<br><br>Note the error.<br><br>Your working with strings, but treating them like lists.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Nov 17, 2003 6:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-17T02:08:28-04:00</updated>

		<published>2003-11-17T02:08:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30163#p30163</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30163#p30163"/>
		<title type="html"><![CDATA[more than one arg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30163#p30163"><![CDATA[
Hi all<br><br>I'm beginning tcl scripting, so I have quite a lot of questions .. But today I have just one <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>I have a trigger in my script that calls a bash script<br>However I need 2 args for my bash script, and I just find out how to grab one, exemple here :<div class="codebox"><p>Code: </p><pre><code>proc pub:distance { nick uhost hand chan arg } {if {[llength $arg]==0} {                putserv "PRIVMSG $chan :Give 2 planets !"} else {                catch {string trim [exec /home/darky/scripts/planet $arg $arg2 ]} distance                putserv "privmsg $chan :$distance\r"        }        return 0}</code></pre></div>The proc is called like this<br>!d ARG-1 ARG-2<br><br>Thanks for your help !<p>Statistics: Posted by Guest — Mon Nov 17, 2003 2:08 am</p><hr />
]]></content>
	</entry>
	</feed>
