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

	<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>2004-02-21T20:25:21-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-02-21T20:25:21-04:00</updated>

		<published>2004-02-21T20:25:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33834#p33834</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33834#p33834"/>
		<title type="html"><![CDATA[Array exists]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33834#p33834"><![CDATA[
Ah I might have forgotton that, thanks!<br><br>Edit: I added a global for ipcounter but it still gets past the if statement every time, couting clones multiple times. I also tested by making the if statement:<div class="codebox"><p>Code: </p><pre><code>if {$ipcounter($fullhost) != "1"}</code></pre></div>but obviously it won't work because when it gets to a specific host for the first time it hasnt been set yet (there is no info in that var, it cannot be read, needing info exists).  I'm lost <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"><p>Statistics: Posted by Guest — Sat Feb 21, 2004 8:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-02-21T15:49:41-04:00</updated>

		<published>2004-02-21T15:49:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33809#p33809</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33809#p33809"/>
		<title type="html"><![CDATA[Array exists]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33809#p33809"><![CDATA[
Maybe you didn't make ipcounter global in that proc?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sat Feb 21, 2004 3:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-02-21T15:01:20-04:00</updated>

		<published>2004-02-21T15:01:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33807#p33807</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33807#p33807"/>
		<title type="html"><![CDATA[Array exists]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33807#p33807"><![CDATA[
The "info exists" should give the right answer, the thing is if you have called globaly the "ipcounter" variable inside your proc (if any) and also it should be:<div class="codebox"><p>Code: </p><pre><code>putlog "$ipcounter($fullhost)"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Feb 21, 2004 3:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-02-21T14:25:15-04:00</updated>

		<published>2004-02-21T14:25:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33803#p33803</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33803#p33803"/>
		<title type="html"><![CDATA[Array exists]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33803#p33803"><![CDATA[
Hi,<br><br>Small question (I searched the forums but nothing really came up / helped):<br><br>I'm creating a small script that has to count unique hosts. Now, I've never really gotten info exists to work for arrays. I looked up a few examples and mine seems correct. However, the code below always gets past the if statement; even if ipcounter($fullhost) DOES exist. I'd like to know how exactly my if statement will only continue if it doesn't already exist.<br><div class="codebox"><p>Code: </p><pre><code>if {![info exists ipcounter($fullhost)]} {    set ipcounter($fullhost) "1"    putlog "$fullhost" # &lt;-- to help me see its counting the same host multiple times    incr upcounter}</code></pre></div>I've also tried <strong class="text-strong">array exists</strong> but that did exactly the same...<br><br>Thanks,<br><br>Michiel<p>Statistics: Posted by Guest — Sat Feb 21, 2004 2:25 pm</p><hr />
]]></content>
	</entry>
	</feed>
