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

	<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>2007-01-20T23:51:38-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-01-20T23:51:38-04:00</updated>

		<published>2007-01-20T23:51:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69775#p69775</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69775#p69775"/>
		<title type="html"><![CDATA[One result in public, the rest in private]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69775#p69775"><![CDATA[
So basically, you did exactly what user suggested <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jan 20, 2007 11:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rubenmb]]></name></author>
		<updated>2007-01-20T23:12:46-04:00</updated>

		<published>2007-01-20T23:12:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69774#p69774</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69774#p69774"/>
		<title type="html"><![CDATA[One result in public, the rest in private]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69774#p69774"><![CDATA[
Yes user your right, i should have posted you some code.<br>And that way you would see that after calling the foreach i handle each argument of each string in a way<br>that makes it impossible to use the method you posted,<br>because its no longer:<br><div class="codebox"><p>Code: </p><pre><code> {some text and more text} {second result text} {and so on}</code></pre></div>after my foreach it'll be something like:<br><div class="codebox"><p>Code: </p><pre><code>[TAG] Result 1: \002some text and more text\002</code></pre></div>for each of the resulted data.<br><br>But your help was still very much appreciated, cause basing my self on that<br>i was able to tweak the script and end up with what i wanted.<br>I'll explain for the ones that will run into the same problem:<div class="codebox"><p>Code: </p><pre><code>## instead of looping around the raw data first## I separated the first result ($n1) from the rest ($nx)       set n1 [lindex $data 0]       set nx [lrange $data 1 end]## then i submited the first result to my proc with type=public       my_proc $n1 $needed $variables public## for the rest of the results, and now yes, i use a foreach loop and type=private       foreach item $nx {          my_proc $item $needed $variables private       }## then on my procproc my_proc { item needed variables type }set thisset thatbla blaif {$type == "public"} {     putserv "PRIVMSG $channel :$line"} else {     putserv "PRIVMSG $nick :$line"}}</code></pre></div>So thats how i pull it off  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br>Again thanks for the help <strong class="text-strong">user</strong><br><br>regards<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7638">rubenmb</a> — Sat Jan 20, 2007 11:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-01-20T22:20:00-04:00</updated>

		<published>2007-01-20T22:20:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69773#p69773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69773#p69773"/>
		<title type="html"><![CDATA[One result in public, the rest in private]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69773#p69773"><![CDATA[
<blockquote class="uncited"><div>That looks nice. Tks for the reply. But how should it be done if some of the results contain more then one argument in the same string:<div class="codebox"><p>Code: </p><pre><code>{some text more text}</code></pre></div>lindex will result in an output of those words like they were diferent results:<div class="codebox"><p>Code: </p><pre><code>sometextmoretext</code></pre></div> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"></div></blockquote>Yeah, and for<div class="codebox"><p>Code: </p><pre><code>{"some text" "more text"}</code></pre></div>lindex will result in<blockquote class="uncited"><div>some text<br>more text</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jan 20, 2007 10:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2007-01-20T21:53:38-04:00</updated>

		<published>2007-01-20T21:53:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69772#p69772</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69772#p69772"/>
		<title type="html"><![CDATA[One result in public, the rest in private]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69772#p69772"><![CDATA[
In your first post you said you used foreach to create some variables... $list in my example would be the list you passed to foreach.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Sat Jan 20, 2007 9:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rubenmb]]></name></author>
		<updated>2007-01-20T21:35:11-04:00</updated>

		<published>2007-01-20T21:35:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69771#p69771</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69771#p69771"/>
		<title type="html"><![CDATA[One result in public, the rest in private]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69771#p69771"><![CDATA[
That looks nice. Tks for the reply. But how should it be done if some of the results contain more then one argument in the same string:<div class="codebox"><p>Code: </p><pre><code>{some text more text}</code></pre></div>lindex will result in an output of those words like they were diferent results:<div class="codebox"><p>Code: </p><pre><code>sometextmoretext</code></pre></div> <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 <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7638">rubenmb</a> — Sat Jan 20, 2007 9:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2007-01-20T18:27:51-04:00</updated>

		<published>2007-01-20T18:27:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69770#p69770</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69770#p69770"/>
		<title type="html"><![CDATA[Re: One result in public, the rest in private]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69770#p69770"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>puthelp "PRIVMSG #chan :[lindex $list 0]"foreach item [lrange $list 1 end] {puthelp "PRIVMSG nick :$item"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Sat Jan 20, 2007 6:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rubenmb]]></name></author>
		<updated>2007-01-20T15:25:11-04:00</updated>

		<published>2007-01-20T15:25:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69767#p69767</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69767#p69767"/>
		<title type="html"><![CDATA[One result in public, the rest in private]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69767#p69767"><![CDATA[
Hi everyone,<br><br>Here's what i want to do. I have some results from a mysql query, lets say like 10. And right now, i am using a foreach loop to set my variables for each one of the results and output them into one channel. Now what i want to do is output the first result it finds in public, and all the rest in private.<br>Anyone has an idea on how this could be done?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7638">rubenmb</a> — Sat Jan 20, 2007 3:25 pm</p><hr />
]]></content>
	</entry>
	</feed>
