mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-11-29 12:37:04 +01:00
fix: no longer plural
This commit is contained in:
parent
a2fdc0feed
commit
e3f9718ce7
5 changed files with 10 additions and 10 deletions
|
|
@ -28,7 +28,7 @@ public class AdminSQLManager
|
|||
|
||||
await using MySqlConnection connection = await _database.GetConnectionAsync();
|
||||
|
||||
string groupId = CS2_SimpleAdmin.GroupIds != null ? string.Join("", CS2_SimpleAdmin.GroupIds) : string.Empty;
|
||||
string groupId = CS2_SimpleAdmin.GroupId != null ? string.Join("", CS2_SimpleAdmin.GroupId) : string.Empty;
|
||||
|
||||
string sql = "SELECT flags, immunity, ends FROM sa_admins WHERE player_steamid = @PlayerSteamID AND (ends IS NULL OR ends > @CurrentTime) AND ((server_id IS NULL OR server_id = @serverid) OR ((@groupid IS NOT NULL AND @groupid <> 0) AND group_id LIKE CONCAT('%', @groupid, '%')));";
|
||||
List<dynamic>? activeFlags = (await connection.QueryAsync(sql, new { PlayerSteamID = steamId, CurrentTime = now, serverid = CS2_SimpleAdmin.ServerId, groupid = groupId }))?.ToList();
|
||||
|
|
@ -73,7 +73,7 @@ public class AdminSQLManager
|
|||
{
|
||||
await using MySqlConnection connection = await _database.GetConnectionAsync();
|
||||
|
||||
string groupId = CS2_SimpleAdmin.GroupIds != null ? string.Join("", CS2_SimpleAdmin.GroupIds) : string.Empty;
|
||||
string groupId = CS2_SimpleAdmin.GroupId != null ? string.Join("", CS2_SimpleAdmin.GroupId) : string.Empty;
|
||||
|
||||
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) OR ((@groupid IS NOT NULL AND @groupid <> 0) AND group_id LIKE CONCAT('%', @groupid, '%')));";
|
||||
List<dynamic>? activeFlags = (await connection.QueryAsync(sql, new { CurrentTime = now, serverid = CS2_SimpleAdmin.ServerId, groupid = groupId }))?.ToList();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue