Permalink
Browse files

Merge branch 'master' into development and fix conflicts

  • Loading branch information...
TomGrobbe committed Sep 2, 2018
2 parents 9273b46 + cb1a36a commit bc4ea4c16fbe8bd8020bd37d8798f784aadac4b0
Showing with 7 additions and 7 deletions.
  1. +5 −5 vMenuServer/BanManager.cs
  2. +1 −1 vMenuServer/MainServer.cs
  3. +1 −1 vMenuServer/UpdateChecker.cs
@@ -360,13 +360,13 @@ private static async Task<bool> AddBan(BanRecord ban)
BannedPlayersList.Add(ban);
var output = JsonConvert.SerializeObject(BannedPlayersList);
var output = JsonConvert.SerializeObject(BannedPlayersList, Formatting.Indented);
while (readingOrWritingToBanFile)
{
await Delay(0);
}
readingOrWritingToBanFile = true;
bool successful = SaveResourceFile(GetCurrentResourceName(), "bans.json", output, output.Length);
bool successful = SaveResourceFile(GetCurrentResourceName(), "bans.json", output, -1);
readingOrWritingToBanFile = false;
return successful;
}
@@ -408,13 +408,13 @@ public static async Task<bool> RemoveBan(BanRecord record)
BannedPlayersList.RemoveAt(i - 1);
}
}
var output = JsonConvert.SerializeObject(BannedPlayersList);
var output = JsonConvert.SerializeObject(BannedPlayersList, Formatting.Indented);
while (readingOrWritingToBanFile)
{
await Delay(0);
}
readingOrWritingToBanFile = true;
bool result = SaveResourceFile(GetCurrentResourceName(), "bans.json", output, output.Length);
bool result = SaveResourceFile(GetCurrentResourceName(), "bans.json", output, -1);
readingOrWritingToBanFile = false;
return result;
}
@@ -507,7 +507,7 @@ public static void BanLog(string banActionMessage)
(date.Minute < 10 ? "0" : "") + date.Minute + ":" +
(date.Second < 10 ? "0" : "") + date.Second;
string outputFile = file + $"[\t{formattedDate}\t] [BAN ACTION] {banActionMessage}\n";
SaveResourceFile(GetCurrentResourceName(), "vmenu.log", outputFile, outputFile.Length);
SaveResourceFile(GetCurrentResourceName(), "vmenu.log", outputFile, -1);
Log(banActionMessage + "\n");
}
}
@@ -825,7 +825,7 @@ private static void KickLog(string kickLogMesage)
(date.Minute < 10 ? "0" : "") + date.Minute + ":" +
(date.Second < 10 ? "0" : "") + date.Second;
string outputFile = file + $"[\t{formattedDate}\t] [KICK ACTION] {kickLogMesage}\n";
SaveResourceFile(GetCurrentResourceName(), "vmenu.log", outputFile, outputFile.Length);
SaveResourceFile(GetCurrentResourceName(), "vmenu.log", outputFile, -1);
Debug.Write(kickLogMesage + "\n");
}
}
@@ -45,7 +45,7 @@ private async void CheckUpdates()
{
Guid uuid = Guid.NewGuid();
UUID = uuid.ToString();
SaveResourceFile(GetCurrentResourceName(), "uuid", UUID, UUID.Length);
SaveResourceFile(GetCurrentResourceName(), "uuid", UUID, -1);
}
// sets the UUID convar.
ExecuteCommand($"sets vMenuUUID {UUID.Substring(0, UUID.LastIndexOf('-'))}");

0 comments on commit bc4ea4c

Please sign in to comment.