mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-19 02:51:51 +00:00
Introduces per-player localization for menu categories and items using translation keys and IStringLocalizer, allowing modules and the main plugin to display menu names in the player's language. Refactors menu registration and builder logic to use translation keys, updates API and documentation, and adds database provider upsert query abstraction for player IPs. Also updates version to 1.7.8-beta-4 and corrects a translation string typo.
63 lines
2.2 KiB
C#
63 lines
2.2 KiB
C#
using System.Data.Common;
|
|
|
|
namespace CS2_SimpleAdmin.Database;
|
|
|
|
public interface IDatabaseProvider
|
|
{
|
|
Task<DbConnection> CreateConnectionAsync();
|
|
Task<(bool Success, string? Exception)> CheckConnectionAsync();
|
|
Task DatabaseMigrationAsync();
|
|
|
|
// CacheManager
|
|
string GetBanSelectQuery(bool multiServer);
|
|
string GetIpHistoryQuery();
|
|
string GetBanUpdateQuery(bool multiServer);
|
|
|
|
// PlayerManager
|
|
string GetUpsertPlayerIpQuery();
|
|
|
|
// PermissionManager
|
|
string GetAdminsQuery();
|
|
string GetDeleteAdminQuery(bool globalDelete);
|
|
string GetAddAdminQuery();
|
|
string GetAddAdminFlagsQuery();
|
|
string GetUpdateAdminGroupQuery();
|
|
string GetGroupsQuery();
|
|
string GetGroupIdByNameQuery();
|
|
string GetAddGroupQuery();
|
|
string GetAddGroupFlagsQuery();
|
|
string GetAddGroupServerQuery();
|
|
string GetDeleteGroupQuery();
|
|
string GetDeleteOldAdminsQuery();
|
|
|
|
// BanManager
|
|
string GetAddBanQuery();
|
|
string GetAddBanBySteamIdQuery();
|
|
string GetAddBanByIpQuery();
|
|
string GetUnbanRetrieveBansQuery(bool multiServer);
|
|
string GetUnbanAdminIdQuery();
|
|
string GetInsertUnbanQuery(bool includeReason);
|
|
string GetUpdateBanStatusQuery();
|
|
string GetExpireBansQuery(bool multiServer);
|
|
string GetExpireIpBansQuery(bool multiServer);
|
|
|
|
// MuteManager
|
|
string GetAddMuteQuery(bool includePlayerName);
|
|
string GetIsMutedQuery(bool multiServer, int timeMode);
|
|
string GetMuteStatsQuery(bool multiServer);
|
|
string GetUpdateMutePassedQuery(bool multiServer);
|
|
string GetCheckExpiredMutesQuery(bool multiServer);
|
|
string GetRetrieveMutesQuery(bool multiServer);
|
|
string GetUnmuteAdminIdQuery();
|
|
string GetInsertUnmuteQuery(bool includeReason);
|
|
string GetUpdateMuteStatusQuery();
|
|
string GetExpireMutesQuery(bool multiServer, int timeMode);
|
|
|
|
// WarnManager
|
|
string GetAddWarnQuery(bool includePlayerName);
|
|
string GetPlayerWarnsQuery(bool multiServer, bool active);
|
|
string GetPlayerWarnsCountQuery(bool multiServer, bool active);
|
|
string GetUnwarnByIdQuery(bool multiServer);
|
|
string GetUnwarnLastQuery(bool multiServer);
|
|
string GetExpireWarnsQuery(bool multiServer);
|
|
} |