Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 44 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,51 @@ soulfind --debug
```


## Missing Features
## Privacy

- Rate limits
- Private rooms
- Distributed search network
Since the Soulseek protocol does not support encryption, Soulfind does not use
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omit "Since " because the protocol has never supported encryption.

This informal language is perfectly understandable when spoken verbally, but it isn't proper written English to use in legal documents sincebecause it can be ambiguous with saying that things were different in the past.

encryption for data delivery nor storage.

### Stored Data

Soulfind servers permanently store the following user data in the database:

- username
- password hash
- upload speed
- number of shared files
- number of shared folders
- ban expiration timestamp
- privilege expiration timestamp
- public room tickers

Soulfind servers temporarily store the following information about connected
users in memory:

- IP address
- listening port
- client version
- away status
- liked and hated items
- joined rooms
- watched users

Soulfind only delivers chat room messages to connected users, and does not
retain them after delivery.

Soulfind temporarily stores private messages in memory until the recipient
acknowledges them, and does not retain them after delivery. Soulfind does not
give owners or admins the ability to access private messages by default.
Copy link
Copy Markdown
Member

@slook slook Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omit " by default" or omit the entire last sentence because the program doesn't contain any such option to do this function whatsoever.

Also consider using "the Soulfind program", "the program" or "the software" or perhaps even modules such as "pm.d", "rooms.d" in place of "Soulfind" to disambiguate from "Soulfind Contributors", otherwise it might not be clear as to whom or what this entity is referring and if that entity could be wrongly construed as an organisation rather than the actual program itself.


README.md ought to remain targeted only towards developers, owners and admins, because we don't want to end up in a position of providing information to their users nor processing queries from them...

Consider placing the entire Privacy section in a new document such as PRIVACY.md because it is long and irrelevant unless a server is deployed by a third-party for access by end-users, in which case a standalone document would be easier for owners to modify and, as they see fit, to publish, for example by:

  • serving it over http(s) on the owner's website,
  • including it in the MOTD with a %%privacy%% placeholder,
  • the user profile about me text for the 'server' user info,
  • in a private message response to a user command such as privacy or userinfo server.

It should also be mentioned that the Soulfind Contributors are not data controllers and so are unable to suggest or enforce any policy for the services that are provided by server owners who become data controllers if they wish to deploy the software in accordance to the GPL (i.e. at their own risk and without any warranty of any kind, etc).


### Manage Data

Users can inspect and delete their personal data on the server by sending
commands in a private chat with the `server` user.

The following commands are available:

- `exportdata`: Export personal data in JSON format (TODO)
- `deleteaccount`: Delete Soulseek account


## Authors
Expand Down
43 changes: 32 additions & 11 deletions src/server/server.d
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,9 @@ final class Server
if (user.username in users) {
// If the user was removed from the database, perform
// server-side removal and disconnection of deleted
// users. Send a Relogged message first to prevent the
// user's client from automatically reconnecting and
// registering again.
// users.
const deleted = !db.user_exists(user.username);
if (deleted) {
scope relogged_msg = new SRelogged();
user.send_message(relogged_msg);
del_user(user, deleted);
}
if (deleted) del_user(user, deleted);
}
else if (user.login_timed_out) {
del_user(user);
Expand Down Expand Up @@ -575,7 +569,7 @@ final class Server
users[user.username] = user;
}

void del_user(User user, bool delete_messages = false)
void del_user(User user, bool permanent = false)
{
if (user.removed)
return;
Expand All @@ -586,10 +580,16 @@ final class Server
if (username in users)
users.remove(username);

if (delete_messages) {
if (permanent) {
// Send a Relogged message first to prevent the user's client from
// automatically reconnecting and registering again.
scope relogged_msg = new SRelogged();
user.send_message(relogged_msg);

const include_received = true;
del_user_pms(username, include_received);
del_user_tickers(username);
db.del_user(username);
}

if (user.status == Status.offline) {
Expand Down Expand Up @@ -809,8 +809,29 @@ final class Server
server_pm(
sender_username,
"Available commands :"
~ " None"
~ "\n\ndeleteaccount\n\tDelete your Soulseek account"
);
break;

case "deleteaccount":
if (command.length < 2
|| command.length > 2
|| command[1] != "confirm") {
server_pm(
sender_username,
"Type 'deleteaccount confirm' to delete your Soulseek "
~ "account"
);
break;
}
const permanent = true;
auto user = get_user(sender_username);

server_pm(
sender_username,
"Your Soulseek account has been deleted"
);
del_user(user, permanent);
break;

default:
Expand Down
Loading