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

	<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>2006-10-10T11:12:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2006-10-10T11:12:28-04:00</updated>

		<published>2006-10-10T11:12:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67062#p67062</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67062#p67062"/>
		<title type="html"><![CDATA[multiple IF]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67062#p67062"><![CDATA[
<blockquote class="uncited"><div>Or use lsearch -glob for matching wildcards</div></blockquote>His wildcards are in the list, not in the part matched against the list...<br>Something like this might do what he wants:<div class="codebox"><p>Code: </p><pre><code>switch -glob -- $checkname {*test* -*roger* -*mary* -*merlin* -*polly* -*mandie* {# match}default {# no match}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Oct 10, 2006 11:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-10-10T01:38:14-04:00</updated>

		<published>2006-10-10T01:38:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67040#p67040</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67040#p67040"/>
		<title type="html"><![CDATA[multiple IF]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67040#p67040"><![CDATA[
Also, since string match will only return 1 or 0, you can simply use <br><div class="codebox"><p>Code: </p><pre><code>if {![string match *test* $checkname] &amp;&amp; ![string match *roger* $checkname] &amp;&amp; ![string match *mary* $checkname] &amp;&amp; ![string match *merlin* $checkname] &amp;&amp; ![string match *polly* $checkname] &amp;&amp; ![string match *mandie* $checkname]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Tue Oct 10, 2006 1:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-10-09T22:11:22-04:00</updated>

		<published>2006-10-09T22:11:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67034#p67034</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67034#p67034"/>
		<title type="html"><![CDATA[multiple IF]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67034#p67034"><![CDATA[
Yes.<br><div class="codebox"><p>Code: </p><pre><code>set nicknames "name1 name2 name3 name4"if {[lsearch -exact $nicknames $checkname] != -1} {     # named matched} else {     # not matched}Or use lsearch -glob for matching wildcardsif {[lsearch -glob $nicknames *$checkname*] != -1} {     # etc}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Mon Oct 09, 2006 10:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4st3r]]></name></author>
		<updated>2006-10-09T21:04:43-04:00</updated>

		<published>2006-10-09T21:04:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67030#p67030</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67030#p67030"/>
		<title type="html"><![CDATA[multiple IF]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67030#p67030"><![CDATA[
Hello <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>im working on a script, and i want to know if i can use list or something in IF cmd .. Example:<br>For the moment i use something like this:<div class="codebox"><p>Code: </p><pre><code>if {[string match *test* $checkname] == 0 &amp;&amp; [string match *roger* $checkname] == 0 &amp;&amp; [string match *mary* $checkname] == 0 &amp;&amp; [string match *merlin* $checkname] == 0 &amp;&amp; [string match *polly* $checkname] == 0 &amp;&amp; [string match *mandie* $checkname] == 0 } { </code></pre></div>but i have ALOT of IF like this ... i want to know i i can use something like a "list" like:<div class="codebox"><p>Code: </p><pre><code>list = "*test*,*roger*,*mary*, ..... "if {$checkname match $list ) { ....</code></pre></div>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8190">m4st3r</a> — Mon Oct 09, 2006 9:04 pm</p><hr />
]]></content>
	</entry>
	</feed>
