zio fork 1.8.2b-zio16: backport unban, rename and css_history from upstream 1.9.0
From upstream 530f603: - css_unban updates the ban cache at once (and clears the engine banid with UnlockedCommands) instead of waiting up to a minute for the cache refresh. - css_prename is saved in sa_renames (migration 017) and re-applied on connect and name change, so it survives restarts. css_rename from a hidden admin renames again. - New css_history command and Players > History menu entry. Commands missing from an existing Commands.json are registered under their default name. - Migrations are copied with a glob, so 017 reaches the build output. Upstream's admin-loading changes, css_say change and css_penalties fix are left out.
This commit is contained in:
parent
8bec658db4
commit
71d51d7b92
35 changed files with 539 additions and 143 deletions
|
|
@ -43,6 +43,7 @@ public class ServerManager
|
|||
if (_getIpTryCount > 32 && isInvalidIp)
|
||||
{
|
||||
CS2_SimpleAdmin._logger?.LogError("Unable to load server data - can't fetch ip address!");
|
||||
_ = CS2_SimpleAdmin.PlayerManager.LoadRenamedPlayers();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -103,7 +104,7 @@ public class ServerManager
|
|||
CS2_SimpleAdmin.ServerId = serverId;
|
||||
CS2_SimpleAdmin._logger?.LogInformation("Loaded server with ip {ip}", ipAddress);
|
||||
|
||||
CS2_SimpleAdmin.ServerLoaded = true;
|
||||
CS2_SimpleAdmin.ServerLoaded = true;
|
||||
|
||||
if (CS2_SimpleAdmin.Instance.CacheManager != null)
|
||||
{
|
||||
|
|
@ -115,6 +116,9 @@ CS2_SimpleAdmin.ServerLoaded = true;
|
|||
CS2_SimpleAdmin._logger?.LogCritical("Unable to create or get server_id: " + ex.Message);
|
||||
}
|
||||
|
||||
// Renames are server-independent, so load them even when the server row could not be resolved
|
||||
await CS2_SimpleAdmin.PlayerManager.LoadRenamedPlayers();
|
||||
|
||||
if (CS2_SimpleAdmin.Instance.Config.EnableMetrics)
|
||||
{
|
||||
var queryString = $"?address={address}&hostname={hostname}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue