mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
fix: no longer fails if there are no groups assigned
This commit is contained in:
parent
8f1702bb75
commit
c2b79cd822
1 changed files with 9 additions and 2 deletions
|
|
@ -392,11 +392,18 @@ public partial class CS2_SimpleAdmin
|
|||
new { address });
|
||||
|
||||
ServerId = serverId;
|
||||
if (groupIds != null && groupIds.Length > 0)
|
||||
{
|
||||
GroupIds = groupIds?.Split(',').Select(int.Parse).ToArray();
|
||||
}
|
||||
|
||||
|
||||
// For testing only
|
||||
_logger?.LogInformation($"Server ID: {ServerId}");
|
||||
_logger?.LogInformation($"Group IDs: {string.Join(", ", GroupIds ?? Array.Empty<int>())}");
|
||||
if (GroupIds != null)
|
||||
{
|
||||
_logger?.LogInformation($"Group IDs: {string.Join(", ", GroupIds)}");
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue