Skip to content

Commit

Permalink
Use string interpolation in DedicatedServer
Browse files Browse the repository at this point in the history
  • Loading branch information
tuokri committed Mar 9, 2024
1 parent b767ac2 commit 723a6c0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions DedicatedServer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

if (DateTime.UtcNow > (lastUpdate + TimeSpan.FromSeconds(60)))
{
Console.WriteLine("updating...");
Console.WriteLine("updating status...");
Console.WriteLine($"Public IP: {client.PublicIP}");
SendStatusUpdate();
lastUpdate = DateTime.UtcNow;
Expand Down Expand Up @@ -128,16 +128,16 @@ void OnConnected(SteamClient.ConnectedCallback callback)

void OnDisconnected(SteamClient.DisconnectedCallback callback)
{
Console.WriteLine("disconnected from Steam: {0}", callback.UserInitiated);
Console.WriteLine($"disconnected from Steam: {callback.UserInitiated}");
isRunning = false;
}

void OnLoggedOn(SteamUser.LoggedOnCallback callback)
{
if (callback.Result != EResult.OK)
{
Console.WriteLine("unable to logon to Steam: {0} / {1}", callback.Result,
callback.ExtendedResult);
Console.WriteLine(
$"unable to logon to Steam: {callback.Result} / {callback.ExtendedResult}");

isRunning = false;
return;
Expand All @@ -150,12 +150,12 @@ void OnLoggedOn(SteamUser.LoggedOnCallback callback)

void OnLoggedOff(SteamUser.LoggedOffCallback callback)
{
Console.WriteLine("logged off of Steam: {0}", callback.Result);
Console.WriteLine($"logged off of Steam: {callback.Result}");
}

void OnStatusReply(SteamGameServer.StatusReplyCallback callback)
{
Console.WriteLine("StatusReplyCallback: IsSecure={0}", callback.IsSecure);
Console.WriteLine($"StatusReplyCallback: IsSecure={callback.IsSecure}");
}

void OnTicketAuth(SteamGameServer.TicketAuthCallback callback)
Expand All @@ -180,6 +180,6 @@ internal class DebugLogListener : IDebugListener
{
public void WriteLine(string category, string msg)
{
Console.WriteLine("DebugLog: {0}: {1}", category, msg);
Console.WriteLine($"DebugLog: {category}: {msg}");
}
}

0 comments on commit 723a6c0

Please sign in to comment.