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

properly implement sv_sayName for custom say name

prevent trying to register live radar page for every server (oops)
optimize event processing to prevent slow plugins from affecting command processing
enable database connection resilency
trim extra characters from T7 reassembled response
This commit is contained in:
RaidMax
2020-04-20 10:45:58 -05:00
parent 37daca4a9f
commit 1d3af2079a
7 changed files with 55 additions and 33 deletions

View File

@ -95,10 +95,10 @@ namespace SharedLibraryCore.Database
{
default:
case "mysql":
optionsBuilder.UseMySql(_ConnectionString);
optionsBuilder.UseMySql(_ConnectionString, _options => _options.EnableRetryOnFailure());
break;
case "postgresql":
optionsBuilder.UseNpgsql(_ConnectionString);
optionsBuilder.UseNpgsql(_ConnectionString, _options => _options.EnableRetryOnFailure());
break;
}
}

View File

@ -273,11 +273,11 @@ namespace SharedLibraryCore
if (!processed)
{
Owner?.Logger.WriteError("Waiting for event to complete timed out");
Owner?.Logger.WriteDebug($"{Id}, {Type}, {Data}, {Extra}, {FailReason.ToString()}, {Message}, {Origin}, {Target}");
#if DEBUG
throw new Exception();
#endif
Owner?.Logger.WriteError("Waiting for event to complete timed out");
Owner?.Logger.WriteDebug($"{Id}, {Type}, {Data}, {Extra}, {FailReason.ToString()}, {Message}, {Origin}, {Target}");
}

View File

@ -147,7 +147,7 @@ namespace SharedLibraryCore
protected async Task Tell(string message, EFClient target)
{
#if !DEBUG
string formattedMessage = string.Format(RconParser.Configuration.CommandPrefixes.Tell, target.ClientNumber, $"{(CustomSayEnabled ? $"{CustomSayName}: " : "")}{message.FixIW4ForwardSlash()}");
string formattedMessage = string.Format(RconParser.Configuration.CommandPrefixes.Tell, target.ClientNumber, $"{(CustomSayEnabled && GameName == Game.IW4 ? $"{CustomSayName}: " : "")}{message.FixIW4ForwardSlash()}");
if (target.ClientNumber > -1 && message.Length > 0 && target.Level != EFClient.Permission.Console)
await this.ExecuteCommandAsync(formattedMessage);
#else