Changeset 537 in code for trunk


Ignore:
Timestamp:
May 25, 2021, 2:56:38 PM (4 years ago)
Author:
contact
Message:

Vendor BATCH bouncer-networks type

And add the prefix throughout the spec, to make it clear the unprefixed
version is not to be used.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/ext/bouncer-networks.md

    r535 r537  
    2828## Description
    2929
    30 This document describes the `bouncer-networks` extension. This enables clients
    31 to discover servers that are bouncers, list and edit upstream networks the
    32 bouncer is connected to.
     30This document describes the `soju.im/bouncer-networks` extension. This enables
     31clients to discover servers that are bouncers, list and edit upstream networks
     32the bouncer is connected to.
    3333
    3434Each network has a unique per-user ID called "netid". It MUST NOT change during
     
    4040## Implementation
    4141
    42 The `bouncer-networks` extension defines a new `RPL_ISUPPORT` token and a new
    43 `BOUNCER` command.
    44 
    45 The `bouncer-networks` capability MUST be negociated. This allows the server and
    46 client to behave differently when the client is aware of the bouncer networks.
    47 
    48 The `bouncer-networks-notify` capability MAY be negociated. This allows the
    49 client to signal that it is capable of receiving and correctly processing
     42The `soju.im/bouncer-networks` extension defines a new `RPL_ISUPPORT` token and
     43a new `BOUNCER` command.
     44
     45The `soju.im/bouncer-networks` capability MUST be negociated. This allows the
     46server and client to behave differently when the client is aware of the bouncer
     47networks.
     48
     49The `soju.im/bouncer-networks-notify` capability MAY be negociated. This allows
     50the client to signal that it is capable of receiving and correctly processing
    5051bouncer network notifications.
    5152
     
    5556Its optional value is the network ID bound for the current connection.
    5657
    57 ### `bouncer-networks` batch
    58 
    59 The `bouncer-networks` batch does not take any parameter and can only contain
    60 `BOUNCER NETWORK` messages.
     58### `soju.im/bouncer-networks` batch
     59
     60The `soju.im/bouncer-networks` batch does not take any parameter and can only
     61contain `BOUNCER NETWORK` messages.
    6162
    6263### `BOUNCER` command
     
    8081    BOUNCER LISTNETWORKS
    8182
    82 The server replies with a `bouncer-networks` batch, containing any number of
    83 `BOUNCER NETWORK` messages:
     83The server replies with a `soju.im/bouncer-networks` batch, containing any
     84number of `BOUNCER NETWORK` messages:
    8485
    8586    BOUNCER NETWORK <netid> <attributes>
     
    135136### Network notifications
    136137
    137 If the client has negociated the `bouncer-networks-notify` capability, the
    138 server MUST send an initial batch of `BOUNCER NETWORK` messages with the current
    139 list of network, and MUST send notification messages whenever a network is
    140 added, updated or removed.
    141 
    142 If the client has not negociated the `bouncer-networks-notify` capability, the
    143 server MUST NOT send implicit `BOUNCER NETWORK` messages.
     138If the client has negociated the `soju.im/bouncer-networks-notify` capability,
     139the server MUST send an initial batch of `BOUNCER NETWORK` messages with the
     140current list of network, and MUST send notification messages whenever a network
     141is added, updated or removed.
     142
     143If the client has not negociated the `soju.im/bouncer-networks-notify`
     144capability, the server MUST NOT send implicit `BOUNCER NETWORK` messages.
    144145
    145146When network attributes are updated, the bouncer MUST broadcast a
    146147`BOUNCER NETWORK` message with the updated attributes to all connected clients
    147 with the `bouncer-networks-notify` capability enabled:
     148with the `soju.im/bouncer-networks-notify` capability enabled:
    148149
    149150    BOUNCER NETWORK <netid> <attributes>
     
    153154When a network is removed, the bouncer MUST broadcast a `BOUNCER NETWORK`
    154155message with the special argument `*` to all connected clients with the
    155 `bouncer-networks-notify` capability enabled:
     156`soju.im/bouncer-networks-notify` capability enabled:
    156157
    157158    BOUNCER NETWORK <netid> *
     
    251252    C: NICK emersion
    252253    C: USER emersion 0 0 :Simon
    253     S: CAP * LS :sasl=PLAIN bouncer-networks bouncer-networks-notify
    254     C: CAP REQ :sasl bouncer-networks
     254    S: CAP * LS :sasl=PLAIN soju.im/bouncer-networks soju.im/bouncer-networks-notify
     255    C: CAP REQ :sasl soju.im/bouncer-networks
    255256    [SASL authentication]
    256257    C: BOUNCER BIND 42
     
    260261
    261262    C: BOUNCER LISTNETWORKS
    262     S: BATCH +asdf bouncer-networks
     263    S: BATCH +asdf soju.im/bouncer-networks
    263264    S: @batch=asdf BOUNCER NETWORK 42 name=Freenode;state=connected
    264265    S: @batch=asdf BOUNCER NETWORK 43 name=My\sAwesome\sNetwork;state=disconnected
  • trunk/downstream.go

    r535 r537  
    10691069                        Prefix:  dc.srv.prefix(),
    10701070                        Command: "BATCH",
    1071                         Params:  []string{"+networks", "bouncer-networks"},
     1071                        Params:  []string{"+networks", "soju.im/bouncer-networks"},
    10721072                })
    10731073                dc.user.forEachNetwork(func(network *network) {
     
    20482048                                Prefix:  dc.srv.prefix(),
    20492049                                Command: "BATCH",
    2050                                 Params:  []string{"+networks", "bouncer-networks"},
     2050                                Params:  []string{"+networks", "soju.im/bouncer-networks"},
    20512051                        })
    20522052                        dc.user.forEachNetwork(func(network *network) {
Note: See TracChangeset for help on using the changeset viewer.