﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.ucis.nl/index.php?action=history&amp;feed=atom&amp;title=UDPMSG3_Protocol</id>
	<title>UDPMSG3 Protocol - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.ucis.nl/index.php?action=history&amp;feed=atom&amp;title=UDPMSG3_Protocol"/>
	<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=UDPMSG3_Protocol&amp;action=history"/>
	<updated>2026-04-29T18:03:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>http://wiki.ucis.nl/index.php?title=UDPMSG3_Protocol&amp;diff=194&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=UDPMSG3_Protocol&amp;diff=194&amp;oldid=prev"/>
		<updated>2022-11-09T14:49:54Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:49, 9 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://wiki.ucis.nl/index.php?title=UDPMSG3_Protocol&amp;diff=193&amp;oldid=prev</id>
		<title>Admin: /* Message fields */</title>
		<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=UDPMSG3_Protocol&amp;diff=193&amp;oldid=prev"/>
		<updated>2013-07-08T17:47:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Message fields&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:47, 8 July 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Message fields ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Message fields ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Key		Value&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Key		Value&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  CHN		A channel name, this can be anything. For public chat channels, it is recommended to use &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;IRC style names&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;like &lt;/del&gt;#&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;anonet&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  CHN		A channel name, this can be anything. For &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;IRC-like &lt;/ins&gt;public chat channels, it is recommended to use &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the format &amp;quot;chat/&amp;lt;CHANNELNAME&amp;gt;&amp;quot;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;where &amp;lt;CHANNELNAME&amp;gt; does not include the &lt;/ins&gt;# &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;character&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eg &lt;/ins&gt;&amp;quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;chat&lt;/ins&gt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;anonet&lt;/ins&gt;&amp;quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; 		Although channel names in general have no particular meaning&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;it is recommended to use the &lt;/del&gt;&amp;quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;USER&lt;/del&gt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;NICKNAME&amp;gt;&lt;/del&gt;&amp;quot; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;format for private messages&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  CMD		The event that caused the message to be sent, for chat channels this is one of &amp;quot;MSG&amp;quot;, &amp;quot;JOIN&amp;quot;, &amp;quot;PART&amp;quot;, &amp;quot;NICK&amp;quot;, &amp;quot;ALIVE&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot;, &amp;quot;PMSG&lt;/ins&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  CMD		The event that caused the message to be sent, for chat channels this is one of &amp;quot;MSG&amp;quot;, &amp;quot;JOIN&amp;quot;, &amp;quot;PART&amp;quot;, &amp;quot;NICK&amp;quot;, &amp;quot;ALIVE&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  NET		The originating network, preferably a short name or abbreviation to identify the external network (if any) that originated the event. Purely informational.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  NET		The originating network, preferably a short name or abbreviation to identify the external network (if any) that originated the event. Purely informational.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  USR		Nickname of the user (if any) whom has initiated the event (recommendation is to use only alphanumeric characters)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  USR		Nickname of the user (if any) whom has initiated the event (recommendation is to use only alphanumeric characters)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; DNET		The destination network for the message (optional, often used for CMD=PMSG)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; DUSR		The recipient user nickname for the message (for CMD=PMSG)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MSG		The message associated with the event (only required for MSG, accepted for PART)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MSG		The message associated with the event (only required for MSG, accepted for PART)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  NEWNICK		New nickname (only valid for NICK command)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  NEWNICK		New nickname (only valid for NICK command)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l15&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 16:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note here that no implementation is required to send a JOIN, PART or NICK event if these events occur, but it is considered nice behaviour to do so as it provides a more transparent view of the chatbox.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note here that no implementation is required to send a JOIN, PART or NICK event if these events occur, but it is considered nice behaviour to do so as it provides a more transparent view of the chatbox.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The MSG command indicates that a message has been sent by the user. JOIN and PART are used when a user joins and leaves a channel. NICK is used for nickname changes, but for simplicity an implementation may choose to send or interpret this command as a PART from the old nick followed by a JOIN from the new nick. The ALIVE command indicates that a user is still in a channel, this message may be sent at periodic intervals to keep user lists up to date.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The MSG command indicates that a message has been sent by the user. JOIN and PART are used when a user joins and leaves a channel. NICK is used for nickname changes, but for simplicity an implementation may choose to send or interpret this command as a PART from the old nick followed by a JOIN from the new nick. The ALIVE command indicates that a user is still in a channel, this message may be sent at periodic intervals to keep user lists up to date&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. The PMSG command can be used for direct user-to-user messages, where DUSR and optionally DNET specify the recipient of the message&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Message encoding ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Message encoding ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://wiki.ucis.nl/index.php?title=UDPMSG3_Protocol&amp;diff=192&amp;oldid=prev</id>
		<title>Admin: /* Message fields */</title>
		<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=UDPMSG3_Protocol&amp;diff=192&amp;oldid=prev"/>
		<updated>2011-01-09T02:40:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Message fields&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Implementation ==&lt;br /&gt;
More information on deployments and implementations is available on the [[UDPMSG3]] page.&lt;br /&gt;
&lt;br /&gt;
== Message fields ==&lt;br /&gt;
 Key		Value&lt;br /&gt;
 CHN		A channel name, this can be anything. For public chat channels, it is recommended to use IRC style names, like #anonet&lt;br /&gt;
 		Although channel names in general have no particular meaning, it is recommended to use the &amp;quot;USER/&amp;lt;NICKNAME&amp;gt;&amp;quot; format for private messages&lt;br /&gt;
 CMD		The event that caused the message to be sent, for chat channels this is one of &amp;quot;MSG&amp;quot;, &amp;quot;JOIN&amp;quot;, &amp;quot;PART&amp;quot;, &amp;quot;NICK&amp;quot;, &amp;quot;ALIVE&amp;quot;&lt;br /&gt;
 NET		The originating network, preferably a short name or abbreviation to identify the external network (if any) that originated the event. Purely informational.&lt;br /&gt;
 USR		Nickname of the user (if any) whom has initiated the event (recommendation is to use only alphanumeric characters)&lt;br /&gt;
 MSG		The message associated with the event (only required for MSG, accepted for PART)&lt;br /&gt;
 NEWNICK		New nickname (only valid for NICK command)&lt;br /&gt;
 DUMMY		An optional random value, to guarantee uniqueness of the packet (otherwise it's meaningless and should be ignored on reception)&lt;br /&gt;
&lt;br /&gt;
Note here that no implementation is required to send a JOIN, PART or NICK event if these events occur, but it is considered nice behaviour to do so as it provides a more transparent view of the chatbox.&lt;br /&gt;
&lt;br /&gt;
The MSG command indicates that a message has been sent by the user. JOIN and PART are used when a user joins and leaves a channel. NICK is used for nickname changes, but for simplicity an implementation may choose to send or interpret this command as a PART from the old nick followed by a JOIN from the new nick. The ALIVE command indicates that a user is still in a channel, this message may be sent at periodic intervals to keep user lists up to date.&lt;br /&gt;
&lt;br /&gt;
== Message encoding ==&lt;br /&gt;
A message consists of a list of key-value pairs. Keys and values are stored as interleaved strings separated by a NULL byte (binary value 0). For this reason, NULL bytes are not allowed in keys or values. All keys and values should be encoded in ASCII or UTF-8. All binary data should be encoded using an arbitrary, extension specific encoding (eg hex, base32, base64, base128) - this is not part of the core protocol.&lt;br /&gt;
&lt;br /&gt;
A list of key-value is stored as follows:&lt;br /&gt;
 &amp;lt;KEY1&amp;gt;\0&amp;lt;VALUE1&amp;gt;\0&amp;lt;KEY2&amp;gt;\0&amp;lt;VALUE2&amp;gt;\0&lt;br /&gt;
&lt;br /&gt;
Note the tailing \0 character. \0 represents a NULL byte. &amp;lt;KEYx&amp;gt; and &amp;lt;VALUEx&amp;gt; represent the key and value of a key-value pair.&lt;br /&gt;
&lt;br /&gt;
== Broadcast subsystem ==&lt;br /&gt;
The broadcast system relies on the uniqueness of every message. Each node in the system should process each message at most one time, so it should keep a certain back log of messages it has recently seen. Storing an MD5 or SHA1 hash of the message is an acceptable compromise for the uniqueness check, to save memory and speed up lookups.&lt;br /&gt;
&lt;br /&gt;
A node should send packets it receives to all it's peers, except for the one that sent the packet. However, if the packet is returned to the sending node, the sending node should ignore the packet. How the packet is transfered or encapsulated is not specified. It's considered good practice to add a checksum of hash to the packet. A few recommendations for the underlying protocol are described below.&lt;br /&gt;
&lt;br /&gt;
The length of a complete message should not exceed 1024 bytes, so that it can reliably be encapsulated in an UDP packet. If a packet is truncated by a lower networking protocol, the entire packet should be dropped.&lt;br /&gt;
&lt;br /&gt;
== Packet transfer protocols ==&lt;br /&gt;
Note that these protocols are only recommendations to encourage compatibility among different implementations. The only requirement here, is that a message may not be changed, and thus should somehow be checked for changes and truncation. Corrupted messages should be dropped.&lt;br /&gt;
=== UDP with SHA1 checksum ===&lt;br /&gt;
The packet is prefixed with a 20 byte (binary) SHA1 checksum, and then sent as one UDP packet. The receiver should verify the checksum to make sure that the packet has not taken any damage and has not been truncated. The UDP connection can be configured in various different ways: one bidirectional connection, one unidirectional connection, two unidirectional connections and variations thereof.&lt;br /&gt;
&lt;br /&gt;
 Data structure: &amp;lt;20-byte-SHA1-hash&amp;gt;&amp;lt;Message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== TCP with framing ===&lt;br /&gt;
The packet is prefixed with a 2 octet big-endian length field. If the receiving side receives a packet with an impossible length (0 or &amp;gt;1024 bytes), it should ignore the packet and may close the connection. A client/consumer should be able to establish an outbound connection; a hub/router should be able to accept inbound connections, and may be able to establish outbound connections for the purpose of linking to other hubs, but it's easy to work around this using socat for example.&lt;br /&gt;
&lt;br /&gt;
 Data structure: &amp;lt;2-byte-big-endian-length-field&amp;gt;&amp;lt;Message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example sourcecode ==&lt;br /&gt;
=== Key value pair construction and parsing in C ===&lt;br /&gt;
&amp;lt;pre&amp;gt;void KVPDecodeValues(char* encoded, int mlen, char** keys, char** values) {&lt;br /&gt;
	int i, j;&lt;br /&gt;
	for (j = 0; j &amp;lt; mlen; j++) {&lt;br /&gt;
		char* key = encoded + j;&lt;br /&gt;
		for (; j &amp;lt; mlen &amp;amp;&amp;amp; encoded[j]; j++);&lt;br /&gt;
		if (++j &amp;gt;= mlen) break;&lt;br /&gt;
		char* value = encoded + j;&lt;br /&gt;
		for (; j &amp;lt; mlen &amp;amp;&amp;amp; encoded[j]; j++);&lt;br /&gt;
		if (j &amp;gt;= mlen) break;&lt;br /&gt;
		for (i = 0; keys[i]; i++) if (strcmp(key[i], key) == 0) values[i] = value;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
int KVPEncodeValues(char* encoded, int mlen, char** keys, char** values) {&lt;br /&gt;
	int i, l = 0;&lt;br /&gt;
	for (i = 0; keys[i] &amp;amp;&amp;amp; values[i]; i++) {&lt;br /&gt;
		int kl = strlen(keys[i]);&lt;br /&gt;
		int vl = strlen(values[i]);&lt;br /&gt;
		l += kl + vl + 2;&lt;br /&gt;
		if (l &amp;gt; mlen) return -1;&lt;br /&gt;
		strncpy(encoded, keys[i], kl); encoded += kl; *encoded = 0; encoded++;&lt;br /&gt;
		strncpy(encoded, values[i], vl); encoded += vl; *encoded = 0; encoded++;&lt;br /&gt;
	}&lt;br /&gt;
	return l;&lt;br /&gt;
}&lt;br /&gt;
int KVPEncodeGetLength(char** keys, char** values) {&lt;br /&gt;
	int i, l = 0;&lt;br /&gt;
	for (i = 0; keys[i] &amp;amp;&amp;amp; values[i]; i++) l += strlen(keys[i]) + strlen(values[i]) + 2;&lt;br /&gt;
	return l;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Key value pair construction and parsing in PHP ===&lt;br /&gt;
&amp;lt;pre&amp;gt;function KVPDecode($encoded) {&lt;br /&gt;
	$parts = explode(&amp;quot;\0&amp;quot;, $encoded);&lt;br /&gt;
	$ret = array();&lt;br /&gt;
	for ($i = 0; $i &amp;lt; count($parts) - 1; $i += 2) $ret[$parts[$i]] = $parts[$i+1];&lt;br /&gt;
	return $ret;&lt;br /&gt;
}&lt;br /&gt;
function KVPEncode($arr) {&lt;br /&gt;
	$tmp = array();&lt;br /&gt;
	foreach ($arr as $key =&amp;gt; $value) { $tmp[] = $key; $tmp[] = $value; }&lt;br /&gt;
	$tmp[] = '';&lt;br /&gt;
	return implode(&amp;quot;\0&amp;quot;, $tmp);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>