Skip to content
Permalink
Browse files

Make sure to set UserAgent for http requests, 1 less hardcoded constant

  • Loading branch information...
UnknownShadow200 committed Jun 5, 2017
1 parent 87d4236 commit 162cb5ce0d813618b521c41d1d06cc4521e2a4f5
Showing with 5 additions and 1 deletion.
  1. +1 −1 fCraft/Player/Chat.cs
  2. +4 −0 fCraft/System/Utils/Updater.cs
@@ -676,7 +676,7 @@ public static string ReplaceTextKeywords([NotNull] Player player, [NotNull] stri

sb.Replace("{WORLDS}", WorldManager.Worlds.Length.ToStringInvariant());
sb.Replace("{MOTD}", ConfigKey.MOTD.GetString());
sb.Replace("{VERSION}", "1.23");
sb.Replace("{VERSION}", Updater.LatestStable);
sb.Replace("{TIMESPLAYED}", player.Info.TimesVisited.ToString());
sb.Replace("{TOTALTIME}", player.Info.TotalTime.ToMiniString());
if (input.IndexOfOrdinal("{PLAYER") != -1)
@@ -25,6 +25,10 @@ public static class Updater {
| ReleaseFlags.Dev
#endif
);

static Updater() {
UserAgent = "ProCraft " + LatestStable;
}

/// <summary> User-agent value used for HTTP requests (heartbeat, updater, external IP check, etc).
/// Defaults to "ProCraft + VersionString of the current release. </summary>

0 comments on commit 162cb5c

Please sign in to comment.
You can’t perform that action at this time.