]> arthur.barton.de Git - ngircd-alex.git/blob - doc/Protocol.txt
Updated documentation.
[ngircd-alex.git] / doc / Protocol.txt
1
2                      ngIRCd - Next Generation IRC Server
3
4                       (c)2001-2003 by Alexander Barton,
5                     alex@barton.de, http://www.barton.de/
6
7                ngIRCd is free software and published under the
8                    terms of the GNU General Public License.
9
10                               -- Protocol.txt --
11
12
13 I. Compatibility
14 ~~~~~~~~~~~~~~~~
15
16 The ngIRCd implements the Internet Relay Chat (IRC) protocol version 2.10
17 as defined in RFC ("request for comment") 1459 and 2810-2813. These (and
18 probably further relevant RFCs) are listed in doc/RFC.txt.
19
20 Unfortunately, even the "original" ircd doesn't follow these specifications
21 in all details. But because the ngIRCd should be a fully compatible
22 replacement for this server ("ircd") it tries to emulate these differences.
23
24 If you don't like this behavior please ./configure the ngIRCd using the
25 "--enable-strict-rfc" command line option. But please not: not all IRC
26 clients are compatible with such an server, some can't even connect at all!
27 Therefore this option isn't desired for "normal operation".
28
29
30 II. The IRC+ Protocol
31 ~~~~~~~~~~~~~~~~~~~~~
32
33 Starting with version 0.5.0, the ngIRCd extends the original IRC protocol
34 as defined in RFC 2810-2813. This enhanced protocol is named "IRC+". It is
35 backwards compatible to the "plain" IRC protocol and will only be used by
36 the ngIRCd if it detects that the peer supports it as well.
37
38 The "PASSV" command is used to detect the protocol and peer versions (see
39 RFC 2813, section 4.1.1).
40
41
42 II.1 Register new server link
43
44      Command: PASS
45   Parameters: <password> <version> <flags> [<options>]
46      Used by: servers only (with these parameters)
47
48 <password> is the password for this new server link as defined in the server
49 configuration which is sent to the peer or received from it.
50
51 <version> consists of two parts and is at least 4, at most 14 characters
52 long: the first four bytes contain the IRC protocol version number, whereas
53 the first two bytes represent the major version, the last two bytes the
54 minor version (the string "0210" indicates version 2.10, e.g.).
55
56 The following optional(!) 10 bytes contain an implementation-dependent
57 version number. Servers supporting the IRC+ protocol as defined in this
58 document provide the string "-IRC+" here.
59
60 <flags> consists of two parts separated with the character "|" and is at
61 most 100 bytes long. The first part contains the name of the implementation
62 (ngIRCd sets this to "ngIRCd", the original ircd to "IRC", e.g.). The second
63 part is implementation-dependent and should only be parsed if the peer
64 supports the IRC+ protocol as well. In this case the following syntax is
65 used: "<serverversion>[:<serverflags>]".
66
67 <serverversion> is an ASCII representation of the clear-text server version
68 number, <serverflags> indicates the supported IRC+ protocol extensions (and
69 may be empty!).
70
71 The optional parameter <options> is used to propagate server options as
72 defined in RFC 2813, section 4.1.1.
73
74 The following <serverflags> are defined at the moment:
75
76 - o: IRC operators are allowed to change channel- and channel-user-modes
77      even if they aren't channel-operator of the affected channel.
78
79 - C: The server supports the CHANINFO command.
80
81
82 II.2 Exchange channel-modes, topics, and persistent channels
83
84      Command: CHANINFO
85   Parameters: <channel> +<modes> <key> <maxusers> [<topic>]
86      Used by: servers only
87
88 CHANINFO is used by servers to inform each other about a channel: its
89 modes, channel key, user limits and its topic. <topic> is optional.
90
91 If the channel already exists on the server receiving the CHANINFO command,
92 it only adopts the <modes> (or the <topic>) if there are no modes (or topic)
93 already set. It there are already values set the server ignores the
94 corresponding parameter.
95
96 If the channel doesn't exists at all it will be created.
97
98 The parameter <key> must be ignored if a channel has no key (the parameter
99 <modes> doesn't list the "k" channel mode). In this case <key> should
100 contain "*" because the parameter <key> is required by the CHANINFO syntax
101 and therefore can't be omitted. The parameter <limit> must be ignored when
102 a channel has no user limit (the parameter <modes> doesn't list the "l"
103 channel mode). In this case <limit> should be "0".
104
105
106 -- 
107 $Id: Protocol.txt,v 1.9 2003/04/21 12:48:40 alex Exp $