From a2fdc0feed585f49c27cac83f146a36abf73f629 Mon Sep 17 00:00:00 2001 From: Dollan Date: Fri, 12 Apr 2024 17:32:18 +0200 Subject: [PATCH] fix: add comments, remove whitespace --- Events.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Events.cs b/Events.cs index 56c3a03..6674b23 100644 --- a/Events.cs +++ b/Events.cs @@ -383,10 +383,6 @@ 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", new { address }); @@ -394,6 +390,7 @@ public partial class CS2_SimpleAdmin ServerId = serverId; if (groupIds != null && groupIds.Length > 0) { + // Split the group ids by comma and parse them to integers GroupIds = groupIds?.Split(',').Select(int.Parse).ToArray(); } else @@ -405,7 +402,7 @@ public partial class CS2_SimpleAdmin } catch (Exception ex) { - _logger?.LogCritical("Unable to create or get server_id" + ex.Message); + _logger?.LogCritical("Unable to create or get server_id " + ex.Message); } if (Config.EnableMetrics)