Skip to content

Commit

Permalink
Removed some debug logs + fixed server started message
Browse files Browse the repository at this point in the history
  • Loading branch information
trippyone committed Jun 20, 2024
1 parent 7e8ec96 commit 0e5d79f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
13 changes: 12 additions & 1 deletion Fika.Core/Networking/FikaServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,18 @@ public async Task Init()

logger.LogInfo("Started Fika Server");

NotificationManagerClass.DisplayMessageNotification($"Server started on port {_netServer.LocalPort}.",
string serverStartedMessage;

if(FikaPlugin.UseNatPunching.Value)
{
serverStartedMessage = "Server started using Nat Punching.";
}
else
{
serverStartedMessage = $"Server started on port {_netServer.LocalPort}.";
}

NotificationManagerClass.DisplayMessageNotification(serverStartedMessage,
EFT.Communications.ENotificationDurationType.Default, EFT.Communications.ENotificationIconType.EntryPoint);

string[] Ips = [];
Expand Down
1 change: 0 additions & 1 deletion Fika.Core/Networking/NatPunch/FikaNatPunchServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ private void ProcessMessage(string data)
{
IPEndPoint clientIpEndPoint = new IPEndPoint(IPAddress.Parse(getHostStunRequest.StunIp), getHostStunRequest.StunPort);

EFT.UI.ConsoleScreen.Log($"punching this bad boy:{clientIpEndPoint}");
NatPunchUtils.PunchNat(_netManager, clientIpEndPoint);

SendHostStun(getHostStunRequest.SessionId, _stunIpEndPoint);
Expand Down
2 changes: 0 additions & 2 deletions Fika.Core/Networking/NatPunch/NatPunchUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ public static async void StunQueryRoutine(NetManager netManager, FikaNatPunchSer

netManager.Start(stunIpEndPoint.Local.Port);

ConsoleScreen.Log($"Remote IP set: {stunIpEndPoint.Remote}");

await Task.Delay(TimeSpan.FromSeconds(60));
}
}
Expand Down

0 comments on commit 0e5d79f

Please sign in to comment.