1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

more api tweaks

removed WebfrontSettings
IW4MAdminSettings are only generated when the file does not exist, placeholder values stored in DefaultSettings.json
This commit is contained in:
RaidMax
2018-04-19 00:48:14 -05:00
parent 2f336c1291
commit 8e9d8e46c7
31 changed files with 310 additions and 77 deletions

View File

@ -314,7 +314,8 @@ namespace SharedLibraryCore.Commands
bool found = false;
foreach (Command C in E.Owner.Manager.GetCommands())
{
if (C.Name == cmd.ToLower())
if (C.Name == cmd.ToLower() ||
C.Alias == cmd.ToLower())
{
await E.Origin.Tell("[^3" + C.Name + "^7] " + C.Description);
await E.Origin.Tell(C.Syntax);

View File

@ -16,6 +16,7 @@ namespace SharedLibraryCore.Configuration
public string CustomSayName { get; set; }
public string DiscordInviteCode { get; set; }
public string IPHubAPIKey { get; set; }
public string WebfrontBindUrl { get; set; }
public string Id { get; set; }
public List<ServerConfiguration> Servers { get; set; }
public int AutoMessagePeriod { get; set; }
@ -31,6 +32,8 @@ namespace SharedLibraryCore.Configuration
EnableSteppedHierarchy = Utilities.PromptBool("Enable stepped privilege hierarchy");
EnableCustomSayName = Utilities.PromptBool("Enable custom say name");
WebfrontBindUrl = "http://127.0.0.1:1624";
if (EnableCustomSayName)
CustomSayName = Utilities.PromptString("Enter custom say name");

View File

@ -0,0 +1,19 @@
using SharedLibraryCore.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
namespace SharedLibraryCore.Configuration
{
public class DefaultConfiguration : IBaseConfiguration
{
public int AutoMessagePeriod { get; set; }
public List<string> AutoMessages { get; set; }
public List<string> GlobalRules { get; set; }
public List<MapConfiguration> Maps { get; set; }
public IBaseConfiguration Generate() => this;
public string Name() => "DefaultConfiguration";
}
}

View File

@ -93,7 +93,7 @@ namespace SharedLibraryCore.Database
library = Assembly.LoadFrom(dllPath);
}
// not a valid assembly, ie plugin files
// not a valid assembly, ie plugin support files
catch (Exception)
{
continue;

View File

@ -9,6 +9,7 @@
<Version>2.0.0</Version>
<Authors>RaidMax</Authors>
<Company>Forever None</Company>
<Configurations>Debug;Release;Prerelease</Configurations>
</PropertyGroup>
<ItemGroup>