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.4 2000-04-11 05:51:25 gte 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
629 The example "AA]]]" shows that this is a server with numeric 0, which
630 will generate client numerics up to 262,143.</LI>
634 This final parameter simply consists of a textual description of the server
635 prefixed by a colon. This is displayed in a clients WHOIS line, aswell
636 as in the LINKS reply.</LI>
638 <A NAME="chap3.2"></A><B><FONT SIZE=+1>3.2 Network Database resyncronisation</FONT></B>
639 <P>After the connection has been established and verified, the next step
640 is to syncronise the database of client/server/channel information between
642 <BLOCKQUOTE><B>3.2.1 - SERVER Messages</B></BLOCKQUOTE>
644 <BLOCKQUOTE>Server details are transmitted via "SERVER" messages similar
645 to the initial introduction message, with the following format:</BLOCKQUOTE>
648 <BLOCKQUOTE><TT><FONT COLOR="#00007F">[OWNING SERVER PREFIX] S [SERVERNAME]
649 [HOPCOUNT] [START TIME] [LINK TIME] [PROTOCOL] [NUMERIC/MAXCONN] 0 :[DESCRIPTION]</FONT></TT></BLOCKQUOTE>
650 <FONT COLOR="#000000">The syntax of this message is almost identical to
651 the originally recieved server message, with the only exception being that
652 the message is numeric prefixed, to indicate which server sent this message
653 (and also therefore, which hub this new server is linked too). There is
654 also a fixed "0" present before the Description field, this is a placeholder
655 for future use and currently unused.</FONT>
656 <P><B>3.2.2 - NICK Messages</B></BLOCKQUOTE>
658 <BLOCKQUOTE>Client information is transmitted via "NICK" messages, of the
659 following format:</BLOCKQUOTE>
663 <PRE><TT><FONT COLOR="#00007F">[NUMERIC PREFIX] N [NICK] [HOPCOUNT] [TIMESTAMP] [USERNAME] [HOST] <+modes> [BASE64 IP] [NUMERIC] :[USERINFO]</FONT></TT></PRE>
665 <FONT COLOR="#00007F">For Example:</FONT>
666 <BLOCKQUOTE><TT><FONT COLOR="#000000">1 2 3
667 4 5 6
668 7 8
669 9 10 11</FONT></TT>
670 <BR><TT><FONT COLOR="#000000">AF N Client1 1 947957573 User userhost.net
671 +oiwg DAqAoB AFAAA :Generic Client.</FONT></TT></BLOCKQUOTE>
675 The numeric of the server sending this message. (And hence, owning this
679 The "NICK" token.</LI>
682 The nickname of this client, currently max 9 chars.</LI>
685 The "Hopcount" of this client, Ie: how many servers away it is on.</LI>
688 The epoch timestamp indicating when the user was created.</LI>
691 The "User" part of the user@host mask.</LI>
694 the "Host" part of the user@host mask.</LI>
697 [<B>Optional</B>]: User modes. If present, this is always +<user modes
698 for this client>.</LI>
701 The real IP address of this client, a Base64 encoded 32bit int.</LI>
704 This client's numeric, in SSCCC format.</LI>
707 Free format user info line.</LI>
712 <BLOCKQUOTE><B>3.2.3 - BURST Messages</B></BLOCKQUOTE>
714 <BLOCKQUOTE>Channel details and membership information is synchronised
715 in one (or more) BURST messages for each channel that exists, formatted
716 as follows:</BLOCKQUOTE>
720 <PRE><TT><FONT COLOR="#00007F">[NUMERIC PREFIX] B [CHANNEL] [CREATION TIMESTAMP] <+MODES> <ARG1> <ARG2> [MEMBER LIST] <:%BANS></FONT></TT></PRE>
724 <BLOCKQUOTE>For Example:</BLOCKQUOTE>
728 <PRE>1 2 3 4 5 6 7 8 9
729 AZ B #coder-com 949217470 +tinkl key 56 AAAAA,AAAAB,AAAAC,ABAAA,ABAAB,ABAAC,ACAAA :%*!*@*.net</PRE>
733 <BLOCKQUOTE><I>Notes:</I></BLOCKQUOTE>
737 The numeric of the server sending this message.</LI>
740 The "BURST" token.</LI>
743 The name of the channel to which this data belongs. Currently #Channel
744 and +Channel names can be sent in a BURST message, &Channels are not
745 because by definition they are local to the server.</LI>
748 The epoch timestamp indicating when the channel was created.</LI>
751 [<B>Optional</B>]: Channel Modes.</LI>
755 The channel may have a number of modes set, aswell as relevant mode arguments
756 in the following 2 parameters.</LI>
760 [<B>Optional</B>]: Channel Key, this parameter is present if the channel
761 modes contain a "k" mode.</LI>
764 [<B>Optional</B>]: Channel Limit, this parameter is present if the channel
765 modes contain a "l" mode.</LI>
768 A <I>comma</I> seperated list of client numerics, with the following
769 specific formatting rules to indicate +o, +v and +ov channel members.</LI>
773 Numerics can have the following symbols appended on them; "<B>:ov</B>",
774 "<B>:v</B>" or "<B>:o</B>". These indicate that this numeric is either
775 Opped (<B>:o</B>), Voiced (<B>:v</B>) or both (<B>:ov</B>). This state
776 applies to the numeric it is attached too, and all subsequent numerics
777 until another state is encountered. <I>For Example:</I></LI>
780 AAABA:ov, AAABB:o,AAABC,AAABD,AAABE:v,AAABZ</LI>
782 <BR>Here, AAABA is both opped, and voiced, AAABB, AAABC and AAABD are opped
783 leaving AAABE and AAABZ voiced.
785 The first numeric of the member list will always contain a state
790 A <I>space</I> seperated list of bans present in the channel. The start
791 of the ban stream is indicated by a ":%", everything following the ":%"
792 is the ban list.</LI>
794 <BR><I>For Example:</I>
795 <BR>:%*!*@*.foobar.net another!ban@*.com *!*fred@a.host.co.uk
796 <BR>Would add the following bans to the channel:
798 <BR>another!ban@*.com
799 <BR>*!*fred@a.host.co.uk</OL>
801 <BLOCKQUOTE>If the length of a BURST message exceeds the maximum lenght
802 of a line (512 characters) then the remaining channel members/bans are
803 sent in subsequent BURST lines. The subsequent burst lines are <B>only</B>
804 used to add additional members to the channel, and if neccessary, channel
805 bans. There will be no "Mode" parameters present. A sample additional burst
806 line would be:</BLOCKQUOTE>
810 <PRE>AZ BURST #coder-com 949217470 ACAAB:o,ACAAD :%*!*another@*.ban.com</PRE>
814 <BLOCKQUOTE>Which adds two more opped members and a ban to the channel.</BLOCKQUOTE>
816 <BLOCKQUOTE><B>3.2.4 - JUPE Messages</B></BLOCKQUOTE>
818 <BLOCKQUOTE>Any currently unexpired JUPEs are transmitted via "JUPE" messages
819 with the following format:</BLOCKQUOTE>
822 <BLOCKQUOTE><TT><FONT COLOR="#00007F">[NUMERIC PREFIX] JU * (+|-)[SERVER
823 NAME] [LIFETIME] [LAST MOD] :[REASON]</FONT></TT></BLOCKQUOTE>
824 For example:</BLOCKQUOTE>
827 <BLOCKQUOTE><TT>1 2 3 4
828 5 6
830 <BR><TT><FONT COLOR="#000000">AZ JU * +juped.undernet.org 000003593 955419707
831 :Juped Server</FONT></TT></BLOCKQUOTE>
832 <I>Notes:</I></BLOCKQUOTE>
836 The numeric of the server sending this message.</LI>
839 The "JUPE" token.</LI>
842 The target that should apply this JUPE (always "*" during bursts).</LI>
845 The name of the server to JUPE, prefixed with a "+" if the JUPE is active,
846 or with a "-" if it is not.</LI>
849 The remaining absolute lifetime of the JUPE, expressed in seconds.</LI>
852 The last time the JUPE was modified.</LI>
855 The reason the JUPE was applied.</LI>
857 <A NAME="chap3.3"></A><B><FONT SIZE=+1>3.3 Summary</FONT></B>
858 <P>The following table summarises the sequence of events that occur when
859 a server connects to another server. S1 is our server, and S2 is a HUB
860 on the target network.
861 <P>S1: Sends Password.
862 <BR>S1: Sends initial SERVER message.
863 <P><I>S2 Confirms S1 has the correct credentials, and if so, proceeds.
864 If not, S1 is squit with a relevant reason.</I>
865 <P>S2: Sends Password.
866 <BR>S2: Sends initial SERVER message.
867 <P><I>S1 Confirms S2 has the correct credentials, and if so, proceeds.
868 If not, S2 is squit with a relevant reason.</I>
869 <P><B><I>The follow occur asynchronously, however they have been shown
870 seperately below for simplicity.</I></B>
871 <P>S1: Sends all the servers it is aware of as a stream of SERVER messages.
872 <BR>S1: Sends all the clients it is aware of as a stream of NICK messages.
873 <BR>S1: Sends the database of channel states on the network, as a stream
875 <BR>S1: Sends all the jupes it is aware of as a stream of JUPE messages.
876 <BR>S1: Sends a END_OF_BURST token (EB) to indicate it has finished sending.
877 <P>S2: Sends all the servers it is aware of as a stream of SERVER messages.
878 <BR>S2: Sends all the clients it is aware of as a stream of NICK messages.
879 <BR>S2: Sends the database of channel states on the network, as a stream
881 <BR>S2: Sends all the jupes it is aware of as a stream of JUPE messages.
882 <BR>S2: Sends a END_OF_BURST token (EB) to indicate it has finished sending.
883 <P>S2: Sends an EOB_ACK token (EA) to indicate it has succesfully recieved
884 the END_OF_BURST from S1
885 <BR>S1: Sends an EOB_ACK token (EA) to indicate it has succesfully recieved
886 the END_OF_BURST from S2
887 <P><I>Example Session:</I>
888 <PRE><FONT COLOR="#00007F">[WRITE]: PASS :54321
889 [WRITE]: SERVER irc.undernet.org 1 947957852 947957852 J10 AB]]] :Undernet Client Server.
890 [WRITE]: AB N MrFoo 1 947957852 ~me myhost.foobar.net +diksw DAqAoB ABAAA :Mr Foo (foo@bar.com).
891 [WRITE]: AB B #mychannel 946101324 ABAAA:o
894 [ READ]: SERVER server1.undernet.org 1 947901540 947958150 J10 AFAD] :A Generic Server.
895 [ READ]: AF S server2.undernet.org 2 0 947957585 P10 AZAD] 0 :[192.168.10.3] A Generic Server.
896 [ READ]: AZ S server3.undernet.org 3 0 947957607 P10 AIAD] 0 :[192.168.10.5] A Generic Server.
897 [ READ]: AF N Client1 1 947957573 Ident userhost.net +oiwg DAqAoB AFAAA :Generic Client.
898 [ READ]: AZ N Client2 2 947957719 Ident userhost.net +iwg DAqAoB AZAAA :Generic Client.
899 [ READ]: AI N Client3 3 947957742 Ident userhost.net +iwg DAqAoB AIAAA :Generic Client.
900 [ READ]: AI N Client4 3 947958121 Ident userhost.net +iwg DAqAoB AIAAB :Generic Client.
901 [ READ]: AF B #foobar 947957734 +tink akey AIAAB,AIAAA:v,AZAAA:o :%*!*another@*.ban.com *!*foo@bar.net
902 [ READ]: AF B #coder-com 947957727 AIAAB,AZAAA:o
903 [ READ]: AF B #another 946101321 AFAAA
904 [ READ]: AF JU * +juped.undernet.org 3600 947958100 :Broken, please fix
907 [ READ]: AF EA</FONT></PRE>
908 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
911 <BR><A NAME="chap4"></A><B><FONT SIZE=+2>4. Continuous Operation</FONT></B>
912 <P>This chapter provides details of the messages that can be sent after
913 successfully linking to a network, and synchronising the channel/user database.
914 <P><A NAME="chap4.1"></A><B><FONT SIZE=+1>4.1 Channel state operations</FONT></B>
915 <P>There are a number of messages that can modify the state of a channel,
917 <OL><B>4.1.1 - MODE</B>
918 <P>The MODE message can modify channel modes and bans, and also give or
919 take operator/voice status from channel members.
921 <BR><TT><FONT COLOR="#00007F">[NUMERIC PREFIX] M [CHANNEL] (+|-)[MODESTRING]
922 <MODESTRING PARAMETERS></FONT></TT></OL>
926 <BR><TT>1 2 3
927 4 5</TT>
928 <BR><TT>AZAAA M #coder-com +stinlko 500 TestKey BAC</TT></OL>
934 The numeric of the user issuing this MODE command. It can be assumed this
935 user is opped on the target channel.</LI>
938 The "MODE" token.</LI>
941 The target channel.</LI>
944 The "Mode string".</LI>
948 This consists of up to 6 '+' or '-' (add or remove) prefixed channel modes.
949 (If no '+' or '-' are specified, a '+' is assumed unless a '-' has been
950 encountered previously in the mode string). For example, '+s+t+n-l-io'
951 is a valid mode string, as is '+stnmov'.</LI>
955 Valid Mode modes are:</LI>
961 <TABLE BORDER COLS=3 WIDTH="85%" NOSAVE >
963 <TD NOSAVE><B>Token</B></TD>
965 <TD><B>Function</B></TD>
967 <TD><B>Parameters</B></TD>
973 <TD>Sets/Unsets 'Private' Flag.</TD>
981 <TD>Sets/Unsets 'Secret' Flag.</TD>
989 <TD>Sets/Unsets 'Moderated' Flag.</TD>
997 <TD>Sets/Unsets 'External Messages' Flag.</TD>
1005 <TD>Sets/Unsets 'Topic Limit' Flag.</TD>
1013 <TD>Sets/Unsets 'Invite only' Flag.</TD>
1021 <TD>Sets/Unsets 'Channel Limit' Flag.</TD>
1023 <TD>The channel limit.</TD>
1029 <TD>Sets/Unsets 'Channel Key' Flag.</TD>
1031 <TD>The channel keyword (Password).</TD>
1037 <TD>Ops and Deops users.</TD>
1039 <TD>Numeric of user to be opped.</TD>
1047 <TD>Numeric of user to be voiced.</TD>
1055 <TD>Ban string.</TD>
1063 The "Mode string Parameters".</LI>
1067 This is a matching list of parameters to the modes supplied in the "Modestring".</LI>
1069 <BR><I>For Example:</I>
1070 <BR>If the Modestring is "+stnlo", a typical parameter string would be
1071 "500 AZAA". The first 3 modes, 's', 't' and 'n' do not require parameters,
1072 so non are present. The following two, 'l' and 'o' both require parameters,
1073 so they are 500 and AZAAA respectively (This sets the channel limit to
1074 500 users, and ops the numeric AZAAA).</OL>
1077 <P><BR>N.B: The "MODE" message is also used to modify a client's user modes,
1078 not just channel modes. See <A HREF="#chap4.2">section 4.2</A> for details.</OL>
1080 <OL><B>4.1.2 - OPMODE</B>
1081 <P>The OPMODE message is identical in syntax to the MODE message, however
1082 it will only ever have an operator as the source. It is likely that the
1083 source of this mode will not have ops in the target channel, but it should
1084 succeed never the less.
1085 <P><B>4.1.3 - JOIN</B>
1086 <P><B>4.1.4 - PART</B>
1087 <P><B>4.1.5 - KICK</B>
1088 <P><B>4.1.6 - TOPIC</B>
1089 <P><B>4.1.4 - CLEARMODE</B>
1091 <OL><TT>AZAAA CM #coder-com ovpsmikbl</TT></OL>
1093 <A NAME="chap4.2"></A><B><FONT SIZE=+1>4.2 Client state operations</FONT></B>
1094 <BLOCKQUOTE><B>4.2.1 - NICK</B>
1095 <BLOCKQUOTE><TT>AZAAA N Nick2 955423230</TT></BLOCKQUOTE>
1097 <BLOCKQUOTE><TT>AZAAA M Nick2 :+odi</TT></BLOCKQUOTE>
1099 <A NAME="chap4.3"></A><B><FONT SIZE=+1>4.3 Channel/Client Messaging.</FONT></B>
1100 <BLOCKQUOTE><B>4.3.1 - PRIVMSG</B>
1101 <P><B>4.3.2 - NOTICE</B>
1102 <P><B>4.3.3 - CNOTICE</B>
1103 <P><B>4.3.4 - CPRIVMSG</B>
1104 <BR> </BLOCKQUOTE>
1105 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
1107 <HR ALIGN=LEFT WIDTH=100% SIZE=2>
1108 <P><A NAME="chap5"></A><B><FONT SIZE=+2>5. Programmers reference: Client/Server
1109 Structures</FONT></B>
1110 <P>This section provides information on the standard Client/Server structures,
1111 for easy reference during development.
1112 <P><I>[..Link to autogenerated struct.html..]</I>
1113 <P><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 <BR><A NAME="chap7"></A><B><FONT SIZE=+2>7. FAQ</FONT></B>
1117 <P>Frequently asked questions.
1125 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
1128 <P><A NAME="chap8"></A><B><FONT SIZE=+2>8. Update History</FONT></B>
1129 <P>[2000-01-20]: Initial draft, structure, background info.
1130 <BR>[2000-02-13]: Added initial BURST documentation.
1131 <BR>[2000-02-14]: Continued BURST documentation / Begin NICK and SERVER
1133 <BR>[2000-02-26]: Continued chapter 5, few example fixes, added token table
1135 <BR>[2000-03-02]: Added NICK spec. -Gte.
1136 <BR>[2000-03-18]: Added JUPE spec. -Kev
1137 <BR>[2000-04-10]: Added information about OPMODE and CLEARMODE tokens.
1139 <BR>[2000-04-11]: Started work on chapter 4. -Gte
1140 <P><A NAME="chap8.1"></A><B><FONT SIZE=+1>8.1 TODO</FONT></B>
1143 Finish Chapter 5.</LI>
1146 Go through examples, and ensure they are all correct.</LI>
1149 Add common function headers, with argv listings.</LI>
1152 Add description of further server to server messages, with special cases
1156 Add FAQ Section.</LI>
1158 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>