IRCd:Bahamut:Protocol

From Anope Wiki

Jump to: navigation, search

Contents


Bahamut Protocol Description

This server-to-server protocol description is for Bahamut version 1.8.4.


Basic Concepts

General Notes

  • 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.


Modes

User Modes

All Users Description
+i User is 'invisible'
+w User can see wallops messages
+r User is registered/identified to services
+s User can see oper kill messages
+R User will not receive messages from -r clients
Opers Description
+a Designates the user as being a services administrator
+A User is a server administrator
+b User can see chatops messages
+c User can see client connections and exists
+d User can see debug messages
+e User can see dccallow failure notices
+f User can see flood messages
+F User can bypass the ircd's recvq throttling
+g User can receive globops messages
+h User is available for help, being listed in /stats P
+j User can see rejected connection notices
+k User can see server kill messages
+K User can see U:lined kill messages
+m User can see spambot notices
+n User can see routing notices
+o User is a global IRC operator
+O User is a local IRC operator
+y User can see certain information requests (e.g. /stats)


Channel Modes

State Description
+s Channel is secret
+p Channel is private
+m Channel is moderated, only voiced users and channel operators can talk
+t Only channel operators can change the topic
+i Channel is invite-only
+n Messages sent by users not in the channel will not be delivered
+R Only registered users can join the channel
+c Block all messages containing control characters (bold, underline, color, etc)
+O Only IRC operators can join the channel
+M Channel is moderated, only registered users can talk
+L Channel is listed in /list (disabled at compile-time by default)
+l n Channel size is limited to n users
+k s Channel can only be joined by supplying the correct key k
+j n:s Join throttling is enabled, only n users every s seconds can join the channel
Access Description
+v Voiced user
+o Channel operator
Lists Description
+b Bans, all users matching a user@host mask on this list will be blocked from joining
+e Exemptions, any user matching a user@host mask on this list is exempt from any bans
+I Invex, any user matching a user@host mask on this list is permanently invited into the channel


MODE

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:

1 Target nickname
2 Modes to be changed

Arguments for channels:

1 Target channel
2 Channel TS
3 Modes to be changed
4 .. N Parameters for the changed modes when required


Connection Management

To initiate a connection, one must send the following commands in this order:

  • PASS
  • CAPAB
  • SERVER
  • SVINFO
  • 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.


PASS

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 ;)

Arguments:

1 Password
2 (optional) String "TS" if TS is supported)


CAPAB

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:

CAPAB-token Description
SSJOIN Server supports SJOIN commands (mandatory)
NOQUIT Server can find out affected users after receiving a SQUIT and handle it internally; no need to send all seperate QUITs to this server as well
BURST Server can send and understand BURST commands
UNCONNECT Support UNCONNECT (at the moment, does nothing)
DKEY Server supports RC4(?) encryption
ZIP Server supports zipped connection
NICKIP Send the IP of a new client in it's NICK-line (mandatory)
TSMODE Include a timestamp in mode changes for channels (mandatory)


SERVER

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.

Arguments:

1 Server name of the new server
2 (optional) Hopcount of the new server
3 Server description of the new server


SVINFO

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:

1 Current TS version in use by the server
2 Minimal TS version accepted by the server
3 "Server is standalone or connected to non-TS only"? (unused, always 0 apparently)
4 UTC time as reported by this server

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.


BURST

Sent when a burst is initiated or stopped.

Arguments:

1 "SendQ if an EOB"


User Management Commands

NICK

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:

1 New nickname
2 Timestamp

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:

1 nickname
2 Hopcount
3 Timestamp
4 User modes
5 Username
6 Hostname
7 Server
8 Services ID
9 Long IP
10 Realname

A new user has connected to the network and should be added the the user list.

Personal tools