Blame


1 28c7f372 2002-09-02 alex
2 28c7f372 2002-09-02 alex ngIRCd - Next Generation IRC Server
3 28c7f372 2002-09-02 alex
4 47ca178a 2007-11-21 alex (c)2001-2007 Alexander Barton,
5 28c7f372 2002-09-02 alex alex@barton.de, http://www.barton.de/
6 28c7f372 2002-09-02 alex
7 5170ecf0 2003-03-09 alex ngIRCd is free software and published under the
8 5170ecf0 2003-03-09 alex terms of the GNU General Public License.
9 28c7f372 2002-09-02 alex
10 28c7f372 2002-09-02 alex -- Protocol.txt --
11 28c7f372 2002-09-02 alex
12 28c7f372 2002-09-02 alex
13 384d6b89 2003-04-21 alex I. Compatibility
14 384d6b89 2003-04-21 alex ~~~~~~~~~~~~~~~~
15 5b333085 2003-01-04 alex
16 384d6b89 2003-04-21 alex The ngIRCd implements the Internet Relay Chat (IRC) protocol version 2.10
17 384d6b89 2003-04-21 alex as defined in RFC ("request for comment") 1459 and 2810-2813. These (and
18 384d6b89 2003-04-21 alex probably further relevant RFCs) are listed in doc/RFC.txt.
19 5b333085 2003-01-04 alex
20 384d6b89 2003-04-21 alex Unfortunately, even the "original" ircd doesn't follow these specifications
21 384d6b89 2003-04-21 alex in all details. But because the ngIRCd should be a fully compatible
22 384d6b89 2003-04-21 alex replacement for this server ("ircd") it tries to emulate these differences.
23 28c7f372 2002-09-02 alex
24 384d6b89 2003-04-21 alex If you don't like this behavior please ./configure the ngIRCd using the
25 d329a961 2003-11-30 alex "--enable-strict-rfc" command line option. But keep in mind: not all IRC
26 d329a961 2003-11-30 alex clients are compatible with a server configured that way, some can't even
27 d329a961 2003-11-30 alex connect at all! Therefore this option usually isn't desired for "normal
28 d329a961 2003-11-30 alex server operation".
29 28c7f372 2002-09-02 alex
30 28c7f372 2002-09-02 alex
31 384d6b89 2003-04-21 alex II. The IRC+ Protocol
32 384d6b89 2003-04-21 alex ~~~~~~~~~~~~~~~~~~~~~
33 28c7f372 2002-09-02 alex
34 384d6b89 2003-04-21 alex Starting with version 0.5.0, the ngIRCd extends the original IRC protocol
35 384d6b89 2003-04-21 alex as defined in RFC 2810-2813. This enhanced protocol is named "IRC+". It is
36 384d6b89 2003-04-21 alex backwards compatible to the "plain" IRC protocol and will only be used by
37 384d6b89 2003-04-21 alex the ngIRCd if it detects that the peer supports it as well.
38 28c7f372 2002-09-02 alex
39 d329a961 2003-11-30 alex The "PASS" command is used to detect the protocol and peer versions see
40 d329a961 2003-11-30 alex RFC 2813 (section 4.1.1) and below.
41 28c7f372 2002-09-02 alex
42 28c7f372 2002-09-02 alex
43 384d6b89 2003-04-21 alex II.1 Register new server link
44 28c7f372 2002-09-02 alex
45 384d6b89 2003-04-21 alex Command: PASS
46 384d6b89 2003-04-21 alex Parameters: <password> <version> <flags> [<options>]
47 384d6b89 2003-04-21 alex Used by: servers only (with these parameters)
48 28c7f372 2002-09-02 alex
49 384d6b89 2003-04-21 alex <password> is the password for this new server link as defined in the server
50 384d6b89 2003-04-21 alex configuration which is sent to the peer or received from it.
51 28c7f372 2002-09-02 alex
52 384d6b89 2003-04-21 alex <version> consists of two parts and is at least 4, at most 14 characters
53 384d6b89 2003-04-21 alex long: the first four bytes contain the IRC protocol version number, whereas
54 384d6b89 2003-04-21 alex the first two bytes represent the major version, the last two bytes the
55 384d6b89 2003-04-21 alex minor version (the string "0210" indicates version 2.10, e.g.).
56 28c7f372 2002-09-02 alex
57 384d6b89 2003-04-21 alex The following optional(!) 10 bytes contain an implementation-dependent
58 384d6b89 2003-04-21 alex version number. Servers supporting the IRC+ protocol as defined in this
59 384d6b89 2003-04-21 alex document provide the string "-IRC+" here.
60 28c7f372 2002-09-02 alex
61 d329a961 2003-11-30 alex Example for <version>: "0210-IRC+".
62 d329a961 2003-11-30 alex
63 384d6b89 2003-04-21 alex <flags> consists of two parts separated with the character "|" and is at
64 384d6b89 2003-04-21 alex most 100 bytes long. The first part contains the name of the implementation
65 d329a961 2003-11-30 alex (ngIRCd sets this to "ngircd", the original ircd to "IRC", e.g.). The second
66 384d6b89 2003-04-21 alex part is implementation-dependent and should only be parsed if the peer
67 384d6b89 2003-04-21 alex supports the IRC+ protocol as well. In this case the following syntax is
68 384d6b89 2003-04-21 alex used: "<serverversion>[:<serverflags>]".
69 28c7f372 2002-09-02 alex
70 384d6b89 2003-04-21 alex <serverversion> is an ASCII representation of the clear-text server version
71 384d6b89 2003-04-21 alex number, <serverflags> indicates the supported IRC+ protocol extensions (and
72 384d6b89 2003-04-21 alex may be empty!).
73 28c7f372 2002-09-02 alex
74 384d6b89 2003-04-21 alex The following <serverflags> are defined at the moment:
75 241d033f 2002-09-03 alex
76 d329a961 2003-11-30 alex - C: The server supports the CHANINFO command.
77 d329a961 2003-11-30 alex
78 c1e98411 2004-04-25 alex - L: INVITE- and BAN-lists should be synchronized between servers: if the
79 c1e98411 2004-04-25 alex peer understands this flag, it will send "MODE +I" and "MODE +b"
80 c1e98411 2004-04-25 alex commands after the server link has been established.
81 c1e98411 2004-04-25 alex
82 47ca178a 2007-11-21 alex - H: The server supports the "enhanced server handshake", see section II.2
83 47ca178a 2007-11-21 alex for a detailed description.
84 47ca178a 2007-11-21 alex
85 384d6b89 2003-04-21 alex - o: IRC operators are allowed to change channel- and channel-user-modes
86 384d6b89 2003-04-21 alex even if they aren't channel-operator of the affected channel.
87 28c7f372 2002-09-02 alex
88 d329a961 2003-11-30 alex - Z: Compressed server links are supported by the server.
89 28c7f372 2002-09-02 alex
90 d329a961 2003-11-30 alex Example for a complete <flags> string: "ngircd|0.7.5:CZ".
91 28c7f372 2002-09-02 alex
92 d329a961 2003-11-30 alex The optional parameter <options> is used to propagate server options as
93 d329a961 2003-11-30 alex defined in RFC 2813, section 4.1.1.
94 d329a961 2003-11-30 alex
95 d329a961 2003-11-30 alex
96 47ca178a 2007-11-21 alex II.2 Enhanced Server Handshake
97 28c7f372 2002-09-02 alex
98 47ca178a 2007-11-21 alex The "enhanced server handshake" is used when both servers support this IRC+
99 47ca178a 2007-11-21 alex extension, which is indicated by the 'H' flag in the <serverflags> sent with
100 47ca178a 2007-11-21 alex the PASS command, see section II.1.
101 47ca178a 2007-11-21 alex
102 47ca178a 2007-11-21 alex It basically means, that after exchanging the PASS and SERVER commands the
103 47ca178a 2007-11-21 alex server is not registered in the network (as usual), but that IRC numerics
104 47ca178a 2007-11-21 alex are exchanged until the numeric 376 (ENDOFMOTD) is received. Afterwards the
105 47ca178a 2007-11-21 alex peer is registered in the network as with the regular IRC protocol.
106 47ca178a 2007-11-21 alex
107 47ca178a 2007-11-21 alex A server implementing the enhanced server handshake (and indicating this
108 47ca178a 2007-11-21 alex using 'H' in the <serverflags>) MUST ignore all unknown numerics to it
109 47ca178a 2007-11-21 alex silently.
110 47ca178a 2007-11-21 alex
111 47ca178a 2007-11-21 alex In addition, such a server should at least send the numeric 005 (ISUPPORT)
112 47ca178a 2007-11-21 alex to its peer, containing the following information. Syntax: <key>=<value>,
113 47ca178a 2007-11-21 alex one token per IRC parameter. If the server has to send more than 12 token
114 47ca178a 2007-11-21 alex it must send separate ISUPPORT numerics (this is a limitation of the IRC
115 47ca178a 2007-11-21 alex protocol which allows at max 15 arguments per command).
116 47ca178a 2007-11-21 alex
117 47ca178a 2007-11-21 alex - NICKLEN: Maximum nickname length. Default: 9.
118 47ca178a 2007-11-21 alex - CASEMAPPING: Case mapping used for nick- and channel name comparing.
119 47ca178a 2007-11-21 alex Default: "ascii", the chars [a-z] are lowercase of [A-Z].
120 47ca178a 2007-11-21 alex - PREFIX: List of channel modes a person can get and the respective prefix
121 47ca178a 2007-11-21 alex a channel or nickname will get in case the person has it. The order of the
122 47ca178a 2007-11-21 alex modes goes from most powerful to least powerful. Default: "(ov)@+"
123 47ca178a 2007-11-21 alex - CHANTYPES: Supported channel prefixes. Default: "#".
124 47ca178a 2007-11-21 alex - CHANMODES: List of channel modes for 4 types, separated by comma (","):
125 47ca178a 2007-11-21 alex Mode that adds or removes a nick or address to a list, mode that changes
126 47ca178a 2007-11-21 alex a setting (both have always has a parameter), mode that changes a setting
127 47ca178a 2007-11-21 alex and only has a parameter when set, and mode that changes a setting and
128 47ca178a 2007-11-21 alex never has a parameter. For example "bI,k,l,imnPst".
129 47ca178a 2007-11-21 alex - CHANLIMIT: Maximum number of channels allowed to join by channel prefix,
130 47ca178a 2007-11-21 alex for example "#:10".
131 47ca178a 2007-11-21 alex
132 47ca178a 2007-11-21 alex Please see <http://www.irc.org/tech_docs/005.html> for details.
133 47ca178a 2007-11-21 alex
134 47ca178a 2007-11-21 alex The information exchanged using ISUPPORT can be used to detect configuration
135 47ca178a 2007-11-21 alex incompatibilities (different maximum nick name length, for example) and
136 47ca178a 2007-11-21 alex therefore to disconnect the peer prior to registering it in the network.
137 47ca178a 2007-11-21 alex
138 47ca178a 2007-11-21 alex
139 47ca178a 2007-11-21 alex II.3 Exchange channel-modes, topics, and persistent channels
140 47ca178a 2007-11-21 alex
141 384d6b89 2003-04-21 alex Command: CHANINFO
142 5f87474a 2005-08-27 alex Parameters: <channel> +<modes> <key> <limit> [<topic>]
143 384d6b89 2003-04-21 alex Used by: servers only
144 aafd21c7 2002-09-04 alex
145 384d6b89 2003-04-21 alex CHANINFO is used by servers to inform each other about a channel: its
146 384d6b89 2003-04-21 alex modes, channel key, user limits and its topic. <topic> is optional.
147 9611833e 2002-09-04 alex
148 384d6b89 2003-04-21 alex If the channel already exists on the server receiving the CHANINFO command,
149 384d6b89 2003-04-21 alex it only adopts the <modes> (or the <topic>) if there are no modes (or topic)
150 384d6b89 2003-04-21 alex already set. It there are already values set the server ignores the
151 384d6b89 2003-04-21 alex corresponding parameter.
152 9611833e 2002-09-04 alex
153 384d6b89 2003-04-21 alex If the channel doesn't exists at all it will be created.
154 9611833e 2002-09-04 alex
155 384d6b89 2003-04-21 alex The parameter <key> must be ignored if a channel has no key (the parameter
156 384d6b89 2003-04-21 alex <modes> doesn't list the "k" channel mode). In this case <key> should
157 384d6b89 2003-04-21 alex contain "*" because the parameter <key> is required by the CHANINFO syntax
158 384d6b89 2003-04-21 alex and therefore can't be omitted. The parameter <limit> must be ignored when
159 384d6b89 2003-04-21 alex a channel has no user limit (the parameter <modes> doesn't list the "l"
160 384d6b89 2003-04-21 alex channel mode). In this case <limit> should be "0".
161 9611833e 2002-09-04 alex
162 9611833e 2002-09-04 alex
163 28c7f372 2002-09-02 alex --
164 47ca178a 2007-11-21 alex $Id: Protocol.txt,v 1.14 2007/11/21 12:16:35 alex Exp $