From 40df1e5ef8978d823146d3c2f8ebabe1d63890b1 Mon Sep 17 00:00:00 2001 From: RainOrigami Date: Mon, 2 Oct 2023 15:54:44 +0200 Subject: [PATCH] Bump to 1.1.0 --- BBRAPIModules/BBRAPIModules.csproj | 2 +- BattleBitAPIRunner/Program.cs | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/BBRAPIModules/BBRAPIModules.csproj b/BBRAPIModules/BBRAPIModules.csproj index fef025d..383266a 100644 --- a/BBRAPIModules/BBRAPIModules.csproj +++ b/BBRAPIModules/BBRAPIModules.csproj @@ -6,7 +6,7 @@ enable True BattleBit Remastered Modular Community Server API - 1.1.1 + 1.1.0 $(AssemblyVersion) $(AssemblyVersion) RainOrigami diff --git a/BattleBitAPIRunner/Program.cs b/BattleBitAPIRunner/Program.cs index b0def88..54fa4ea 100644 --- a/BattleBitAPIRunner/Program.cs +++ b/BattleBitAPIRunner/Program.cs @@ -31,14 +31,12 @@ static void Main(string[] args) private List servers = new(); private ServerListener serverListener = new(); private Dictionary watchedFiles = new(); - private Permissions permissions = null!; public Program() { configureLogger(); loadConfiguration(); validateConfiguration(); - loadPermissions(); this.logger.Info("Loading dependencies"); loadDependencies(); loadModules(); @@ -51,14 +49,6 @@ public Program() Thread.Sleep(-1); } - private void loadPermissions() - { - this.permissions = new(configuration.ConfigurationPath); - this.watchedFiles.Add(Path.Combine(this.configuration.ConfigurationPath, Permissions.PermissionsFile), (string.Empty, DateTime.MinValue)); - this.watchedFiles.Add(Path.Combine(this.configuration.ConfigurationPath, Permissions.PlayerPermissionsFile), (string.Empty, DateTime.MinValue)); - this.watchedFiles.Add(Path.Combine(this.configuration.ConfigurationPath, Permissions.PlayerGroupsFile), (string.Empty, DateTime.MinValue)); - } - private void configureLogger() { string log4netConfig = "log4net.config"; @@ -213,7 +203,6 @@ private void consoleCommandHandler() return; } - // TODO: Make proper console handler ncurses style (separate line for input, rest of window for output) while (true) { string? command = Console.ReadLine(); @@ -243,11 +232,6 @@ private void consoleCommandHandler() instances.Add(moduleInstance); moduleInstance.OnConsoleCommand(command); } - - foreach (BattleBitModule moduleInstance in instances) - { - moduleInstance.Unload(); - } } switch (commandParts[0]) @@ -466,7 +450,6 @@ private void loadServerModules(RunnerServer server, IPAddress? ip = null, ushort throw new Exception($"Not inheriting from {nameof(BattleBitModule)}"); } ILog logger = LogManager.GetLogger($"{module.Name} of {ip ?? server.GameIP}:{port ?? server.GamePort}"); - moduleInstance.SetPermissions(this.permissions); moduleInstance.SetLogger(logger); moduleInstance.SetServer(server); server.AddModule(moduleInstance);