1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-09 23:00:57 -05:00

fix misc webfront errors on first run after configuration

This commit is contained in:
RaidMax
2022-01-22 13:30:32 -06:00
parent 6458aee2ee
commit 67189f3294
4 changed files with 12 additions and 9 deletions

View File

@ -492,13 +492,17 @@ namespace IW4MAdmin.Application
// this is because I want to store the command prefix in IW4MAdminSettings, but can't easily
// inject it to all the places that need it
cmdConfig.CommandPrefix = _appConfig.CommandPrefix;
cmdConfig.BroadcastCommandPrefix = _appConfig.BroadcastCommandPrefix;
cmdConfig.CommandPrefix = _appConfig?.CommandPrefix ?? "!";
cmdConfig.BroadcastCommandPrefix = _appConfig?.BroadcastCommandPrefix ?? "@";
foreach (var cmd in commandsToAddToConfig)
{
if (cmdConfig.Commands.ContainsKey(cmd.CommandConfigNameForType()))
{
continue;
}
cmdConfig.Commands.Add(cmd.CommandConfigNameForType(),
new CommandProperties()
new CommandProperties
{
Name = cmd.Name,
Alias = cmd.Alias,