Files
HyperbolicDownloader/HyperbolicDownloaderApi/Commands/ClientCommands.cs
T
Stone_Red a2fa7dd3f8 Resolve domains and code structure improvements
- Resolve domains when adding a new host
- Change `NotificationMessageType.Raw` to `NotificationMessageType.Info`
- Fix wrong color when using the `info` command
2022-02-26 15:29:27 +01:00

20 lines
888 B
C#

using HyperbolicDownloaderApi.Managment;
using HyperbolicDownloaderApi.Networking;
namespace HyperbolicDownloaderApi.Commands;
public class ClientCommands
{
public void ShowInfo(string _)
{
if (ApiManager.PublicIpAddress is not null)
{
ApiManager.SendMessageNewLine($"The public IP address is: {ApiManager.PublicIpAddress}", NotificationMessageType.Info);
ApiManager.SendMessageNewLine($"The public port is: {ApiConfiguration.PublicPort}", NotificationMessageType.Info);
ApiManager.SendMessageNewLine(string.Empty, NotificationMessageType.Info);
}
ApiManager.SendMessageNewLine($"The private IP address is: {NetworkUtilities.GetIP4Adress()}", NotificationMessageType.Info);
ApiManager.SendMessageNewLine($"The private port is: {ApiConfiguration.PrivatePort}", NotificationMessageType.Info);
}
}