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

	<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>2005-05-29T12:41:16-04:00</updated>

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

		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-05-29T12:41:16-04:00</updated>

		<published>2005-05-29T12:41:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49937#p49937</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49937#p49937"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49937#p49937"><![CDATA[
from RFC1459 (Internet Relay Chat protocol):<br><blockquote class="uncited"><div> IRC messages are always lines of characters terminated with a CR-LF<br>   (Carriage Return - Line Feed) pair, and these messages shall not<br>   exceed 512 characters in length, counting all characters including<br>   the trailing CR-LF. Thus, there are 510 characters maximum allowed<br>   for the command and its parameters.  There is no provision for<br>   continuation message lines.</div></blockquote>i.e. your server is no longer compliant with the IRC protocol, whereas eggdrop tries to be (compliant)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sun May 29, 2005 12:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NetRider]]></name></author>
		<updated>2005-05-28T17:46:15-04:00</updated>

		<published>2005-05-28T17:46:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49932#p49932</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49932#p49932"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49932#p49932"><![CDATA[
Thanks for the help guys.<br><br>I found it would be easier to write a simle proxy in perl, which would just remove the \0 from the string sent by the server, rather than experimenting with the eggdrop code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6238">NetRider</a> — Sat May 28, 2005 5:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2005-05-24T07:50:59-04:00</updated>

		<published>2005-05-24T07:50:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49759#p49759</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49759#p49759"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49759#p49759"><![CDATA[
yes, but<blockquote class="uncited"><div>(but you don't need to put it)</div></blockquote>let's say "you don't <em class="text-italics">always</em> need to put it" <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>there are some functions that require a string to be "null-terminated".<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Tue May 24, 2005 7:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-05-23T11:46:58-04:00</updated>

		<published>2005-05-23T11:46:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49721#p49721</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49721#p49721"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49721#p49721"><![CDATA[
If you have an array of 20 elements (char string), this array can take for example 19 characters and the last element would be \0 (but you don't need to put it). So if you want to check the end of the string you can check if it's equal to \0.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon May 23, 2005 11:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2005-05-23T05:53:13-04:00</updated>

		<published>2005-05-23T05:53:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49715#p49715</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49715#p49715"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49715#p49715"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>hm.. maybe not for strings with fixed length, but it is definitely needed for strings with varying length.</div></blockquote>a string with a fixed length is called "constant" and isn't saved in a "variable" (or better a char array), is it? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote>no. a "constant" is basically a variable with unchanging content. a "variable" is basically everything, you can store values in.<br>as for C: unless you don't use a special "string" class, every string is a char array (well, in that string class as well, but you don't see that while coding <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">).<br><blockquote class="uncited"><div>PS: the book is 10 years old, but I somehow doubt C has changed that much since then.</div></blockquote>doubt that as well <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=2617">arcane</a> — Mon May 23, 2005 5:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-05-23T03:41:03-04:00</updated>

		<published>2005-05-23T03:41:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49705#p49705</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49705#p49705"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49705#p49705"><![CDATA[
<blockquote class="uncited"><div>hm.. maybe not for strings with fixed length, but it is definitely needed for strings with varying length.</div></blockquote>a string with a fixed length is called "constant" and isn't saved in a "variable" (or better a char array), is it? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>but seems it's either working or he has lost intrest in it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<br><br>PS: the book is 10 years old, but I somehow doubt C has changed that much since then.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Mon May 23, 2005 3:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2005-05-23T03:11:32-04:00</updated>

		<published>2005-05-23T03:11:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49702#p49702</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49702#p49702"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49702#p49702"><![CDATA[
hm.. maybe not for strings with fixed length, but it is definitely needed for strings with varying length.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Mon May 23, 2005 3:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Galadhrim]]></name></author>
		<updated>2005-05-22T15:50:46-04:00</updated>

		<published>2005-05-22T15:50:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49689#p49689</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49689#p49689"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49689#p49689"><![CDATA[
strange book... I learned that \0 is not needed but can prevent certain unwanted "features".<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2999">Galadhrim</a> — Sun May 22, 2005 3:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-05-21T18:22:20-04:00</updated>

		<published>2005-05-21T18:22:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49679#p49679</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49679#p49679"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49679#p49679"><![CDATA[
<blockquote class="uncited"><div>\0 means null in a string <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> often used to make sure that memory space is really empty.</div></blockquote>just for I took out my old C book, and it clearly says that strings REQUIRE to be terminated with \0!<br><br>Im triing to translate (im too lazy to write better english ^^):<blockquote class="uncited"><div>It seems that in the above array while saving the string "Zeichenkette" one array element - the 13th - keeps unused. But actually you need for saving strings not only 12, but 13 array elements, because in the diffrence to data objects of other types strings must be terminated wtih a special character. This character which marks the end of a string is the zero character '\0', ...</div></blockquote>So just give it a try... <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=2382">De Kus</a> — Sat May 21, 2005 6:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Galadhrim]]></name></author>
		<updated>2005-05-21T11:08:51-04:00</updated>

		<published>2005-05-21T11:08:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49669#p49669</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49669#p49669"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49669#p49669"><![CDATA[
\0 means null in a string <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> often used to make sure that memory space is really empty.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2999">Galadhrim</a> — Sat May 21, 2005 11:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-05-21T10:13:13-04:00</updated>

		<published>2005-05-21T10:13:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49663#p49663</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49663#p49663"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49663#p49663"><![CDATA[
okay my guess:<br>if I correctly remeber my programming times, \0 indicates the end of a string. Sooo, lets see, your buffer ending will look like:<br>0D 00 0A 00<br><br>however, for eggdrop the end of a line is 0A, but the bot will stop phrasing the string at the first 00... its the end of the string !!! so it will never phrase 0A (\n) so it never sees the EOL and probably just discards the string <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">.<br>solution: remove the first 00 again. try to remove the 0D instead, mIRC should even work with 0A line ends. Or try to add a double 00 at the end or switch 0D and 0A in your orignal version. Meaning try these:<br><br>\r \n \0 (maybe it was something else, verification makes wise)<br>\n \0<br>\n \0 \r \0<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat May 21, 2005 10:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Galadhrim]]></name></author>
		<updated>2005-05-21T04:01:27-04:00</updated>

		<published>2005-05-21T04:01:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49648#p49648</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49648#p49648"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49648#p49648"><![CDATA[
i would say that the fault is in the Flash client rather than the IRCu code, since mIRC and eggdrop both work with the original code.<br><br>I don't see how your code adds anything as the \r\n is meant to be together rather than separated. \r is a carriage return and \n new line. Separating these will work under Windows but not under Linux I guess. Seeing as the snippit you gave already had a line with \0 in it I cannot see how the first \0 works.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2999">Galadhrim</a> — Sat May 21, 2005 4:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NetRider]]></name></author>
		<updated>2005-05-17T19:38:06-04:00</updated>

		<published>2005-05-17T19:38:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49577#p49577</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49577#p49577"/>
		<title type="html"><![CDATA[Changed end of line char from \n to \0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49577#p49577"><![CDATA[
Hey, <br>I installed my own version of undernet ircu server.<br>In order to allow a flash chat client to connect, I had to change the end of line character from \n to \0<br>It now looks like:<br>  mb-&gt;msg[mb-&gt;length++] = '\r'; /* add \r\n to buffer */<br> <strong class="text-strong"> mb-&gt;msg[mb-&gt;length++] = '\0';  </strong><br>  mb-&gt;msg[mb-&gt;length++] = '\n';<br>  mb-&gt;msg[mb-&gt;length] = '\0'; /* not strictly necessary */<br><br>The bold line was added by me, and now mirc works fine, and the flash client works fine. but eggdrop has problems.<br><br>I enabled raw log in eggdrop, and saw that eggdrop receive all data, it can see a user joining, parting and also joins its own channels.<br><br>But it still shows its not on a channel. also it doesnt react on any text sent from the server. no modes, no join parts and so on.<br><br>Could someone help me modify eggdrop to react on these, or maybe a fix to the server code I submitted, so it can allow both flash clients and eggdrop.<br><br>thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6238">NetRider</a> — Tue May 17, 2005 7:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
