ed during network communication
by reducing the length of common message identifiers.
3. Registration and syncronisation
3.1 Server registration and authentication
After a TCP connection has been established, the server initally introduces itself via a "PASS" message as follows:
"PASSWORD" is simply compared with the password present in the destination servers config file, and is used to confirm credentials after the "SERVER" message has been recieved, as follows:PASS :[PASSWORD]
For Example:SERVER [SERVERNAME] [HOPCOUNT] [START TIME] [LINK TIME] [PROTOCOL] [NUMERIC/MAXCONN] :[DESCRIPTION]
Notes:1 2 3 4 5 6 7 8 SERVER irc.undernet.org 1 933022556 947908144 J10 AA]]] :[127.0.0.1] A Undernet Server.
After the connection has been established and verified, the next step is to syncronise the database of client/server/channel information between the two servers.
3.2.1 - SERVER Messages
Server details are transmitted via "SERVER" messages similar to the initial introduction message, with the following format:
[OWNING SERVER PREFIX] S [SERVERNAME] [HOPCOUNT] [START TIME] [LINK TIME] [PROTOCOL] [NUMERIC/MAXCONN] 0 :[DESCRIPTION]The syntax of this message is almost identical to the originally recieved server message, with the only exception being that the message is numeric prefixed, to indicate which server sent this message (and also therefore, which hub this new server is linked too). There is also a fixed "0" present before the Description field, this is a placeholder for future use and currently unused. [Isomer: Question, what IS this reserved for?]
3.2.2 - NICK Messages
Client information is transmitted via "NICK" messages, of the following format:
For Example:[NUMERIC PREFIX] N [NICK] [HOPCOUNT] [TIMESTAMP] [USERNAME] [HOST] <+modes> [BASE64 IP] [NUMERIC] :[USERINFO]1 2 3 4 5 6 7 8 9 10 11Notes:
AF N Client1 1 947957573 User userhost.net +oiwg DAqAoB AFAAA :Generic Client.
- The numeric of the server sending this message. (And hence, owning this client).
- The "NICK" token.
- The nickname of this client, currently max 9 chars.
- The "Hopcount" of this client, Ie: how many servers away it is on.
- The epoch timestamp indicating when the user was created.
- The "User" part of the user@host mask.
- the "Host" part of the user@host mask.
- [Optional]: User modes. If present, this is always +<user modes for this client>. Note that the special +r usermode is followed by the client's account name; see the documentation for ACCOUNT.
- The real IP address of this client, a Base64 encoded 32bit int.
- This client's numeric, in SSCCC format.
- Free format user info line.
3.2.3 - BURST Messages
Channel details and membership information is synchronised in one (or more) BURST messages for each channel that exists, formatted as follows:
[NUMERIC PREFIX] B [CHANNEL] [CREATION TIMESTAMP] <+MODES> <ARG1> <ARG2> [MEMBER LIST] <:%BANS>
1 2 3 4 5 6 7 8 9 AZ B #coder-com 949217470 +tinkl key 56 AAAAA,AAAAB,AAAAC,ABAAA,ABAAB,ABAAC,ACAAA :%*!*@*.net
If the length of a BURST message exceeds the maximum lenght of a line (512 characters) then the remaining channel members/bans are sent in subsequent BURST lines. The subsequent burst lines are only used to add additional members to the channel, and if neccessary, channel bans. There will be no "Mode" parameters present. A sample additional burst line would be:
AZ BURST #coder-com 949217470 ACAAB:o,ACAAD :%*!*another@*.ban.com
Which adds two more opped members and a ban to the channel.
3.2.4 - JUPE Messages
Any currently unexpired JUPEs are transmitted via "JUPE" messages with the following format:
[NUMERIC PREFIX] JU * (+|-)[SERVER NAME] [LIFETIME] [LAST MOD] :[REASON]For example:
1 2 3 4 5 6 7Notes:
AZ JU * +juped.undernet.org 000003593 955419707 :Juped Server
The following table summarises the sequence of events that occur when a server connects to another server. S1 is our server, and S2 is a HUB on the target network.
S1: Sends Password.
S1: Sends initial SERVER message.
S2 Confirms S1 has the correct credentials, and if so, proceeds. If not, S1 is squit with a relevant reason.
S2: Sends Password