Bahamut Protocol Description
This server-to-server protocol description is for Bahamut version 1.8.4.
- Commands are sent in this form
:<prefix> COMMAND <arg1> <arg2> ... :<argN>
- In command lists, argument 0 is the prefix argument. This argument is never noted unless it contains something else than the sender prefix.
Time Stamping (TS)
TS is used to avoid desynchs. There should eventually be a decent text about TS here which explains how bahamut handles TS etc.
Send mode changes for a user or channel. There are subtle differences in syntax between user and channel usage here due to TSMODE.
Arguments for users:
Arguments for channels:
To initiate a connection, one must send the following commands in this order:
- DKEY START (if link-encryption is enabled)
- SVINFO ZIP (if ZIP-links are enabled)
After this sequence the burst will start. Data will be sent in this order:
- All servers known to us (using SERVER)
- All network-wide SQLINEs and SGLINEs (using SQLINE and SGLINE)
- The fake list of servers as shown to users (using LINKSCONTROL)
- Global clone limits (using SVSCLONE)
- BURST command (if BURST is supported as per CAPAB)
- Send all nicks and channels (they can be mixed; using NICK, SJOIN and MODE)
- Usercount-lock information (using LUSERSLOCK)
- A PING command to check when the server is done processing the user/channel burst
When the PONG corresponding to the last PING has been received, the topic burst will start:
- All non-empty channel topics (using TOPIC)
- All away-messages of users being away (using AWAY)
- A PING command to check when the server is done processing the topic burst
When the PONG corresponding to the last PING has been received, all bursting is done. Eventually (when exactly?) the end of burst is sent by sending a BURST command with the current length of the sendqueue as it's only parameter; only if the server supports BURST as per CAPAB ofcourse.
Send the connection password to the other side. This is sent before any other command is sent. It is not required to be sent, but connections without passwords aren't really secure ;)
Inform the server on the other side of the connection about your capabilities. This command should only be sent once. It's arguments are a list (in arbitrary order) of supported CAPAB-tokens. The following tokens are available:
Introduce a new server. Note that the hopcount-argument is optional. If this argument is not included, the server description will be argument 2 and argument 3 will be non-existent.
Contains information on the TS-state of the server or switches the connection to ZIP-mode.
When this command is used to switch into ZIP mode it has "ZIP" as argument 1 and no other arguments. All communication after this line is then to be sent and received zipped.
Arguments for TS-state:
The TS version must be checked after this command has been received. Our current TS version must be at least their minimal TS version accepted, and their current TS version must be at least our minimal TS version accepted. If the TS versions are incompatible the link will have to be dropped.
Sent when a burst is initiated or stopped.
User Management Commands
This is a two-sided command. It can be used either to introduce new users or to send nick changes over the network.
Arguments for nick changes:
In this case the user specified by the sender prefix has their nick changed to the new nickname specified. Internal records should be updated.
Arguments for user introduction:
A new user has connected to the network and should be added the the user list.