mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
fix: remove sa_server_groups, not really needed for core functionality
This commit is contained in:
parent
c2b79cd822
commit
614348fd2a
2 changed files with 3 additions and 9 deletions
|
|
@ -50,9 +50,3 @@ CREATE TABLE IF NOT EXISTS `sa_servers` (
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `address` (`address`)
|
UNIQUE KEY `address` (`address`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `sa_server_groups` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`group_name` varchar(128) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
||||||
|
|
@ -70,8 +70,8 @@ public class AdminSQLManager
|
||||||
{
|
{
|
||||||
await using MySqlConnection connection = await _database.GetConnectionAsync();
|
await using MySqlConnection connection = await _database.GetConnectionAsync();
|
||||||
|
|
||||||
string sql = "SELECT player_steamid, flags, immunity, ends FROM sa_admins WHERE (ends IS NULL OR ends > @CurrentTime) AND (server_id IS NULL OR server_id = @serverid)";
|
string sql = "SELECT player_steamid, flags, immunity, ends FROM sa_admins WHERE (ends IS NULL OR ends > @CurrentTime) AND (server_id IS NULL OR server_id = @serverid) AND (group_id LIKE CONCAT('%', @groupid, '%'));";
|
||||||
List<dynamic>? activeFlags = (await connection.QueryAsync(sql, new { CurrentTime = now, serverid = CS2_SimpleAdmin.ServerId }))?.ToList();
|
List<dynamic>? activeFlags = (await connection.QueryAsync(sql, new { CurrentTime = now, serverid = CS2_SimpleAdmin.ServerId, groupid = CS2_SimpleAdmin.GroupIds }))?.ToList();
|
||||||
|
|
||||||
if (activeFlags == null)
|
if (activeFlags == null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue