diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 2fcfa3c7..a7dfef83 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -4806,7 +4806,7 @@ namespace TShockAPI private static void Motd(CommandArgs args) { - TShock.Utils.ShowFileToUser(args.Player, "motd.txt"); + TShock.Utils.ShowFileToUser(args.Player, FileTools.MotdPath); } private static void Rules(CommandArgs args) diff --git a/TShockAPI/FileTools.cs b/TShockAPI/FileTools.cs index a85c269f..159f6a71 100644 --- a/TShockAPI/FileTools.cs +++ b/TShockAPI/FileTools.cs @@ -40,7 +40,7 @@ namespace TShockAPI /// internal static string MotdPath { - get { return Path.Combine(TShock.SavePath, "motd.txt"); } + get { return Path.Combine(TShock.SavePath, FileTools.MotdPath); } } /// diff --git a/TShockAPI/Rest/RestManager.cs b/TShockAPI/Rest/RestManager.cs index d74aa6c5..2bbc5e24 100644 --- a/TShockAPI/Rest/RestManager.cs +++ b/TShockAPI/Rest/RestManager.cs @@ -280,7 +280,7 @@ namespace TShockAPI [Token] private object ServerMotd(RestRequestArgs args) { - string motdFilePath = Path.Combine(TShock.SavePath, "motd.txt"); + string motdFilePath = Path.Combine(TShock.SavePath, FileTools.MotdPath); if (!File.Exists(motdFilePath)) return this.RestError("The motd.txt was not found.", "500"); diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 2d3c4026..3ca45e51 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1173,7 +1173,7 @@ namespace TShockAPI { if (args.Handled) return; - + if (!Config.AllowCrimsonCreep && (args.Type == TileID.Dirt || args.Type == TileID.FleshWeeds || TileID.Sets.Crimson[args.Type])) { @@ -1577,7 +1577,7 @@ namespace TShockAPI if (Config.DisplayIPToAdmins) Utils.SendLogs(string.Format("{0} has joined. IP: {1}", player.Name, player.IP), Color.Blue); - Utils.ShowFileToUser(player, "motd.txt"); + Utils.ShowFileToUser(player, FileTools.MotdPath); string pvpMode = Config.PvPMode.ToLowerInvariant(); if (pvpMode == "always")