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
10
Events.cs
10
Events.cs
|
|
@ -383,20 +383,20 @@ public partial class CS2_SimpleAdmin
|
|||
new { address, hostname });
|
||||
}
|
||||
|
||||
(int? serverId, string? groupIds) = await connection.QueryFirstAsync<(int?, string?)>(
|
||||
"SELECT `id`, `group_ids` FROM `sa_servers` WHERE `address` = @address",
|
||||
(int? serverId, string? groupId) = await connection.QueryFirstAsync<(int?, string?)>(
|
||||
"SELECT `id`, `group_id` FROM `sa_servers` WHERE `address` = @address",
|
||||
new { address });
|
||||
|
||||
ServerId = serverId;
|
||||
if (groupIds != null && groupIds.Length > 0)
|
||||
if (groupId != null && groupId.Length > 0)
|
||||
{
|
||||
// Split the group ids by comma and parse them to integers
|
||||
GroupIds = groupIds?.Split(',').Select(int.Parse).ToArray();
|
||||
GroupId = groupId?.Split(',').Select(int.Parse).ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
// We must set it to null if it's empty to ensure reloads work properly
|
||||
GroupIds = null;
|
||||
GroupId = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue