Skip to content

Commit

Permalink
Bump to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RainOrigami committed Oct 2, 2023
1 parent 32406b4 commit 40df1e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion BBRAPIModules/BBRAPIModules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>BattleBit Remastered Modular Community Server API</Title>
<AssemblyVersion>1.1.1</AssemblyVersion>
<AssemblyVersion>1.1.0</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<Version>$(AssemblyVersion)</Version>
<Authors>RainOrigami</Authors>
Expand Down
17 changes: 0 additions & 17 deletions BattleBitAPIRunner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ static void Main(string[] args)
private List<RunnerServer> servers = new();
private ServerListener<RunnerPlayer, RunnerServer> serverListener = new();
private Dictionary<string, (string Hash, DateTime LastModified)> watchedFiles = new();
private Permissions permissions = null!;

public Program()
{
configureLogger();
loadConfiguration();
validateConfiguration();
loadPermissions();
this.logger.Info("Loading dependencies");
loadDependencies();
loadModules();
Expand All @@ -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";
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -243,11 +232,6 @@ private void consoleCommandHandler()
instances.Add(moduleInstance);
moduleInstance.OnConsoleCommand(command);
}

foreach (BattleBitModule moduleInstance in instances)
{
moduleInstance.Unload();
}
}

switch (commandParts[0])
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 40df1e5

Please sign in to comment.