2024-10-16 16:12:41 -04:00
|
|
|
# Introduction
|
|
|
|
`ADD` is a command introduced with [MSNP2](../versions/msnp2.md).
|
|
|
|
|
|
|
|
It is a Notification Server command, without a request or response payload.
|
|
|
|
|
2024-10-21 12:30:22 -04:00
|
|
|
Adds a user to a list. Replaced by [ADL](adl.md) in [MSNP10](../versions/msnp10.md).
|
2024-10-16 16:12:41 -04:00
|
|
|
|
|
|
|
# Client/Request
|
|
|
|
`ADD TrID [ FL | AL | BL ] user-handle custom-friendly-name {group}`
|
|
|
|
|
|
|
|
Where `user-handle` is the relevant user's handle.
|
|
|
|
|
|
|
|
Where `custom-friendly-name` is the friendly name of this user you'd like to store in this list.
|
|
|
|
|
|
|
|
Where `group` is the group to add the user to.
|
|
|
|
Only applies for Forward List (FL). Since [MSNP7](../versions/msnp7.md).
|
|
|
|
|
|
|
|
# Server/Response
|
|
|
|
`ADD TrID [ FL | AL | BL | RL ] list-version user-handle custom-friendly-name {group}`
|
|
|
|
|
|
|
|
If this is an asynchronous use of this command, the Transaction ID (or `TrID`) will be set to `0`.
|
|
|
|
|
|
|
|
Where `list-version` is the new List Version.
|
|
|
|
|
|
|
|
# Examples
|
|
|
|
|
|
|
|
## Normal use
|
|
|
|
|
|
|
|
### Without groups
|
|
|
|
```
|
|
|
|
C: ADD 1 FL anotheruser@hotmail.com anotheruser@hotmail.com
|
|
|
|
S: ADD 1 FL 256 anotheruser@hotmail.com anotheruser@hotmail.com
|
|
|
|
C: ADD 2 AL anotheruser@hotmail anotheruser@hotmail.com
|
|
|
|
S: ADD 2 AL 257 anotheruser@hotmail.com anotheruser@hotmail.com
|
|
|
|
```
|
|
|
|
|
|
|
|
### With groups
|
|
|
|
*Since [MSNP7](../versions/msnp7.md).*
|
|
|
|
```
|
|
|
|
C: ADD 3 FL anotheruser@hotmail.com anotheruser@hotmail.com 0
|
|
|
|
S: ADD 3 FL 256 anotheruser@hotmail.com anotheruser@hotmail.com 0
|
|
|
|
C: ADD 4 AL anotheruser@hotmail anotheruser@hotmail.com
|
|
|
|
S: ADD 4 AL 257 anotheruser@hotmail.com anotheruser@hotmail.com
|
|
|
|
```
|
|
|
|
|
|
|
|
## Invalid handle
|
|
|
|
```
|
|
|
|
C: ADD 5 FL a@b a@b
|
|
|
|
S: 201 5
|
|
|
|
```
|
|
|
|
|
|
|
|
## Account not found
|
|
|
|
```
|
|
|
|
C: ADD 6 FL ghost@hotmail.com ghost@hotmail.com
|
2024-10-21 12:30:22 -04:00
|
|
|
S: 205 6
|
2024-10-16 16:12:41 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
## Target list is full
|
|
|
|
```
|
2024-10-21 12:30:22 -04:00
|
|
|
C: ADD 7 FL stuffed@hotmail.com stuffed@hotmail.com
|
|
|
|
S: 210 7
|
2024-10-16 16:12:41 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
## User already in that list
|
|
|
|
```
|
2024-10-21 12:30:22 -04:00
|
|
|
C: ADD 8 FL anotheruser@hotmail.com anotheruser@hotmail.com
|
|
|
|
S: 215 8
|
2024-10-16 16:12:41 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
## User can not be in both lists
|
|
|
|
```
|
2024-10-21 12:30:22 -04:00
|
|
|
C: ADD 9 BL anotheruser@hotmail.com anotheruser@hotmail.com
|
|
|
|
S: 219 9
|
2024-10-16 16:12:41 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
## Group doesn't exist
|
|
|
|
*Since [MSNP7](../versions/msnp7.md).*
|
|
|
|
```
|
2024-10-21 12:30:22 -04:00
|
|
|
C: ADD 10 FL anotheruser@hotmail.com anotheruser@hotmail.com 31
|
|
|
|
S: 224 10
|
2024-10-16 16:12:41 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
## You can not modify the Reverse List
|
|
|
|
```
|
2024-10-21 12:30:22 -04:00
|
|
|
C: ADD 11 RL anotheruser@hotmail.com anotheruser@hotmail.com
|
2024-10-16 16:12:41 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
Server disconnects client.
|
|
|
|
|
|
|
|
## Removed
|
|
|
|
```
|
2024-10-21 12:30:22 -04:00
|
|
|
C: ADD 12 FL anotheruser@hotmail.com anotheruser@hotmail.com
|
2024-10-16 16:12:41 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
Server disconnects client.
|
|
|
|
|
|
|
|
## Asynchronous update
|
|
|
|
```
|
|
|
|
C: ADD 0 RL 258 anotheruser@hotmail.com anotheruser@hotmail.com
|
|
|
|
```
|
|
|
|
|
|
|
|
# Known changes
|
|
|
|
* [MSNP7](../versions/msnp7.md): Now supports groups if target list is Forward List.
|
2024-10-21 12:30:22 -04:00
|
|
|
* [MSNP10](../versions/msnp10.md): Removed (automatic disconnect). Use [ADL](adl.md) instead.
|