2 28c7f372 2002-09-02 alex ngIRCd - Next Generation IRC Server
4 5170ecf0 2003-03-09 alex (c)2001-2003 by Alexander Barton,
5 28c7f372 2002-09-02 alex alex@barton.de, http://www.barton.de/
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.
10 28c7f372 2002-09-02 alex -- Protocol.txt --
13 384d6b89 2003-04-21 alex I. Compatibility
14 384d6b89 2003-04-21 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.
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.
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".
31 384d6b89 2003-04-21 alex II. The IRC+ Protocol
32 384d6b89 2003-04-21 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.
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.
43 384d6b89 2003-04-21 alex II.1 Register new server link
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)
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.
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.).
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.
61 d329a961 2003-11-30 alex Example for <version>: "0210-IRC+".
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>]".
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!).
74 384d6b89 2003-04-21 alex The following <serverflags> are defined at the moment:
76 d329a961 2003-11-30 alex - C: The server supports the CHANINFO command.
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.
82 384d6b89 2003-04-21 alex - o: IRC operators are allowed to change channel- and channel-user-modes
83 384d6b89 2003-04-21 alex even if they aren't channel-operator of the affected channel.
85 d329a961 2003-11-30 alex - Z: Compressed server links are supported by the server.
87 d329a961 2003-11-30 alex Example for a complete <flags> string: "ngircd|0.7.5:CZ".
89 d329a961 2003-11-30 alex The optional parameter <options> is used to propagate server options as
90 d329a961 2003-11-30 alex defined in RFC 2813, section 4.1.1.
93 384d6b89 2003-04-21 alex II.2 Exchange channel-modes, topics, and persistent channels
95 384d6b89 2003-04-21 alex Command: CHANINFO
96 5f87474a 2005-08-27 alex Parameters: <channel> +<modes> <key> <limit> [<topic>]
97 384d6b89 2003-04-21 alex Used by: servers only
99 384d6b89 2003-04-21 alex CHANINFO is used by servers to inform each other about a channel: its
100 384d6b89 2003-04-21 alex modes, channel key, user limits and its topic. <topic> is optional.
102 384d6b89 2003-04-21 alex If the channel already exists on the server receiving the CHANINFO command,
103 384d6b89 2003-04-21 alex it only adopts the <modes> (or the <topic>) if there are no modes (or topic)
104 384d6b89 2003-04-21 alex already set. It there are already values set the server ignores the
105 384d6b89 2003-04-21 alex corresponding parameter.
107 384d6b89 2003-04-21 alex If the channel doesn't exists at all it will be created.
109 384d6b89 2003-04-21 alex The parameter <key> must be ignored if a channel has no key (the parameter
110 384d6b89 2003-04-21 alex <modes> doesn't list the "k" channel mode). In this case <key> should
111 384d6b89 2003-04-21 alex contain "*" because the parameter <key> is required by the CHANINFO syntax
112 384d6b89 2003-04-21 alex and therefore can't be omitted. The parameter <limit> must be ignored when
113 384d6b89 2003-04-21 alex a channel has no user limit (the parameter <modes> doesn't list the "l"
114 384d6b89 2003-04-21 alex channel mode). In this case <limit> should be "0".
118 5f87474a 2005-08-27 alex $Id: Protocol.txt,v 1.13 2005/08/27 19:00:06 alex Exp $