editfriends — Add, edit, or delete friends from the user's friends list.
Add, edit, or delete friends from the user's friends list.
The protocol request mode: editfriends
Username. Leading and trailing whitespace is ignored, as is case.
The authentication method used for this request. Default is 'clear', for plain-text authentication. 'cookie' or any of the challenge / response methods are also acceptable.
DEPRECATED. Password in plain-text. For the default authentication method, either this needs to be sent, or hpassword.
DEPRECATED. Alternative to plain-text password. Password as an MD5 hex digest. Not perfectly secure, but defeats the most simple of network sniffers.
If using challenge / response authentication, this should be the challenge that was generated for your client.
If using challenge / response authentication, this should be the response hash you generate based on the challenge's formula.
(Optional) Protocol version supported by the client; assumed to be 0 if not specified. See Chapter 11: Protocol Versions for details on the protocol version.
Sending a variable of this form removes the friend user from the user's friend list. It is not an error to delete an already non-existant friend. The value should just be 1.
To add a friend, send a variable of this form, where i is any unique integer. The value is the username of the friend to add.
(Optional) Sets the text color of the friend i being added. This value is a HTML-style hex-triplet, and must either be of the form #rrggbb or not sent at all. By default, the value assumed is #000000, black.
(Optional) Sets the background color of the friend i being added. This value is a HTML-style hex-triplet, and must either be of the form #rrggbb or not sent at all. By default, the value assumed is #FFFFFF, white.
(Optional) Sets this user's groupmask. Only use this in clients if you've very recently loaded the friend groups. If your client has been loaded on the end user's desktop for days and you haven't loaded friend groups since it started, they may be inaccurate if they've modified their friend groups through the website or another client. In general, don't use this key unless you know what you're doing.
OK on success or FAIL when there's an error. When there's an error, see errmsg for the error text. The absence of this variable should also be considered an error.
The error message if success was FAIL, not present if OK. If the success variable isn't present, this variable most likely won't be either (in the case of a server error), and clients should just report "Server Error, try again later.".
The number of friends that were added with this transaction. The records returned indicate which friends were added, along with their names, named using a 1-based index. (from 1 .. friends_added)
The username of the nth friend that was added.
The name of the nth friend that was added.