aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2022-10-29 13:28:32 -0500
committerJP Dillingham <jpdillingham@gmail.com>2022-10-29 13:28:32 -0500
commita080cbeb6c1151c4a42ee9a0a8852fd7b2ce3f7e (patch)
treed15a0921026aa5a48cc5bfc3f9b199d54ff1c2e9
parentfb13cc5b359852ce3afdedfa293a83665cb18338 (diff)
downloadslskd-a080cbeb6c1151c4a42ee9a0a8852fd7b2ce3f7e.tar.gz
add IsLocalHost
-rw-r--r--src/slskd/Shares/Types/Host.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/slskd/Shares/Types/Host.cs b/src/slskd/Shares/Types/Host.cs
index 50302480..726bde67 100644
--- a/src/slskd/Shares/Types/Host.cs
+++ b/src/slskd/Shares/Types/Host.cs
@@ -37,6 +37,11 @@ namespace slskd.Shares
}
/// <summary>
+ /// Gets a value indicating whether this host is the local host.
+ /// </summary>
+ public bool IsLocalHost => Name == Program.LocalHostName;
+
+ /// <summary>
/// Gets the name of the host.
/// </summary>
/// <remarks>Corresponds to the configured <see cref="Options.InstanceName"/> of the host, or "local" for the local host.</remarks>