aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lo Nigro <d@d.sb>2022-03-18 17:04:17 -0700
committerDaniel Lo Nigro <d@d.sb>2022-03-18 17:04:17 -0700
commit49cc058ea14435718abf2e95e36b8ef6c12b27bf (patch)
tree53426ead9f608b1d53bbbcc7917d72aad3a51d99
parent0464030d853df284b97c8e12fd1338f9bf9649a3 (diff)
downloadslskd-49cc058ea14435718abf2e95e36b8ef6c12b27bf.tar.gz
Allow user description to be customized
-rw-r--r--config/slskd.example.yml2
-rw-r--r--src/slskd/Application.cs2
-rw-r--r--src/slskd/Options.cs9
3 files changed, 12 insertions, 1 deletions
diff --git a/config/slskd.example.yml b/config/slskd.example.yml
index 21c95076..e0704fdd 100644
--- a/config/slskd.example.yml
+++ b/config/slskd.example.yml
@@ -73,6 +73,8 @@
# soulseek:
# username: ~
# password: ~
+# description: |
+# A slskd user. https://github.com/slskd/slskd
# listen_port: 50000
# diagnostic_level: Info
# distributed_network:
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs
index 72478bde..6b95c98b 100644
--- a/src/slskd/Application.cs
+++ b/src/slskd/Application.cs
@@ -905,7 +905,7 @@ namespace slskd
private Task<UserInfo> UserInfoResolver(string username, IPEndPoint endpoint)
{
var info = new UserInfo(
- description: $"Soulseek.NET Web Example! also, your username is {username}, and IP endpoint is {endpoint}",
+ description: Options.Soulseek.Description,
uploadSlots: 1,
queueLength: 0,
hasFreeUploadSlot: false);
diff --git a/src/slskd/Options.cs b/src/slskd/Options.cs
index 64ca494f..a2c04333 100644
--- a/src/slskd/Options.cs
+++ b/src/slskd/Options.cs
@@ -695,6 +695,15 @@ namespace slskd
public string Password { get; init; } = null;
/// <summary>
+ /// Gets the description of the Soulseek user.
+ /// </summary>
+ [Argument(default, "slsk-description")]
+ [EnvironmentVariable("SLSK_DESCRIPTION")]
+ [Description("user description for the Soulseek network")]
+ [RequiresReconnect]
+ public string Description { get; init; } = "A slskd user. https://github.com/slskd/slskd";
+
+ /// <summary>
/// Gets the port on which to listen for incoming connections.
/// </summary>
[Argument(default, "slsk-listen-port")]