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

	<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-09-04T08:58:30-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-09-04T08:58:30-04:00</updated>

		<published>2003-09-04T08:58:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26467#p26467</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26467#p26467"/>
		<title type="html"><![CDATA[How do I do a if != with 2 expresions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26467#p26467"><![CDATA[
Oh, and bwt, the use of () is just for user (not the user user <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> ) knowledge to see/understand the code more better/efficient or something similar to this.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Sep 04, 2003 8:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TeDDyBeeR]]></name></author>
		<updated>2003-09-04T08:32:46-04:00</updated>

		<published>2003-09-04T08:32:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26466#p26466</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26466#p26466"/>
		<title type="html"><![CDATA[How do I do a if != with 2 expresions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26466#p26466"><![CDATA[
It was just try to help you with more information about the <strong class="text-strong">if { ... } esle { ...  }</strong><br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3774">TeDDyBeeR</a> — Thu Sep 04, 2003 8:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-09-04T08:28:29-04:00</updated>

		<published>2003-09-04T08:28:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26465#p26465</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26465#p26465"/>
		<title type="html"><![CDATA[How do I do a if != with 2 expresions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26465#p26465"><![CDATA[
The &amp;&amp; means "and" and the || means "or".. also, for bold use \002 as TeDDyBeeR sugested.<br>So the "if {($first != "1") &amp;&amp; ($second != "2" || $second != "3")} {...}" should means: "If $first is not equal with 1 and $second is not equal with 2 or 3 do something.." <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=187">caesar</a> — Thu Sep 04, 2003 8:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-09-04T08:03:36-04:00</updated>

		<published>2003-09-04T08:03:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26463#p26463</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26463#p26463"/>
		<title type="html"><![CDATA[How do I do a if != with 2 expresions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26463#p26463"><![CDATA[
that's not necessary in his case, no need for the ()<br><br>it might be needed in cases when &amp;&amp; and || are combined in the same if phrase.<br>example : <br>if {($first != "1") &amp;&amp; ($second != "2" || $second != "3")} {...}<br>this means if something and anotherthing ....<br>another thing will be something or something. (if you know what I mean)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Sep 04, 2003 8:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TeDDyBeeR]]></name></author>
		<updated>2003-09-04T05:51:44-04:00</updated>

		<published>2003-09-04T05:51:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26457#p26457</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26457#p26457"/>
		<title type="html"><![CDATA[How do I do a if != with 2 expresions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26457#p26457"><![CDATA[
<blockquote class="uncited"><div>thanks man that worked jsut fine..<br>here is my final code that worked just great:<br><br>if {$badword(kb$chan) != "kick" &amp;&amp; $badword(kb$chan) != "ban"} { putserv "PRIVMSG $chan :[bold]Debugging:[bold] END" ; return }<br><br>that was just a test to see if it would work.. it did so now I can remove the debuging txt and move on to the next step.. thanks..<br><br><br><br>Mike.</div></blockquote>The best what to use 2 variabal checks, it set the 2 between ( ) like :<div class="codebox"><p>Code: </p><pre><code>if {($badword(kb$chan) != "kick") &amp;&amp; ($badword(kb$chan) != "ban")} { putserv "PRIVMSG $chan :\002Debugging:\002 END" ; return }</code></pre></div><strong class="text-strong">note : [bold] must be \002 in tcl's <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></strong><br><br>you can also use more checks in <strong class="text-strong">if</strong>:<div class="codebox"><p>Code: </p><pre><code>if {((expr1 != "whatever") &amp;&amp; (expr2 == "whatever")) || (expr3 == $var)} { .... }</code></pre></div>this is procedure will run when :<br><strong class="text-strong">expr1 is NOT TRUE and expr2 is TRUE</strong><br>or when<br><strong class="text-strong">expr3 is TRUE</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3774">TeDDyBeeR</a> — Thu Sep 04, 2003 5:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-09-01T21:47:03-04:00</updated>

		<published>2003-09-01T21:47:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26162#p26162</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26162#p26162"/>
		<title type="html"><![CDATA[How do I do a if != with 2 expresions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26162#p26162"><![CDATA[
thanks man that worked jsut fine..<br>here is my final code that worked just great:<br><br>if {$badword(kb$chan) != "kick" &amp;&amp; $badword(kb$chan) != "ban"} { putserv "PRIVMSG $chan :[bold]Debugging:[bold] END" ; return }<br><br>that was just a test to see if it would work.. it did so now I can remove the debuging txt and move on to the next step.. thanks..<br><br><br><br>Mike.<p>Statistics: Posted by Guest — Mon Sep 01, 2003 9:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-09-01T21:31:05-04:00</updated>

		<published>2003-09-01T21:31:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26161#p26161</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26161#p26161"/>
		<title type="html"><![CDATA[Re: How do I do a if != with 2 expresions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26161#p26161"><![CDATA[
<blockquote class="uncited"><div>hey im trying to do a script that checks for 2 difrent keywords<br>example "1" "2" I want to be able to<br>detect if $myvar != "1" || $myvar != "2"<br>but how do I do that without each running into each other?<br><br><br><br>Mike.</div></blockquote>  Looks like you have it figured out already... I'm not sure what you are asking....<br><br>To tidy it up a bit:<div class="codebox"><p>Code: </p><pre><code>if {$myvar != "1" || $myvar != "2"} { ... }</code></pre></div> Although, logically, what I think you may want is<br>"If myvar isn't "1" and if myvar isn't "2" then..."<br><br>If that's what you want, you'd need to do something like:<div class="codebox"><p>Code: </p><pre><code>if {$myvar != "1" &amp;&amp; $myvar != "2"} { ... }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Mon Sep 01, 2003 9:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-09-01T20:45:11-04:00</updated>

		<published>2003-09-01T20:45:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26158#p26158</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26158#p26158"/>
		<title type="html"><![CDATA[How do I do a if != with 2 expresions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26158#p26158"><![CDATA[
hey im trying to do a script that checks for 2 difrent keywords<br>example "1" "2" I want to be able to<br>detect if $myvar != "1" || $myvar != "2"<br>but how do I do that without each running into each other?<br><br><br><br>Mike.<p>Statistics: Posted by Guest — Mon Sep 01, 2003 8:45 pm</p><hr />
]]></content>
	</entry>
	</feed>
