mirror of
https://github.com/Stone-Red-Code/HyperbolicDownloader.git
synced 2026-09-09 15:56:25 +02:00
Fix output of add host command
This commit is contained in:
@@ -148,9 +148,14 @@ public class HostCommands
|
||||
|
||||
if (recivedHosts is not null)
|
||||
{
|
||||
ApiManager.SendNotificationMessageNewLine($"Success! Added {recivedHosts.Count} new host(s).", NotificationMessageType.Success);
|
||||
hostsManager.AddRange(recivedHosts);
|
||||
hostsManager.Add(new NetworkSocket(ipAddress.ToString(), port, DateTime.Now));
|
||||
int newHosts = hostsManager.AddRange(recivedHosts);
|
||||
|
||||
if (hostsManager.Add(new NetworkSocket(ipAddress.ToString(), port, DateTime.Now)))
|
||||
{
|
||||
newHosts++;
|
||||
}
|
||||
|
||||
ApiManager.SendNotificationMessageNewLine($"Success! Added {newHosts} new host(s).", NotificationMessageType.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user