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.6 2002/
02/
14 00:
20:
40 ghostwolf 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>
557 <TD><FONT SIZE=-
1>ACCOUNT
</FONT></TD>
559 <TD><FONT SIZE=-
1>AC
</FONT></TD>
562 <FONT FACE=
"Arial,Helvetica"><FONT SIZE=-
1><B>[
</B><A HREF=
"#top">Back
</A><B>]
</B></FONT></FONT>
564 <HR ALIGN=LEFT WIDTH=
100% SIZE=
2>
565 <P><A NAME=
"chap3"></A><B><FONT SIZE=+
2>3. Registration and syncronisation
</FONT></B>
566 <P><A NAME=
"chap3.1"></A><B><FONT SIZE=+
1>3.1 Server registration and authentication
</FONT></B>
567 <P>After a TCP connection has been established, the server initally introduces
568 itself via a "PASS" message as follows:
570 <PRE><FONT COLOR=
"#00007F">PASS :[PASSWORD]
</FONT></PRE>
572 "PASSWORD" is simply compared with the password present in the destination
573 servers config file, and is used to confirm credentials after the "SERVER"
574 message has been recieved, as follows:
576 <PRE><TT><FONT COLOR=
"#00007F">SERVER [SERVERNAME] [HOPCOUNT] [START TIME] [LINK TIME] [PROTOCOL] [NUMERIC/MAXCONN] :[DESCRIPTION]
</FONT></TT></PRE>
580 <PRE><B>1 2 3 4 5 6 7 8
581 </B>SERVER irc.undernet.org
1 933022556 947908144 J10 AA]]] :[
127.0.0.1] A Undernet Server.
</PRE>
586 The SERVER message, indicating this connection wishes to introduce a new
587 server to the network.
</LI>
590 The name of the server you are introducing, a valid server name consists
594 The hop count of the server you are introducing, this is always
1
595 when you are introducing yourself.
</LI>
598 The epoch timestamp specifying when the ircd was started.
</LI>
601 The epoch timestamp specifying the time the server initiated the
602 link to the network.
</LI>
605 The Protocol identifier of this server.
</LI>
609 This token informs the network which protocol it is compliant with, eg:
610 If it is a P10 compliant server, then the token will be "P10".
</LI>
613 If the server being introduced has not yet successfully synced its
614 database with the network (Completed its net.burst - see
3.2), then the
615 Protocol token should be prefixed with a J, instead of a P (Eg: J10) to
616 indicate it is currently still
<B>j
</B>oining the network.
</LI>
619 The protocol token should always be JXX when the server is introducing
624 The numeric, and maximum connections identifier for this server.
</LI>
628 This token is formatted exactly the same as a client numeric is formatted.
629 The first
2 characters identify the server's numeric, whilst in this situation,
630 the final
3 characters define the maximum number of clients that this server
631 can hold (and more importantly, the maximum number of numerics it will
632 generate). This is always one less than a power of two, because the server
633 uses this as a bitmask. A server can give out a higher numeric than this,
634 however it will be "anded" with this number to find it's entry slot. The
635 reason for this is so a server which is near the maximum number of clients
636 can give out more numerics than it's using to prevent a new client getting a
637 numeric that was used only seconds ago and maybe get messages destined to
641 The example "AA]]]" shows that this is a server with numeric
0, which
642 will generate client numerics up to
262,
143.
</LI>
646 This final parameter simply consists of a textual description of the server
647 prefixed by a colon. This is displayed in a clients WHOIS line, aswell
648 as in the LINKS reply. By convention, if this is a leaf server it contains
649 the servers IP in square brackets at the beginning of the string,
</LI>
651 <A NAME=
"chap3.2"></A><B><FONT SIZE=+
1>3.2 Network Database resyncronisation
</FONT></B>
652 <P>After the connection has been established and verified, the next step
653 is to syncronise the database of client/server/channel information between
655 <BLOCKQUOTE><B>3.2.1 - SERVER Messages
</B></BLOCKQUOTE>
657 <BLOCKQUOTE>Server details are transmitted via "SERVER" messages similar
658 to the initial introduction message, with the following format:
</BLOCKQUOTE>
661 <BLOCKQUOTE><TT><FONT COLOR=
"#00007F">[OWNING SERVER PREFIX] S [SERVERNAME]
662 [HOPCOUNT] [START TIME] [LINK TIME] [PROTOCOL] [NUMERIC/MAXCONN]
0 :[DESCRIPTION]
</FONT></TT></BLOCKQUOTE>
663 <FONT COLOR=
"#000000">The syntax of this message is almost identical to
664 the originally recieved server message, with the only exception being that
665 the message is numeric prefixed, to indicate which server sent this message
666 (and also therefore, which hub this new server is linked too). There is
667 also a fixed "
0" present before the Description field, this is a placeholder
668 for future use and currently unused. [Isomer: Question, what IS this
669 reserved for?]
</FONT>
670 <P><B>3.2.2 - NICK Messages
</B></BLOCKQUOTE>
672 <BLOCKQUOTE>Client information is transmitted via "NICK" messages, of the
673 following format:
</BLOCKQUOTE>
677 <PRE><TT><FONT COLOR=
"#00007F">[NUMERIC PREFIX] N [NICK] [HOPCOUNT] [TIMESTAMP] [USERNAME] [HOST]
<+modes
> [BASE64 IP] [NUMERIC] :[USERINFO]
</FONT></TT></PRE>
679 <FONT COLOR=
"#00007F">For Example:
</FONT>
680 <BLOCKQUOTE><TT><FONT COLOR=
"#000000">1 2 3
681 4 5 6
682 7 8
683 9 10 11</FONT></TT>
684 <BR><TT><FONT COLOR=
"#000000">AF N Client1
1 947957573 User userhost.net
685 +oiwg DAqAoB AFAAA :Generic Client.
</FONT></TT></BLOCKQUOTE>
689 The numeric of the server sending this message. (And hence, owning this
693 The "NICK" token.
</LI>
696 The nickname of this client, currently max
9 chars.
</LI>
699 The "Hopcount" of this client, Ie: how many servers away it is on.
</LI>
702 The epoch timestamp indicating when the user was created.
</LI>
705 The "User" part of the user@host mask.
</LI>
708 the "Host" part of the user@host mask.
</LI>
711 [
<B>Optional
</B>]: User modes. If present, this is always +
<user modes
712 for this client
>. Note that the special +r usermode is followed by the
713 client's account name; see the documentation for ACCOUNT.
</LI>
716 The real IP address of this client, a Base64 encoded
32bit int.
</LI>
719 This client's numeric, in SSCCC format.
</LI>
722 Free format user info line.
</LI>
727 <BLOCKQUOTE><B>3.2.3 - BURST Messages
</B></BLOCKQUOTE>
729 <BLOCKQUOTE>Channel details and membership information is synchronised
730 in one (or more) BURST messages for each channel that exists, formatted
731 as follows:
</BLOCKQUOTE>
735 <PRE><TT><FONT COLOR=
"#00007F">[NUMERIC PREFIX] B [CHANNEL] [CREATION TIMESTAMP]
<+MODES
> <ARG1
> <ARG2
> [MEMBER LIST]
<:%BANS
></FONT></TT></PRE>
739 <BLOCKQUOTE>For Example:
</BLOCKQUOTE>
743 <PRE>1 2 3 4 5 6 7 8 9
744 AZ B #coder-com
949217470 +tinkl key
56 AAAAA,AAAAB,AAAAC,ABAAA,ABAAB,ABAAC,ACAAA :%*!*@*.net
</PRE>
748 <BLOCKQUOTE><I>Notes:
</I></BLOCKQUOTE>
752 The numeric of the server sending this message.
</LI>
755 The "BURST" token.
</LI>
758 The name of the channel to which this data belongs. Currently #Channel
759 and +Channel names can be sent in a BURST message,
&Channels are not
760 because by definition they are local to the server.
</LI>
763 The epoch timestamp indicating when the channel was created.
</LI>
766 [
<B>Optional
</B>]: Channel Modes.
</LI>
770 The channel may have a number of modes set, aswell as relevant mode arguments
771 in the following
2 parameters.
</LI>
775 [
<B>Optional
</B>]: Channel Key, this parameter is present if the channel
776 modes contain a "k" mode.
</LI>
779 [
<B>Optional
</B>]: Channel Limit, this parameter is present if the channel
780 modes contain a "l" mode.
</LI>
783 A
<I>comma
</I> seperated list of client numerics, with the following
784 specific formatting rules to indicate +o, +v and +ov channel members.
</LI>
788 Numerics can have the following symbols appended on them; "
<B>:ov
</B>",
789 "<B>:v
</B>" or "<B>:o
</B>". These indicate that this numeric is either
790 Opped (<B>:o</B>), Voiced (<B>:v</B>) or both (<B>:ov</B>). This state
791 applies to the numeric it is attached too, and all subsequent numerics
792 until another state is encountered. <I>For Example:</I></LI>
795 AAABA:ov, AAABB:o,AAABC,AAABD,AAABE:v,AAABZ</LI>
797 <BR>Here, AAABA is both opped, and voiced, AAABB, AAABC and AAABD are opped
798 leaving AAABE and AAABZ voiced.
800 The first numeric of the member list will always contain a state
805 A <I>space</I> seperated list of bans present in the channel. The start
806 of the ban stream is indicated by a ":%", everything following the ":%"
807 is the ban list.
</LI>
809 <BR><I>For Example:
</I>
810 <BR>:%*!*@*.foobar.net another!ban@*.com *!*fred@a.host.co.uk
811 <BR>Would add the following bans to the channel:
813 <BR>another!ban@*.com
814 <BR>*!*fred@a.host.co.uk
</OL>
816 <BLOCKQUOTE>If the length of a BURST message exceeds the maximum lenght
817 of a line (
512 characters) then the remaining channel members/bans are
818 sent in subsequent BURST lines. The subsequent burst lines are
<B>only
</B>
819 used to add additional members to the channel, and if neccessary, channel
820 bans. There will be no "Mode" parameters present. A sample additional burst
821 line would be:
</BLOCKQUOTE>
825 <PRE>AZ BURST #coder-com
949217470 ACAAB:o,ACAAD :%*!*another@*.ban.com
</PRE>
829 <BLOCKQUOTE>Which adds two more opped members and a ban to the channel.
</BLOCKQUOTE>
831 <BLOCKQUOTE><B>3.2.4 - JUPE Messages
</B></BLOCKQUOTE>
833 <BLOCKQUOTE>Any currently unexpired JUPEs are transmitted via "JUPE" messages
834 with the following format:
</BLOCKQUOTE>
837 <BLOCKQUOTE><TT><FONT COLOR=
"#00007F">[NUMERIC PREFIX] JU * (+|-)[SERVER
838 NAME] [LIFETIME] [LAST MOD] :[REASON]
</FONT></TT></BLOCKQUOTE>
839 For example:
</BLOCKQUOTE>
842 <BLOCKQUOTE><TT>1 2 3 4
843 5 6
845 <BR><TT><FONT COLOR=
"#000000">AZ JU * +juped.undernet.org
000003593 955419707
846 :Juped Server
</FONT></TT></BLOCKQUOTE>
847 <I>Notes:
</I></BLOCKQUOTE>
851 The numeric of the server sending this message.
</LI>
854 The "JUPE" token.
</LI>
857 The target that should apply this JUPE (always "*" during bursts).
</LI>
860 The name of the server to JUPE, prefixed with a "+" if the JUPE is active,
861 or with a "-" if it is not.
</LI>
864 The remaining absolute lifetime of the JUPE, expressed in seconds.
</LI>
867 The last time the JUPE was modified.
</LI>
870 The reason the JUPE was applied.
</LI>
872 <A NAME=
"chap3.3"></A><B><FONT SIZE=+
1>3.3 Summary
</FONT></B>
873 <P>The following table summarises the sequence of events that occur when
874 a server connects to another server. S1 is our server, and S2 is a HUB
875 on the target network.
876 <P>S1: Sends Password.
877 <BR>S1: Sends initial SERVER message.
878 <P><I>S2 Confirms S1 has the correct credentials, and if so, proceeds.
879 If not, S1 is squit with a relevant reason.
</I>
880 <P>S2: Sends Password.
881 <BR>S2: Sends initial SERVER message.
882 <P><I>S1 Confirms S2 has the correct credentials, and if so, proceeds.
883 If not, S2 is squit with a relevant reason.
</I>
884 <P><B><I>The follow occur asynchronously, however they have been shown
885 seperately below for simplicity.
</I></B>
886 <P>S1: Sends all the servers it is aware of as a stream of SERVER messages.
887 <BR>S1: Sends all the clients it is aware of as a stream of NICK messages.
888 <BR>S1: Sends the database of channel states on the network, as a stream
890 <BR>S1: Sends all the jupes it is aware of as a stream of JUPE messages.
891 <BR>S1: Sends a END_OF_BURST token (EB) to indicate it has finished sending.
892 <P>S2: Sends all the servers it is aware of as a stream of SERVER messages.
893 <BR>S2: Sends all the clients it is aware of as a stream of NICK messages.
894 <BR>S2: Sends the database of channel states on the network, as a stream
896 <BR>S2: Sends all the jupes it is aware of as a stream of JUPE messages.
897 <BR>S2: Sends a END_OF_BURST token (EB) to indicate it has finished sending.
898 <P>S2: Sends an EOB_ACK token (EA) to indicate it has succesfully recieved
899 the END_OF_BURST from S1
900 <BR>S1: Sends an EOB_ACK token (EA) to indicate it has succesfully recieved
901 the END_OF_BURST from S2
902 <P><I>Example Session:
</I>
903 <PRE><FONT COLOR=
"#00007F">[WRITE]: PASS :
54321
904 [WRITE]: SERVER irc.undernet.org
1 947957852 947957852 J10 AB]]] :Undernet Client Server.
905 [WRITE]: AB N MrFoo
1 947957852 ~me myhost.foobar.net +diksw DAqAoB ABAAA :Mr Foo (foo@bar.com).
906 [WRITE]: AB B #mychannel
946101324 ABAAA:o
909 [ READ]: SERVER server1.undernet.org
1 947901540 947958150 J10 AFAD] :A Generic Server.
910 [ READ]: AF S server2.undernet.org
2 0 947957585 P10 AZAD]
0 :[
192.168.10.3] A Generic Server.
911 [ READ]: AZ S server3.undernet.org
3 0 947957607 P10 AIAD]
0 :[
192.168.10.5] A Generic Server.
912 [ READ]: AF N Client1
1 947957573 Ident userhost.net +oiwg DAqAoB AFAAA :Generic Client.
913 [ READ]: AZ N Client2
2 947957719 Ident userhost.net +iwg DAqAoB AZAAA :Generic Client.
914 [ READ]: AI N Client3
3 947957742 Ident userhost.net +iwg DAqAoB AIAAA :Generic Client.
915 [ READ]: AI N Client4
3 947958121 Ident userhost.net +iwg DAqAoB AIAAB :Generic Client.
916 [ READ]: AF B #foobar
947957734 +tink akey AIAAB,AIAAA:v,AZAAA:o :%*!*another@*.ban.com *!*foo@bar.net
917 [ READ]: AF B #coder-com
947957727 AIAAB,AZAAA:o
918 [ READ]: AF B #another
946101321 AFAAA
919 [ READ]: AF JU * +juped.undernet.org
3600 947958100 :Broken, please fix
922 [ READ]: AF EA
</FONT></PRE>
923 <FONT FACE=
"Arial,Helvetica"><FONT SIZE=-
1><B>[
</B><A HREF=
"#top">Back
</A><B>]
</B></FONT></FONT>
926 <BR><A NAME=
"chap4"></A><B><FONT SIZE=+
2>4. Continuous Operation
</FONT></B>
927 <P>This chapter provides details of the messages that can be sent after
928 successfully linking to a network, and synchronising the channel/user database.
929 <P><A NAME=
"chap4.1"></A><B><FONT SIZE=+
1>4.1 Channel state operations
</FONT></B>
930 <P>There are a number of messages that can modify the state of a channel,
932 <OL><B>4.1.1 - MODE
</B>
933 <P>The MODE message can modify channel modes and bans, and also give or
934 take operator/voice status from channel members.
936 <BR><TT><FONT COLOR=
"#00007F">[NUMERIC PREFIX] M [CHANNEL] (+|-)[MODESTRING]
937 <MODESTRING PARAMETERS
></FONT></TT></OL>
941 <BR><TT>1 2 3
942 4 5</TT>
943 <BR><TT>AZAAA M #coder-com +stinlko
500 TestKey BAC
</TT></OL>
949 The numeric of the user issuing this MODE command. It can be assumed this
950 user is opped on the target channel.
</LI>
953 The "MODE" token.
</LI>
956 The target channel.
</LI>
959 The "Mode string".
</LI>
963 This consists of up to
6 '+' or '-' (add or remove) prefixed channel modes.
964 (If no '+' or '-' are specified, a '+' is assumed unless a '-' has been
965 encountered previously in the mode string). For example, '+s+t+n-l-io'
966 is a valid mode string, as is '+stnmov'.
</LI>
970 Valid Mode modes are:
</LI>
976 <TABLE BORDER COLS=
3 WIDTH=
"85%" NOSAVE
>
978 <TD NOSAVE
><B>Token
</B></TD>
980 <TD><B>Function
</B></TD>
982 <TD><B>Parameters
</B></TD>
988 <TD>Sets/Unsets 'Private' Flag.
</TD>
996 <TD>Sets/Unsets 'Secret' Flag.
</TD>
1004 <TD>Sets/Unsets 'Moderated' Flag.
</TD>
1012 <TD>Sets/Unsets 'External Messages' Flag.
</TD>
1020 <TD>Sets/Unsets 'Topic Limit' Flag.
</TD>
1028 <TD>Sets/Unsets 'Invite only' Flag.
</TD>
1036 <TD>Sets/Unsets 'Channel Limit' Flag.
</TD>
1038 <TD>The channel limit.
</TD>
1044 <TD>Sets/Unsets 'Channel Key' Flag.
</TD>
1046 <TD>The channel keyword (Password).
</TD>
1052 <TD>Ops and Deops users.
</TD>
1054 <TD>Numeric of user to be opped.
</TD>
1062 <TD>Numeric of user to be voiced.
</TD>
1070 <TD>Ban string.
</TD>
1078 The "Mode string Parameters".
</LI>
1082 This is a matching list of parameters to the modes supplied in the "Modestring".
</LI>
1084 <BR><I>For Example:
</I>
1085 <BR>If the Modestring is "+stnlo", a typical parameter string would be
1086 "
500 AZAA". The first
3 modes, 's', 't' and 'n' do not require parameters,
1087 so non are present. The following two, 'l' and 'o' both require parameters,
1088 so they are
500 and AZAAA respectively (This sets the channel limit to
1089 500 users, and ops the numeric AZAAA).
</OL>
1092 <P><BR>N.B: The "MODE" message is also used to modify a client's user modes,
1093 not just channel modes. See
<A HREF=
"#chap4.2">section
4.2</A> for details.
</OL>
1095 <OL><B>4.1.2 - OPMODE
</B>
1096 <P>The OPMODE message is identical in syntax to the MODE message, however
1097 it will only ever have an operator as the source. It is likely that the
1098 source of this mode will not have ops in the target channel, but it should
1099 succeed never the less.
1100 <P><B>4.1.3 - JOIN
</B>
1101 <P><B>4.1.4 - PART
</B>
1102 <P><B>4.1.5 - KICK
</B>
1103 <P><B>4.1.6 - TOPIC
</B>
1104 <P><B>4.1.7 - CLEARMODE
</B>
1106 <OL><TT>AZAAA CM #coder-com ovpsmikbl
</TT></OL>
1108 <A NAME=
"chap4.2"></A><B><FONT SIZE=+
1>4.2 Client state operations
</FONT></B>
1109 <BLOCKQUOTE><B>4.2.1 - NICK
</B>
1110 <BLOCKQUOTE><TT>AZAAA N Nick2
955423230</TT></BLOCKQUOTE>
1112 <BLOCKQUOTE><TT>AZAAA M Nick2 :+odi
</TT></BLOCKQUOTE>
1113 <B>4.2.3 - ACCOUNT
</B>
1114 <BLOCKQUOTE><TT>AX AC AZAAA oper
</TT></BLOCKQUOTE>
1115 <P>The ACCOUNT message provides a way for servers, such as the channel service
1116 server, to set the account name information that is associated with a client.
1117 Once set, it cannot be unset or changed, and will be propagated in NICK during
1118 net bursts using the special user mode +r followed by the account name.
1120 <A NAME=
"chap4.3"></A><B><FONT SIZE=+
1>4.3 Channel/Client Messaging.
</FONT></B>
1121 <BLOCKQUOTE><B>4.3.1 - PRIVMSG
</B>
1122 <P><B>4.3.2 - NOTICE
</B>
1123 <P><B>4.3.3 - CNOTICE
</B>
1124 <P><B>4.3.4 - CPRIVMSG
</B>
1125 <BR> </BLOCKQUOTE>
1126 <FONT FACE=
"Arial,Helvetica"><FONT SIZE=-
1><B>[
</B><A HREF=
"#top">Back
</A><B>]
</B></FONT></FONT>
1128 <HR ALIGN=LEFT WIDTH=
100% SIZE=
2>
1129 <P><A NAME=
"chap5"></A><B><FONT SIZE=+
2>5. Programmers reference: Client/Server
1130 Structures
</FONT></B>
1131 <P>This section provides information on the standard Client/Server structures,
1132 for easy reference during development.
1133 <P><I>[..Link to autogenerated struct.html..]
</I>
1134 <P><FONT FACE=
"Arial,Helvetica"><FONT SIZE=-
1><B>[
</B><A HREF=
"#top">Back
</A><B>]
</B></FONT></FONT>
1136 <HR ALIGN=LEFT WIDTH=
100% SIZE=
2>
1137 <BR><A NAME=
"chap7"></A><B><FONT SIZE=+
2>7. FAQ
</FONT></B>
1138 <P>Frequently asked questions.
1146 <FONT FACE=
"Arial,Helvetica"><FONT SIZE=-
1><B>[
</B><A HREF=
"#top">Back
</A><B>]
</B></FONT></FONT>
1149 <P><A NAME=
"chap8"></A><B><FONT SIZE=+
2>8. Update History
</FONT></B>
1150 <P>[
2000-
01-
20]: Initial draft, structure, background info.
1151 <BR>[
2000-
02-
13]: Added initial BURST documentation.
1152 <BR>[
2000-
02-
14]: Continued BURST documentation / Begin NICK and SERVER
1154 <BR>[
2000-
02-
26]: Continued chapter
5, few example fixes, added token table
1156 <BR>[
2000-
03-
02]: Added NICK spec. -Gte.
1157 <BR>[
2000-
03-
18]: Added JUPE spec. -Kev
1158 <BR>[
2000-
04-
10]: Added information about OPMODE and CLEARMODE tokens.
1160 <BR>[
2000-
04-
11]: Started work on chapter
4. -Gte
1161 <BR>[
2000-
06-
01]: Changed some info about the max number of clients -Isomer
1162 <BR>[
2002-
01-
11]: Wrote a specification for ACCOUNT and noted that a usermode
1163 in a NICK message may have an argument. -Kev
1164 <P><A NAME=
"chap8.1"></A><B><FONT SIZE=+
1>8.1 TODO
</FONT></B>
1167 Finish Chapter
5.
</LI>
1170 Go through examples, and ensure they are all correct.
</LI>
1173 Add common function headers, with argv listings.
</LI>
1176 Add description of further server to server messages, with special cases
1180 Add FAQ Section.
</LI>
1182 <FONT FACE=
"Arial,Helvetica"><FONT SIZE=-
1><B>[
</B><A HREF=
"#top">Back
</A><B>]
</B></FONT></FONT>