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

	<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-07-04T19:06:24-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ribot]]></name></author>
		<updated>2004-07-04T19:06:24-04:00</updated>

		<published>2004-07-04T19:06:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=38203#p38203</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=38203#p38203"/>
		<title type="html"><![CDATA[rehash crashes - restart doesn't (also empty string prob)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=38203#p38203"><![CDATA[
welll does anyone else have the same problem as me? how do you fix bugs, after changing the code? do you rehash, or restart perhaps? maybe im doing something wrong...? or maybe the bot just crashes because it's not supposed to handle mod changes while it's running?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3812">ribot</a> — Sun Jul 04, 2004 7:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pelefanten]]></name></author>
		<updated>2004-06-06T09:18:50-04:00</updated>

		<published>2004-06-06T09:18:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37027#p37027</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37027#p37027"/>
		<title type="html"><![CDATA[rehash crashes - restart doesn't (also empty string prob)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37027#p37027"><![CDATA[
This one should take care of text == NULL and text = ""<br><div class="codebox"><p>Code: </p><pre><code>#include &lt;string.h&gt;if (strlen(text) == 0) {    ....}</code></pre></div>Or if you dont want to use strlen<br><div class="codebox"><p>Code: </p><pre><code>if (!text || !*text) {    ....}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3028">pelefanten</a> — Sun Jun 06, 2004 9:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-06-06T03:20:39-04:00</updated>

		<published>2004-06-06T03:20:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37016#p37016</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37016#p37016"/>
		<title type="html"><![CDATA[rehash crashes - restart doesn't (also empty string prob)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37016#p37016"><![CDATA[
<blockquote class="uncited"><div>I think I am supposed to have a logical expression. And the question is about c, because I know how to do it in tcl.<br><br>This is how to do it in tcl:<div class="codebox"><p>Code: </p><pre><code>if {$text == ""} {}</code></pre></div>How do I make this true in c, with var text, (if text is empty the expression should return true).</div></blockquote>Try this:<br>if (text == NULL) {<br><br>}<p>Statistics: Posted by Guest — Sun Jun 06, 2004 3:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ribot]]></name></author>
		<updated>2004-05-30T04:42:37-04:00</updated>

		<published>2004-05-30T04:42:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36748#p36748</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36748#p36748"/>
		<title type="html"><![CDATA[rehash crashes - restart doesn't (also empty string prob)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36748#p36748"><![CDATA[
I think I am supposed to have a logical expression. And the question is about c, because I know how to do it in tcl.<br><br>This is how to do it in tcl:<div class="codebox"><p>Code: </p><pre><code>if {$text == ""} {}</code></pre></div>How do I make this true in c, with var text, (if text is empty the expression should return true).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3812">ribot</a> — Sun May 30, 2004 4:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-05-23T15:02:30-04:00</updated>

		<published>2004-05-23T15:02:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36549#p36549</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36549#p36549"/>
		<title type="html"><![CDATA[rehash crashes - restart doesn't (also empty string prob)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36549#p36549"><![CDATA[
To help your smaller problem.<br><br>(string == "") is a logical expression, true/false 1/0<br><br>try using string:<div class="codebox"><p>Code: </p><pre><code>if {[string equal -nocase $text ""]} { puts stdout "text isemtpy" }</code></pre></div><div class="codebox"><p>Code: </p><pre><code>if {[string match $text ""]} { puts stdout "text matches \"\"" }</code></pre></div><p>Statistics: Posted by Guest — Sun May 23, 2004 3:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ribot]]></name></author>
		<updated>2004-05-23T12:32:43-04:00</updated>

		<published>2004-05-23T12:32:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36547#p36547</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36547#p36547"/>
		<title type="html"><![CDATA[rehash crashes - restart doesn't (also empty string prob)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36547#p36547"><![CDATA[
As I update the code for my module, and run "make" without errors, copy the module to eggdrop's modules, sometimes everything goes smoothly. But sometimes the bot crashes because of a segment violation. I guess it can happen even if it works to compile the mod, but the strange thing is that after my segment violation I can start the bot again, and after that rehash it again, and the module works, and there doesn't seem to exist any problem. Strange innit? Bug or is it some subtle error in my code perhaps?<br><br>Then a smaller problem, with pub bind, if the text variable is empty, it doesn't seem to be true that (text == "") nor (text == {}) neither (text == NULL). How do I make the condition that checks if the text variable is empty?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3812">ribot</a> — Sun May 23, 2004 12:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
