From 10ede0a7faddb43f574f1c9f90c0ce46a5cac633 Mon Sep 17 00:00:00 2001 From: Bitl Date: Mon, 27 Sep 2021 14:26:27 -0700 Subject: [PATCH] oops again --- .../StorageAndFunctions/GlobalFuncs.cs | 43 +++++++++---------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs index df34ded..212cb7e 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs @@ -657,35 +657,32 @@ public class GlobalFuncs throw clientNotFoundEX; } - if (GlobalVars.AdminMode) + string ClientMD5 = File.Exists(path + ClientName) ? SecurityFuncs.GenerateMD5(path + ClientName) : ""; + + if (!string.IsNullOrWhiteSpace(ClientMD5)) { - string ClientMD5 = File.Exists(path + ClientName) ? SecurityFuncs.GenerateMD5(path + ClientName) : ""; + DefaultClientInfo.ClientMD5 = ClientMD5.ToUpper(CultureInfo.InvariantCulture); + } + else + { + IOException clientNotFoundEX = new IOException("Could not find client exe for MD5 generation."); + throw clientNotFoundEX; + } - if (!string.IsNullOrWhiteSpace(ClientMD5)) - { - DefaultClientInfo.ClientMD5 = ClientMD5.ToUpper(CultureInfo.InvariantCulture); - } - else - { - IOException clientNotFoundEX = new IOException("Could not find client exe for MD5 generation."); - throw clientNotFoundEX; - } + string ClientScriptMD5 = File.Exists(path + "\\content\\scripts\\" + GlobalPaths.ScriptName + ".lua") ? SecurityFuncs.GenerateMD5(path + "\\content\\scripts\\" + GlobalPaths.ScriptName + ".lua") : ""; - string ClientScriptMD5 = File.Exists(path + "\\content\\scripts\\" + GlobalPaths.ScriptName + ".lua") ? SecurityFuncs.GenerateMD5(path + "\\content\\scripts\\" + GlobalPaths.ScriptName + ".lua") : ""; - - if (!string.IsNullOrWhiteSpace(ClientScriptMD5)) - { - DefaultClientInfo.ScriptMD5 = ClientScriptMD5.ToUpper(CultureInfo.InvariantCulture); - } - else - { - IOException clientNotFoundEX = new IOException("Could not find script file for MD5 generation."); - throw clientNotFoundEX; - } + if (!string.IsNullOrWhiteSpace(ClientScriptMD5)) + { + DefaultClientInfo.ScriptMD5 = ClientScriptMD5.ToUpper(CultureInfo.InvariantCulture); + } + else + { + IOException clientNotFoundEX = new IOException("Could not find script file for MD5 generation."); + throw clientNotFoundEX; } string desc = "This client information file for '" + GlobalVars.UserConfiguration.SelectedClient + - "' was pre-generated by Novetus for your convienence. If you experience any issues with the default settings, load this clientinfo.nov file into the Client SDK."; + "' was pre-generated by Novetus for your convienence. You will need to load and save this clientinfo.nov file into the Client SDK."; DefaultClientInfo.Description = desc;