Page 1 of 1

Messages hubs should send to users they disconnect

Posted: 23 Feb 2011, 17:05
by poy

when a hub wants to disconnect a user for reasons such as "invalid IP", "nick taken" and so on, it has the following choices:
- just disconnect the user.
- send the user a fatal STA message (with a code in the 2xx range), then disconnect.
- send the user a QUI message, then disconnect.
- send the user a fatal STA, then a QUI, then disconnect.
- send the user an MSG, then any variant of the above.

features exclusively provided by fatal STAs:
- an error code.
- send the id of the forbidden command (code 25).
- send the user her correct IP (code 46).
- other similar potential info (see codes 41, 42, 44).

features exclusively provided by QUIs:
- "SID of the initiator" (ID).
- "Time Left until reconnect is allowed" (TL) - one could argue that STAs have this too (code 32) but it is limited to only 1 STA code.
- "Redirect server URL" (RD).

consequently, hubs that may wish to make use of features provided by both fatal STAs and QUIs when disconnecting a user have no other solution but to send both messages. it looks slightly ridiculous to send 2 messages for 1 action.

i propose the following solution:
- remove the ID, TL, RD params from QUI and transfer them to STA.
- hubs MUST send a fatal STA message to users they disconnect. no further communication shall follow a fatal STA.
- hubs will keep using QUI messages to announce that a user has been disconnected to other users still connected to the hub.