Update references to MOTD to point to the variable, instead of having magic strings.

This commit is contained in:
DogooFalchion 2016-10-22 17:37:00 -04:00
parent 8f7b8db2a1
commit 6242a54603
4 changed files with 5 additions and 5 deletions

View file

@ -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)

View file

@ -40,7 +40,7 @@ namespace TShockAPI
/// </summary>
internal static string MotdPath
{
get { return Path.Combine(TShock.SavePath, "motd.txt"); }
get { return Path.Combine(TShock.SavePath, FileTools.MotdPath); }
}
/// <summary>

View file

@ -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");

View file

@ -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")