1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
5 <META NAME="GENERATOR" CONTENT="Mozilla/4.07 [en] (X11; I; Linux 2.2.14 i586) [Netscape]">
6 <TITLE>Undernet P10 Protocol and Interface Specification</TITLE>
11 <A NAME="top"></A><FONT SIZE=+3>Undernet P10 Protocol and Interface Specification</FONT></H2>
12 <I>(As of ircu 2.10.11)</I>
14 Undernet Coder-com, <TT>coder-com@undernet.org</TT></H2>
15 $Id: p10.html,v 1.5 2000-07-09 04:52:58 isomer Exp $
17 <HR ALIGN=CENTER WIDTH=100% SIZE=2><I>This document aims to be a practical
18 guide for implementing and maintaining the protocol, not just a reference
20 <P>This document is "work in progress" and being continually updated :)
22 ALIGN=CENTER WIDTH=100% SIZE=2>
23 <BR><FONT SIZE=+2>1. <B><A HREF="#chap1">Introduction</A></B></FONT>
24 <P><FONT SIZE=+2>2. <B><A HREF="#chap2">General concepts and background</A></B></FONT>
25 <BLOCKQUOTE><FONT SIZE=+0>2.1 <A HREF="#chap2.1">Concepts</A>.</FONT>
26 <BR><FONT SIZE=+0>2.2 <A HREF="#chap2.2">Token Table</A>.</FONT></BLOCKQUOTE>
29 3. <A HREF="#chap3">Registration and syncronisation</A></H2>
33 <FONT SIZE=+0>3.1 <A HREF="#chap3.1">Server registration and authentication</A>.</FONT></LI>
36 <FONT SIZE=+0>3.2 <A HREF="#chap3.2">Network database resyncronisation</A>.</FONT></LI>
39 <FONT SIZE=+0>3.3 <A HREF="#chap3.3">Summary</A>.</FONT></LI>
43 4. <A HREF="#chap4">Continous operation</A></H2>
47 4.1 <A HREF="#chap4.1">Channel state operations.</A></LI>
50 4.2 <A HREF="#chap4.2">Client state operations.</A></LI>
53 4.3 <A HREF="#chap4.3">Channel/Client Messaging.</A></LI>
56 4.4 Setting G-Lines.</LI>
63 4. Programmers reference: Function headers</H2>
67 <FONT SIZE=+0>4.1 ms_nick</FONT></LI>
70 <FONT SIZE=+0>4.2 m_burst</FONT></LI>
73 <FONT SIZE=+0>4.3 ..etc</FONT></LI>
77 5. <A HREF="#chap5">Programmers reference: Client/Server Structures</A></H2>
80 6. <A HREF="#chap7">FAQ</A></H2>
83 7. Acknowledgements and disclaimer</H2>
86 8. <A HREF="#chap8">Update History</A></H2>
90 <A HREF="#chap8.1">TODO List</A></LI>
94 <HR ALIGN=CENTER WIDTH=100% SIZE=2></CENTER>
96 <P><A NAME="chap1"></A><B><FONT SIZE=+2>1. Introduction</FONT></B>
97 <P><FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
99 <HR ALIGN=LEFT WIDTH=100% SIZE=2>
100 <P><A NAME="chap2"></A><B><FONT SIZE=+2>2. General concepts and background</FONT></B>
101 <P><A NAME="chap2.1"></A><B><FONT SIZE=+1>2.1 Concepts</FONT></B>
102 <P>The undernet P10 protocol uses a scheme of "Numerics" to uniquenly identify
103 a client or server within the network. Each server has its own unique numeric
104 (0 -> 4095) and each client has its own numeric within that server (0->262,143).
105 <P>The numerics are encoded into a Base64 stream to maintain human readable
106 data flow and reduce the size of the messages. The Base64 character set
107 used in ircu is included below, this defines all valid characters allowed
108 in a Base64 numeric with "A" representing 0 and "]" representing 63.
110 <PRE><TT><FONT COLOR="#00007F">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789[]</FONT></TT></PRE>
112 Server numerics consist of 2 characters, with the minimum, 0, being represented
113 by "AA", and the maximum, 4095, being represented by "]]". Client numerics
114 are 3 characters long, with the minimum, 0, being represented by "AAA",
115 and the maximum, 262,143, being represented by "]]]". The unique identifier
116 of a client on the network consists of a combination of both the server
117 and client numeric in the format SSCCC.
118 <P>As an example, consider a server "irc.undernet.org" which has a numeric
119 of 2, translating to "AC" in Base64. On this server exists a client, whom
120 has been allocated the numeric 63 (which translates to "AA]" in Base64).
121 Therefore, the unique identifier of this client on the network is "ACAA]".
122 From this, we can determine which server the message came from, aswell
123 as the client who sent it.
124 <P>These numerics are used to prefix every message issued on the stream
125 except for the initial "PASS" or "SERVER" message, which are not prefixed.
126 Therefore, every message that can be recieved from a server will consist
129 <PRE><FONT COLOR="#00007F">[NUMERIC PREFIX] [TOKEN] [DATA]</FONT></PRE>
133 <PRE><FONT COLOR="#00007F">A[A5j P ABAAA :Foo.</FONT></PRE>
135 <A NAME="chap2.2"></A><B><FONT SIZE=+1>2.2 Token Table</FONT></B>
136 <P>The following table lists all the acceptable messages, along with their
137 relevant "Token", which is used in the server<>server protocol. The
138 aim of tokenisation is to reduce the bandwidth used during network communication
139 by reducing the length of common message identifiers.
141 <CENTER><TABLE BORDER COLS=2 WIDTH="40%" >
143 <TD><B>Message</B></TD>
145 <TD><B>Token</B></TD>
149 <TD><FONT SIZE=-1>PRIVMSG</FONT></TD>
151 <TD><FONT SIZE=-1>P</FONT></TD>
155 <TD><FONT SIZE=-1>WHO</FONT></TD>
157 <TD><FONT SIZE=-1>H</FONT></TD>
161 <TD><FONT SIZE=-1>WHOIS</FONT></TD>
163 <TD><FONT SIZE=-1>W</FONT></TD>
167 <TD><FONT SIZE=-1>WHOWAS</FONT></TD>
169 <TD><FONT SIZE=-1>X</FONT></TD>
173 <TD><FONT SIZE=-1>USER</FONT></TD>
175 <TD><FONT SIZE=-1>USER</FONT></TD>
179 <TD><FONT SIZE=-1>NICK</FONT></TD>
181 <TD><FONT SIZE=-1>N</FONT></TD>
185 <TD><FONT SIZE=-1>SERVER</FONT></TD>
187 <TD><FONT SIZE=-1>S</FONT></TD>
191 <TD><FONT SIZE=-1>LIST</FONT></TD>
193 <TD><FONT SIZE=-1>LIST</FONT></TD>
197 <TD><FONT SIZE=-1>TOPIC</FONT></TD>
199 <TD><FONT SIZE=-1>T</FONT></TD>
203 <TD><FONT SIZE=-1>INVITE</FONT></TD>
205 <TD><FONT SIZE=-1>I</FONT></TD>
209 <TD><FONT SIZE=-1>VERSION</FONT></TD>
211 <TD><FONT SIZE=-1>V</FONT></TD>
215 <TD><FONT SIZE=-1>QUIT</FONT></TD>
217 <TD><FONT SIZE=-1>Q</FONT></TD>
221 <TD><FONT SIZE=-1>SQUIT</FONT></TD>
223 <TD><FONT SIZE=-1>SQ</FONT></TD>
227 <TD><FONT SIZE=-1>KILL</FONT></TD>
229 <TD><FONT SIZE=-1>D</FONT></TD>
233 <TD><FONT SIZE=-1>INFO</FONT></TD>
235 <TD><FONT SIZE=-1>F</FONT></TD>
239 <TD><FONT SIZE=-1>LINKS</FONT></TD>
241 <TD><FONT SIZE=-1>LI</FONT></TD>
245 <TD><FONT SIZE=-1>STATS</FONT></TD>
247 <TD><FONT SIZE=-1>R</FONT></TD>
251 <TD><FONT SIZE=-1>HELP</FONT></TD>
253 <TD><FONT SIZE=-1>HELP</FONT></TD>
257 <TD><FONT SIZE=-1>ERROR</FONT></TD>
259 <TD><FONT SIZE=-1>Y</FONT></TD>
263 <TD><FONT SIZE=-1>AWAY</FONT></TD>
265 <TD><FONT SIZE=-1>A</FONT></TD>
269 <TD><FONT SIZE=-1>CONNECT</FONT></TD>
271 <TD><FONT SIZE=-1>CO</FONT></TD>
275 <TD><FONT SIZE=-1>MAP</FONT></TD>
277 <TD><FONT SIZE=-1>MAP</FONT></TD>
281 <TD><FONT SIZE=-1>PING</FONT></TD>
283 <TD><FONT SIZE=-1>G</FONT></TD>
287 <TD><FONT SIZE=-1>PONG</FONT></TD>
289 <TD><FONT SIZE=-1>Z</FONT></TD>
293 <TD><FONT SIZE=-1>OPER</FONT></TD>
295 <TD><FONT SIZE=-1>OPER</FONT></TD>
299 <TD><FONT SIZE=-1>PASS</FONT></TD>
301 <TD><FONT SIZE=-1>PA</FONT></TD>
305 <TD><FONT SIZE=-1>WALLOPS</FONT></TD>
307 <TD><FONT SIZE=-1>WA</FONT></TD>
311 <TD><FONT SIZE=-1>DESYNCH</FONT></TD>
313 <TD><FONT SIZE=-1>DS</FONT></TD>
317 <TD><FONT SIZE=-1>TIME</FONT></TD>
319 <TD><FONT SIZE=-1>TI</FONT></TD>
323 <TD><FONT SIZE=-1>SETTIME</FONT></TD>
325 <TD><FONT SIZE=-1>SE</FONT></TD>
329 <TD><FONT SIZE=-1>RPING</FONT></TD>
331 <TD><FONT SIZE=-1>RI</FONT></TD>
335 <TD><FONT SIZE=-1>RPONG</FONT></TD>
337 <TD><FONT SIZE=-1>RO</FONT></TD>
341 <TD><FONT SIZE=-1>NAMES</FONT></TD>
343 <TD><FONT SIZE=-1>E</FONT></TD>
347 <TD><FONT SIZE=-1>ADMIN</FONT></TD>
349 <TD><FONT SIZE=-1>AD</FONT></TD>
353 <TD><FONT SIZE=-1>TRACE</FONT></TD>
355 <TD><FONT SIZE=-1>TR</FONT></TD>
359 <TD><FONT SIZE=-1>NOTICE</FONT></TD>
361 <TD><FONT SIZE=-1>O</FONT></TD>
365 <TD><FONT SIZE=-1>WALLCHOPS</FONT></TD>
367 <TD><FONT SIZE=-1>WC</FONT></TD>
371 <TD><FONT SIZE=-1>CPRIVMSG</FONT></TD>
373 <TD><FONT SIZE=-1>CP</FONT></TD>
377 <TD><FONT SIZE=-1>CNOTICE</FONT></TD>
379 <TD><FONT SIZE=-1>CN</FONT></TD>
383 <TD><FONT SIZE=-1>JOIN</FONT></TD>
385 <TD><FONT SIZE=-1>J</FONT></TD>
389 <TD><FONT SIZE=-1>PART</FONT></TD>
391 <TD><FONT SIZE=-1>L</FONT></TD>
395 <TD><FONT SIZE=-1>LUSERS</FONT></TD>
397 <TD><FONT SIZE=-1>LU</FONT></TD>
401 <TD><FONT SIZE=-1>MOTD</FONT></TD>
403 <TD><FONT SIZE=-1>MO</FONT></TD>
407 <TD><FONT SIZE=-1>MODE</FONT></TD>
409 <TD><FONT SIZE=-1>M</FONT></TD>
413 <TD><FONT SIZE=-1>KICK</FONT></TD>
415 <TD><FONT SIZE=-1>K</FONT></TD>
419 <TD><FONT SIZE=-1>USERHOST</FONT></TD>
421 <TD><FONT SIZE=-1>USERHOST</FONT></TD>
425 <TD><FONT SIZE=-1>USERIP</FONT></TD>
427 <TD><FONT SIZE=-1>USERIP</FONT></TD>
431 <TD><FONT SIZE=-1>ISON</FONT></TD>
433 <TD><FONT SIZE=-1>ISON</FONT></TD>
437 <TD><I><FONT SIZE=-1>SQUERY</FONT></I></TD>
439 <TD><I><FONT SIZE=-1>SQUERY</FONT></I></TD>
443 <TD><I><FONT SIZE=-1>SERVLIST</FONT></I></TD>
445 <TD><I><FONT SIZE=-1>SERVLIST</FONT></I></TD>
449 <TD><I><FONT SIZE=-1>SERVSET</FONT></I></TD>
451 <TD><I><FONT SIZE=-1>SERVSET</FONT></I></TD>
455 <TD><FONT SIZE=-1>REHASH</FONT></TD>
457 <TD><FONT SIZE=-1>REHASH</FONT></TD>
461 <TD><FONT SIZE=-1>RESTART</FONT></TD>
463 <TD><FONT SIZE=-1>RESTART</FONT></TD>
467 <TD><FONT SIZE=-1>CLOSE</FONT></TD>
469 <TD><FONT SIZE=-1>CLOSE</FONT></TD>
473 <TD><FONT SIZE=-1>DIE</FONT></TD>
475 <TD><FONT SIZE=-1>DIE</FONT></TD>
479 <TD><FONT SIZE=-1>HASH</FONT></TD>
481 <TD><FONT SIZE=-1>HASH</FONT></TD>
485 <TD><FONT SIZE=-1>DNS</FONT></TD>
487 <TD><FONT SIZE=-1>DNS</FONT></TD>
491 <TD><FONT SIZE=-1>SILENCE</FONT></TD>
493 <TD><FONT SIZE=-1>U</FONT></TD>
497 <TD><FONT SIZE=-1>GLINE</FONT></TD>
499 <TD><FONT SIZE=-1>GL</FONT></TD>
503 <TD><FONT SIZE=-1>BURST</FONT></TD>
505 <TD><FONT SIZE=-1>B</FONT></TD>
509 <TD><FONT SIZE=-1>CREATE</FONT></TD>
511 <TD><FONT SIZE=-1>C</FONT></TD>
515 <TD><FONT SIZE=-1>DESTRUCT</FONT></TD>
517 <TD><FONT SIZE=-1>DE</FONT></TD>
521 <TD><FONT SIZE=-1>END_OF_BURST</FONT></TD>
523 <TD><FONT SIZE=-1>EB</FONT></TD>
527 <TD><FONT SIZE=-1>END_OF_BURST_ACK</FONT></TD>
529 <TD><FONT SIZE=-1>EA</FONT></TD>
533 <TD><FONT SIZE=-1>PROTO</FONT></TD>
535 <TD><FONT SIZE=-1>PROTO</FONT></TD>
539 <TD><FONT SIZE=-1>JUPE</FONT></TD>
541 <TD><FONT SIZE=-1>JU</FONT></TD>
545 <TD><FONT SIZE=-1>OPMODE</FONT></TD>
547 <TD><FONT SIZE=-1>OM</FONT></TD>
551 <TD><FONT SIZE=-1>CLEARMODE</FONT></TD>
553 <TD><FONT SIZE=-1>CM</FONT></TD>
556 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
558 <HR ALIGN=LEFT WIDTH=100% SIZE=2>
559 <P><A NAME="chap3"></A><B><FONT SIZE=+2>3. Registration and syncronisation</FONT></B>
560 <P><A NAME="chap3.1"></A><B><FONT SIZE=+1>3.1 Server registration and authentication</FONT></B>
561 <P>After a TCP connection has been established, the server initally introduces
562 itself via a "PASS" message as follows:
564 <PRE><FONT COLOR="#00007F">PASS :[PASSWORD]</FONT></PRE>
566 "PASSWORD" is simply compared with the password present in the destination
567 servers config file, and is used to confirm credentials after the "SERVER"
568 message has been recieved, as follows:
570 <PRE><TT><FONT COLOR="#00007F">SERVER [SERVERNAME] [HOPCOUNT] [START TIME] [LINK TIME] [PROTOCOL] [NUMERIC/MAXCONN] :[DESCRIPTION]</FONT></TT></PRE>
574 <PRE><B>1 2 3 4 5 6 7 8
575 </B>SERVER irc.undernet.org 1 933022556 947908144 J10 AA]]] :[127.0.0.1] A Undernet Server.</PRE>
580 The SERVER message, indicating this connection wishes to introduce a new
581 server to the network.</LI>
584 The name of the server you are introducing, a valid server name consists
588 The hop count of the server you are introducing, this is always 1
589 when you are introducing yourself.</LI>
592 The epoch timestamp specifying when the ircd was started.</LI>
595 The epoch timestamp specifying the time the server initiated the
596 link to the network.</LI>
599 The Protocol identifier of this server.</LI>
603 This token informs the network which protocol it is compliant with, eg:
604 If it is a P10 compliant server, then the token will be "P10".</LI>
607 If the server being introduced has not yet successfully synced its
608 database with the network (Completed its net.burst - see 3.2), then the
609 Protocol token should be prefixed with a J, instead of a P (Eg: J10) to
610 indicate it is currently still <B>j</B>oining the network.</LI>
613 The protocol token should always be JXX when the server is introducing
618 The numeric, and maximum connections identifier for this server.</LI>
622 This token is formatted exactly the same as a client numeric is formatted.
623 The first 2 characters identify the server's numeric, whilst in this situation,
624 the final 3 characters define the maximum number of clients that this server
625 can hold (and more importantly, the maximum number of numerics it will
626 generate). This is always one less than a power of two, because the server
627 uses this as a bitmask. A server can give out a higher numeric than this,
628 however it will be "anded" with this number to find it's entry slot. The
629 reason for this is so a server which is near the maximum number of clients
630 can give out more numerics than it's using to prevent a new client getting a
631 numeric that was used only seconds ago and maybe get messages destined to
635 The example "AA]]]" shows that this is a server with numeric 0, which
636 will generate client numerics up to 262,143.</LI>
640 This final parameter simply consists of a textual description of the server
641 prefixed by a colon. This is displayed in a clients WHOIS line, aswell
642 as in the LINKS reply. By convention, if this is a leaf server it contains
643 the servers IP in square brackets at the beginning of the string,</LI>
645 <A NAME="chap3.2"></A><B><FONT SIZE=+1>3.2 Network Database resyncronisation</FONT></B>
646 <P>After the connection has been established and verified, the next step
647 is to syncronise the database of client/server/channel information between
649 <BLOCKQUOTE><B>3.2.1 - SERVER Messages</B></BLOCKQUOTE>
651 <BLOCKQUOTE>Server details are transmitted via "SERVER" messages similar
652 to the initial introduction message, with the following format:</BLOCKQUOTE>
655 <BLOCKQUOTE><TT><FONT COLOR="#00007F">[OWNING SERVER PREFIX] S [SERVERNAME]
656 [HOPCOUNT] [START TIME] [LINK TIME] [PROTOCOL] [NUMERIC/MAXCONN] 0 :[DESCRIPTION]</FONT></TT></BLOCKQUOTE>
657 <FONT COLOR="#000000">The syntax of this message is almost identical to
658 the originally recieved server message, with the only exception being that
659 the message is numeric prefixed, to indicate which server sent this message
660 (and also therefore, which hub this new server is linked too). There is
661 also a fixed "0" present before the Description field, this is a placeholder
662 for future use and currently unused. [Isomer: Question, what IS this
663 reserved for?] </FONT>
664 <P><B>3.2.2 - NICK Messages</B></BLOCKQUOTE>
666 <BLOCKQUOTE>Client information is transmitted via "NICK" messages, of the
667 following format:</BLOCKQUOTE>
671 <PRE><TT><FONT COLOR="#00007F">[NUMERIC PREFIX] N [NICK] [HOPCOUNT] [TIMESTAMP] [USERNAME] [HOST] <+modes> [BASE64 IP] [NUMERIC] :[USERINFO]</FONT></TT></PRE>
673 <FONT COLOR="#00007F">For Example:</FONT>
674 <BLOCKQUOTE><TT><FONT COLOR="#000000">1 2 3
675 4 5 6
676 7 8
677 9 10 11</FONT></TT>
678 <BR><TT><FONT COLOR="#000000">AF N Client1 1 947957573 User userhost.net
679 +oiwg DAqAoB AFAAA :Generic Client.</FONT></TT></BLOCKQUOTE>
683 The numeric of the server sending this message. (And hence, owning this
687 The "NICK" token.</LI>
690 The nickname of this client, currently max 9 chars.</LI>
693 The "Hopcount" of this client, Ie: how many servers away it is on.</LI>
696 The epoch timestamp indicating when the user was created.</LI>
699 The "User" part of the user@host mask.</LI>
702 the "Host" part of the user@host mask.</LI>
705 [<B>Optional</B>]: User modes. If present, this is always +<user modes
706 for this client>.</LI>
709 The real IP address of this client, a Base64 encoded 32bit int.</LI>
712 This client's numeric, in SSCCC format.</LI>
715 Free format user info line.</LI>
720 <BLOCKQUOTE><B>3.2.3 - BURST Messages</B></BLOCKQUOTE>
722 <BLOCKQUOTE>Channel details and membership information is synchronised
723 in one (or more) BURST messages for each channel that exists, formatted
724 as follows:</BLOCKQUOTE>
728 <PRE><TT><FONT COLOR="#00007F">[NUMERIC PREFIX] B [CHANNEL] [CREATION TIMESTAMP] <+MODES> <ARG1> <ARG2> [MEMBER LIST] <:%BANS></FONT></TT></PRE>
732 <BLOCKQUOTE>For Example:</BLOCKQUOTE>
736 <PRE>1 2 3 4 5 6 7 8 9
737 AZ B #coder-com 949217470 +tinkl key 56 AAAAA,AAAAB,AAAAC,ABAAA,ABAAB,ABAAC,ACAAA :%*!*@*.net</PRE>
741 <BLOCKQUOTE><I>Notes:</I></BLOCKQUOTE>
745 The numeric of the server sending this message.</LI>
748 The "BURST" token.</LI>
751 The name of the channel to which this data belongs. Currently #Channel
752 and +Channel names can be sent in a BURST message, &Channels are not
753 because by definition they are local to the server.</LI>
756 The epoch timestamp indicating when the channel was created.</LI>
759 [<B>Optional</B>]: Channel Modes.</LI>
763 The channel may have a number of modes set, aswell as relevant mode arguments
764 in the following 2 parameters.</LI>
768 [<B>Optional</B>]: Channel Key, this parameter is present if the channel
769 modes contain a "k" mode.</LI>
772 [<B>Optional</B>]: Channel Limit, this parameter is present if the channel
773 modes contain a "l" mode.</LI>
776 A <I>comma</I> seperated list of client numerics, with the following
777 specific formatting rules to indicate +o, +v and +ov channel members.</LI>
781 Numerics can have the following symbols appended on them; "<B>:ov</B>",
782 "<B>:v</B>" or "<B>:o</B>". These indicate that this numeric is either
783 Opped (<B>:o</B>), Voiced (<B>:v</B>) or both (<B>:ov</B>). This state
784 applies to the numeric it is attached too, and all subsequent numerics
785 until another state is encountered. <I>For Example:</I></LI>
788 AAABA:ov, AAABB:o,AAABC,AAABD,AAABE:v,AAABZ</LI>
790 <BR>Here, AAABA is both opped, and voiced, AAABB, AAABC and AAABD are opped
791 leaving AAABE and AAABZ voiced.
793 The first numeric of the member list will always contain a state
798 A <I>space</I> seperated list of bans present in the channel. The start
799 of the ban stream is indicated by a ":%", everything following the ":%"
800 is the ban list.</LI>
802 <BR><I>For Example:</I>
803 <BR>:%*!*@*.foobar.net another!ban@*.com *!*fred@a.host.co.uk
804 <BR>Would add the following bans to the channel:
806 <BR>another!ban@*.com
807 <BR>*!*fred@a.host.co.uk</OL>
809 <BLOCKQUOTE>If the length of a BURST message exceeds the maximum lenght
810 of a line (512 characters) then the remaining channel members/bans are
811 sent in subsequent BURST lines. The subsequent burst lines are <B>only</B>
812 used to add additional members to the channel, and if neccessary, channel
813 bans. There will be no "Mode" parameters present. A sample additional burst
814 line would be:</BLOCKQUOTE>
818 <PRE>AZ BURST #coder-com 949217470 ACAAB:o,ACAAD :%*!*another@*.ban.com</PRE>
822 <BLOCKQUOTE>Which adds two more opped members and a ban to the channel.</BLOCKQUOTE>
824 <BLOCKQUOTE><B>3.2.4 - JUPE Messages</B></BLOCKQUOTE>
826 <BLOCKQUOTE>Any currently unexpired JUPEs are transmitted via "JUPE" messages
827 with the following format:</BLOCKQUOTE>
830 <BLOCKQUOTE><TT><FONT COLOR="#00007F">[NUMERIC PREFIX] JU * (+|-)[SERVER
831 NAME] [LIFETIME] [LAST MOD] :[REASON]</FONT></TT></BLOCKQUOTE>
832 For example:</BLOCKQUOTE>
835 <BLOCKQUOTE><TT>1 2 3 4
836 5 6
838 <BR><TT><FONT COLOR="#000000">AZ JU * +juped.undernet.org 000003593 955419707
839 :Juped Server</FONT></TT></BLOCKQUOTE>
840 <I>Notes:</I></BLOCKQUOTE>
844 The numeric of the server sending this message.</LI>
847 The "JUPE" token.</LI>
850 The target that should apply this JUPE (always "*" during bursts).</LI>
853 The name of the server to JUPE, prefixed with a "+" if the JUPE is active,
854 or with a "-" if it is not.</LI>
857 The remaining absolute lifetime of the JUPE, expressed in seconds.</LI>
860 The last time the JUPE was modified.</LI>
863 The reason the JUPE was applied.</LI>
865 <A NAME="chap3.3"></A><B><FONT SIZE=+1>3.3 Summary</FONT></B>
866 <P>The following table summarises the sequence of events that occur when
867 a server connects to another server. S1 is our server, and S2 is a HUB
868 on the target network.
869 <P>S1: Sends Password.
870 <BR>S1: Sends initial SERVER message.
871 <P><I>S2 Confirms S1 has the correct credentials, and if so, proceeds.
872 If not, S1 is squit with a relevant reason.</I>
873 <P>S2: Sends Password.
874 <BR>S2: Sends initial SERVER message.
875 <P><I>S1 Confirms S2 has the correct credentials, and if so, proceeds.
876 If not, S2 is squit with a relevant reason.</I>
877 <P><B><I>The follow occur asynchronously, however they have been shown
878 seperately below for simplicity.</I></B>
879 <P>S1: Sends all the servers it is aware of as a stream of SERVER messages.
880 <BR>S1: Sends all the clients it is aware of as a stream of NICK messages.
881 <BR>S1: Sends the database of channel states on the network, as a stream
883 <BR>S1: Sends all the jupes it is aware of as a stream of JUPE messages.
884 <BR>S1: Sends a END_OF_BURST token (EB) to indicate it has finished sending.
885 <P>S2: Sends all the servers it is aware of as a stream of SERVER messages.
886 <BR>S2: Sends all the clients it is aware of as a stream of NICK messages.
887 <BR>S2: Sends the database of channel states on the network, as a stream
889 <BR>S2: Sends all the jupes it is aware of as a stream of JUPE messages.
890 <BR>S2: Sends a END_OF_BURST token (EB) to indicate it has finished sending.
891 <P>S2: Sends an EOB_ACK token (EA) to indicate it has succesfully recieved
892 the END_OF_BURST from S1
893 <BR>S1: Sends an EOB_ACK token (EA) to indicate it has succesfully recieved
894 the END_OF_BURST from S2
895 <P><I>Example Session:</I>
896 <PRE><FONT COLOR="#00007F">[WRITE]: PASS :54321
897 [WRITE]: SERVER irc.undernet.org 1 947957852 947957852 J10 AB]]] :Undernet Client Server.
898 [WRITE]: AB N MrFoo 1 947957852 ~me myhost.foobar.net +diksw DAqAoB ABAAA :Mr Foo (foo@bar.com).
899 [WRITE]: AB B #mychannel 946101324 ABAAA:o
902 [ READ]: SERVER server1.undernet.org 1 947901540 947958150 J10 AFAD] :A Generic Server.
903 [ READ]: AF S server2.undernet.org 2 0 947957585 P10 AZAD] 0 :[192.168.10.3] A Generic Server.
904 [ READ]: AZ S server3.undernet.org 3 0 947957607 P10 AIAD] 0 :[192.168.10.5] A Generic Server.
905 [ READ]: AF N Client1 1 947957573 Ident userhost.net +oiwg DAqAoB AFAAA :Generic Client.
906 [ READ]: AZ N Client2 2 947957719 Ident userhost.net +iwg DAqAoB AZAAA :Generic Client.
907 [ READ]: AI N Client3 3 947957742 Ident userhost.net +iwg DAqAoB AIAAA :Generic Client.
908 [ READ]: AI N Client4 3 947958121 Ident userhost.net +iwg DAqAoB AIAAB :Generic Client.
909 [ READ]: AF B #foobar 947957734 +tink akey AIAAB,AIAAA:v,AZAAA:o :%*!*another@*.ban.com *!*foo@bar.net
910 [ READ]: AF B #coder-com 947957727 AIAAB,AZAAA:o
911 [ READ]: AF B #another 946101321 AFAAA
912 [ READ]: AF JU * +juped.undernet.org 3600 947958100 :Broken, please fix
915 [ READ]: AF EA</FONT></PRE>
916 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
919 <BR><A NAME="chap4"></A><B><FONT SIZE=+2>4. Continuous Operation</FONT></B>
920 <P>This chapter provides details of the messages that can be sent after
921 successfully linking to a network, and synchronising the channel/user database.
922 <P><A NAME="chap4.1"></A><B><FONT SIZE=+1>4.1 Channel state operations</FONT></B>
923 <P>There are a number of messages that can modify the state of a channel,
925 <OL><B>4.1.1 - MODE</B>
926 <P>The MODE message can modify channel modes and bans, and also give or
927 take operator/voice status from channel members.
929 <BR><TT><FONT COLOR="#00007F">[NUMERIC PREFIX] M [CHANNEL] (+|-)[MODESTRING]
930 <MODESTRING PARAMETERS></FONT></TT></OL>
934 <BR><TT>1 2 3
935 4 5</TT>
936 <BR><TT>AZAAA M #coder-com +stinlko 500 TestKey BAC</TT></OL>
942 The numeric of the user issuing this MODE command. It can be assumed this
943 user is opped on the target channel.</LI>
946 The "MODE" token.</LI>
949 The target channel.</LI>
952 The "Mode string".</LI>
956 This consists of up to 6 '+' or '-' (add or remove) prefixed channel modes.
957 (If no '+' or '-' are specified, a '+' is assumed unless a '-' has been
958 encountered previously in the mode string). For example, '+s+t+n-l-io'
959 is a valid mode string, as is '+stnmov'.</LI>
963 Valid Mode modes are:</LI>
969 <TABLE BORDER COLS=3 WIDTH="85%" NOSAVE >
971 <TD NOSAVE><B>Token</B></TD>
973 <TD><B>Function</B></TD>
975 <TD><B>Parameters</B></TD>
981 <TD>Sets/Unsets 'Private' Flag.</TD>
989 <TD>Sets/Unsets 'Secret' Flag.</TD>
997 <TD>Sets/Unsets 'Moderated' Flag.</TD>
1005 <TD>Sets/Unsets 'External Messages' Flag.</TD>
1013 <TD>Sets/Unsets 'Topic Limit' Flag.</TD>
1021 <TD>Sets/Unsets 'Invite only' Flag.</TD>
1029 <TD>Sets/Unsets 'Channel Limit' Flag.</TD>
1031 <TD>The channel limit.</TD>
1037 <TD>Sets/Unsets 'Channel Key' Flag.</TD>
1039 <TD>The channel keyword (Password).</TD>
1045 <TD>Ops and Deops users.</TD>
1047 <TD>Numeric of user to be opped.</TD>
1055 <TD>Numeric of user to be voiced.</TD>
1063 <TD>Ban string.</TD>
1071 The "Mode string Parameters".</LI>
1075 This is a matching list of parameters to the modes supplied in the "Modestring".</LI>
1077 <BR><I>For Example:</I>
1078 <BR>If the Modestring is "+stnlo", a typical parameter string would be
1079 "500 AZAA". The first 3 modes, 's', 't' and 'n' do not require parameters,
1080 so non are present. The following two, 'l' and 'o' both require parameters,
1081 so they are 500 and AZAAA respectively (This sets the channel limit to
1082 500 users, and ops the numeric AZAAA).</OL>
1085 <P><BR>N.B: The "MODE" message is also used to modify a client's user modes,
1086 not just channel modes. See <A HREF="#chap4.2">section 4.2</A> for details.</OL>
1088 <OL><B>4.1.2 - OPMODE</B>
1089 <P>The OPMODE message is identical in syntax to the MODE message, however
1090 it will only ever have an operator as the source. It is likely that the
1091 source of this mode will not have ops in the target channel, but it should
1092 succeed never the less.
1093 <P><B>4.1.3 - JOIN</B>
1094 <P><B>4.1.4 - PART</B>
1095 <P><B>4.1.5 - KICK</B>
1096 <P><B>4.1.6 - TOPIC</B>
1097 <P><B>4.1.4 - CLEARMODE</B>
1099 <OL><TT>AZAAA CM #coder-com ovpsmikbl</TT></OL>
1101 <A NAME="chap4.2"></A><B><FONT SIZE=+1>4.2 Client state operations</FONT></B>
1102 <BLOCKQUOTE><B>4.2.1 - NICK</B>
1103 <BLOCKQUOTE><TT>AZAAA N Nick2 955423230</TT></BLOCKQUOTE>
1105 <BLOCKQUOTE><TT>AZAAA M Nick2 :+odi</TT></BLOCKQUOTE>
1107 <A NAME="chap4.3"></A><B><FONT SIZE=+1>4.3 Channel/Client Messaging.</FONT></B>
1108 <BLOCKQUOTE><B>4.3.1 - PRIVMSG</B>
1109 <P><B>4.3.2 - NOTICE</B>
1110 <P><B>4.3.3 - CNOTICE</B>
1111 <P><B>4.3.4 - CPRIVMSG</B>
1112 <BR> </BLOCKQUOTE>
1113 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
1115 <HR ALIGN=LEFT WIDTH=100% SIZE=2>
1116 <P><A NAME="chap5"></A><B><FONT SIZE=+2>5. Programmers reference: Client/Server
1117 Structures</FONT></B>
1118 <P>This section provides information on the standard Client/Server structures,
1119 for easy reference during development.
1120 <P><I>[..Link to autogenerated struct.html..]</I>
1121 <P><FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
1123 <HR ALIGN=LEFT WIDTH=100% SIZE=2>
1124 <BR><A NAME="chap7"></A><B><FONT SIZE=+2>7. FAQ</FONT></B>
1125 <P>Frequently asked questions.
1133 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
1136 <P><A NAME="chap8"></A><B><FONT SIZE=+2>8. Update History</FONT></B>
1137 <P>[2000-01-20]: Initial draft, structure, background info.
1138 <BR>[2000-02-13]: Added initial BURST documentation.
1139 <BR>[2000-02-14]: Continued BURST documentation / Begin NICK and SERVER
1141 <BR>[2000-02-26]: Continued chapter 5, few example fixes, added token table
1143 <BR>[2000-03-02]: Added NICK spec. -Gte.
1144 <BR>[2000-03-18]: Added JUPE spec. -Kev
1145 <BR>[2000-04-10]: Added information about OPMODE and CLEARMODE tokens.
1147 <BR>[2000-04-11]: Started work on chapter 4. -Gte
1148 <BR>[2000-06-01]: Changed some info about the max number of clients -Isomer
1149 <P><A NAME="chap8.1"></A><B><FONT SIZE=+1>8.1 TODO</FONT></B>
1152 Finish Chapter 5.</LI>
1155 Go through examples, and ensure they are all correct.</LI>
1158 Add common function headers, with argv listings.</LI>
1161 Add description of further server to server messages, with special cases
1165 Add FAQ Section.</LI>
1167 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>