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

	<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>2015-05-16T01:44:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-05-16T01:44:59-04:00</updated>

		<published>2015-05-16T01:44:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104102#p104102</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104102#p104102"/>
		<title type="html"><![CDATA[Several conditions ''&amp;&amp;&quot; and '||' in one line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104102#p104102"><![CDATA[
Thanks to your advices <strong class="text-strong">SpiKe^^</strong>  I fixed! <br><br>My eternal confusion between <em class="text-italics">string</em> and <em class="text-italics">list</em>. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> <br><br>All variables were string!<br>I treated all variables as a text string, properly splitting it into a list, and deleted extra operators  <div class="codebox"><p>Code: </p><pre><code>!= -1 } { </code></pre></div>I'll put the final solution at the right <a href="http://forum.egghelp.org/viewtopic.php?t=19960" class="postlink">post</a>. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sat May 16, 2015 1:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2015-05-16T00:48:13-04:00</updated>

		<published>2015-05-16T00:48:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104100#p104100</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104100#p104100"/>
		<title type="html"><![CDATA[Several conditions ''&amp;&amp;&quot; and '||' in one line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104100#p104100"><![CDATA[
I see multiple possible reasons why this expression does not resolve as you might be wishing...<br>None of the reasons rest with the way you are grouping things together.<br><br>What exactly is in the variable $text ?<br>By its name, I have to expect it holds a text string, and not a list.<br>Sometimes you treat it as text, &amp; others as a list with sublists?<br><br>1) In these parts of the expression, you treat $text as a nested list, sort of, and badly (these will probably never resolve to true)...<div class="codebox"><p>Code: </p><pre><code>([lsearch -exact -ascii -nocase [lindex $text 0 end] [lindex $who1 0 end]] != -1)</code></pre></div>2) Right after that, you treat $text as a text string, properly splitting it into a list...<div class="codebox"><p>Code: </p><pre><code>([llength [split $text]] == 2)</code></pre></div>3) And you finish off treating $text as a text string again...<div class="codebox"><p>Code: </p><pre><code>([string index $text end] == "$whof")</code></pre></div>4) Then at the very end of your expression you just throw in an extra bit of code that has no home at all.<br>Even if the rest of that expression was correct, just throwing in extra operators here and there can't possibly help:)<div class="codebox"><p>Code: </p><pre><code> != -1 } { </code></pre></div>In order for anyone to try to help with this mess, we would need much more information on what is included in the vars $text and $who1, 2 &amp; 3.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat May 16, 2015 12:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-05-15T22:59:31-04:00</updated>

		<published>2015-05-15T22:59:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104099#p104099</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104099#p104099"/>
		<title type="html"><![CDATA[Several conditions ''&amp;&amp;&quot; and '||' in one line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104099#p104099"><![CDATA[
I need each code segment separated by red brackets,  is considered separately from other conditions.<blockquote class="uncited"><div>if {<span style="color:red">(</span>([lsearch -exact -ascii -nocase [lindex $text 0 end] [lindex $who1 0 end]] != -1) &amp;&amp; ([llength [split $text]] == 2) \<br>&amp;&amp; ([string index $text end] == "$whof")<span style="color:red">)</span> \<br>|| <span style="color:red">(</span>([lsearch -exact -ascii -nocase [lindex $text 0 end] [lindex $who2 0 end]] != -1) &amp;&amp; ([llength [split $text]] == 3) \<br>&amp;&amp; ([string index $text end] == "$whof")<span style="color:red">)</span> \<br>|| <span style="color:red">(</span>([lsearch -exact -ascii -nocase [lindex $text 0 end] [lindex $who3 0 end]] != -1) &amp;&amp; ([llength [split $text]] == 4) &amp;&amp; ([string index $text end] == "$whof")<span style="color:red">)</span> != -1 } { <br>more stuff<br>}</div></blockquote>I tried adding other brackets at the beginning of the code and at the end, but it is malfunctioning.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Fri May 15, 2015 10:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
