1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-07 13:48:00 -05:00

579 Commits

Author SHA1 Message Date
Shorty
3364183846 EF Core LINQ Query Fails: DateTime.UtcNow - TimeSpan Cannot Be Translated
An unhandled exception occurs when running a LINQ query that includes DateTime.UtcNow - TimeSpan as a condition in Where(). EF Core cannot translate this expression into SQL.
2025-05-29 16:13:59 -05:00
RaidMax
3e186ca07a
Add ResolvedExternalIPAddress to API and Master Communication (#365)
* Feature: Add ResolvedExternalIPAddress to API and Master Communication

This commit introduces the `ResolvedExternalIPAddress` property to enhance IP address reporting.

1.  **Server API (`WebfrontCore/Controllers/API/Server.cs`):**
    The `ResolvedExternalIPAddress` property has been added to the JSON
    responses for the `/api/server` endpoints. This property is nullable
    and contains the IPv4 string value of the manager's external IP address
    if the server's resolved IP endpoint is an internal address. Otherwise,
    it is null.

2.  **Master Server Communication (`MasterCommunication.cs` and `ApiServer.cs`):**
    - The `ApiServer` DTO (in `Application/API/Master/ApiServer.cs`) now
      includes the `ResolvedExternalIPAddress` property (serialized as
      `resolved_external_ip_address`).
    - The `UploadStatus` method in `Application/Misc/MasterCommunication.cs`
      now populates this property for each server being reported to the
      master server, using the same logic (external IP if server's own
      resolved IP is internal).

This provides more comprehensive IP address information both through the
web API and to the master server.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-05-24 15:36:24 -05:00
Amos
072e6da4d1
Utilise Minutes in TempBan for under 1 hour bans. (#362)
* Update tempban command to use minutes instead of hours

The duration calculation for tempbans now uses minutes rather than hours for greater precision. This change ensures better alignment with user expectations and configurations in smaller timeframes.

* Update regex patterns to enforce stricter input validation

Adjusted regex in `ParseTimespan` and `TempBanCommand` to ensure input starts with 1-5 numeric characters, improving validation. This prevents malformed user inputs and enhances overall command reliability.

* \w includes digits. Who knew.
2025-05-11 19:13:41 -05:00
m
081c522b96
add iw7-mod RCON support (#361)
* create iw7-mod parser

* iw7 default settings & enum stuff

* add zm maps to defaultsettings
2025-04-14 21:34:22 -05:00
Ayymoss
2d7819c731 Remove unnecessary imports 2024-09-06 19:20:30 -05:00
Ayymoss
3f8b2fac9e Add GameName to ClientInfoResult and ClientController
Updated `ClientInfoResult` to include a new `GameName` property. Also modified `ClientController` to handle and display this new property properly.
2024-09-06 19:20:30 -05:00
Ayymoss
5c9cfbd2c2 Add /api/client/{clientId} Endpoint
This endpoint returns general information about the client ID provided.
2024-09-06 19:20:30 -05:00
Liam
88d05f5a8a
H2M-Mod Support (#337)
* feat: add h2m support

* fix: remove unneeded comma
2024-08-12 20:05:25 -05:00
Amos
4d1e7c2692
Refactor PromptClientInput to accept string array for prompt (#336)
* Refactor PromptClientInput to accept string array for prompt

Updated the `PromptClientInput` method to accept a string array instead of a single string. This change ensures that multiple prompts can be handled, improving input flexibility and client communication. Additionally, modified related method calls to maintain consistency with the new input type.

* Refactor PromptClientInput to support parsed result and errors

Updated PromptClientInput to handle parsed input results and return error messages instead of raw strings. Introduced ParsedInputResult<TResult> class to encapsulate parsing results and errors, enhancing client validation and feedback mechanism.
2024-08-05 16:09:50 +01:00
RaidMax
95523885b8
support for loading minimum permission level from config for script commands 2024-07-14 11:21:47 -05:00
Amos
ee0b40d657
Improve cancellation token handling in Utilities.cs (#331)
A using statement was added to ensure proper disposal of the CancellationTokenSource. Additional error handling was also included to catch an OperationCanceledException and prevent it from causing unintended side effects. The client response is now properly disposed in the finally block.
2024-07-06 19:30:40 -05:00
Amos
036a467bd0 Add PromptClientInput method in Utilities.cs
A new utility method named 'PromptClientInput' has been added in the Utilities.cs file. This method accepts client, prompt, and validator as inputs and allows taking action based on client responses. Included subscription and unsubscription to the 'ClientMessaged' game event, and handling of cancellation token to control the execution flow.
2024-07-06 16:47:55 -05:00
Amos
d6112840e6 Revert commented out Utilities CancellationToken timeout for debug environments. 2024-07-05 23:10:21 +01:00
RaidMax
b2c2ab03f3 fix issue with manual log path input on initial configuration 2024-06-29 22:17:18 -05:00
RaidMax
fbfbae0d94 set default webfront bind url for very first startup 2024-06-28 23:51:54 -05:00
RaidMax
ae1faac8ab fix type reference for ClientPenaltyEvent 2024-06-28 23:33:21 -05:00
RaidMax
dc46778c21 Create shared_library_nuget.yml 2024-06-28 16:18:39 -05:00
RaidMax
e6272f610a Move/add client getters to ScriptPluginExtensions 2024-06-25 20:51:03 -05:00
RaidMax
dbb5a9117a update nuget packages 2024-06-22 17:20:05 -05:00
RaidMax
1596af1548 implement functionality to dynamically populate property values from events that inherit from GameScriptEvent 2024-06-22 17:02:04 -05:00
RaidMax
dffcae8344 Add GameLogEvent as catch all for unhandled log lines 2024-06-22 12:18:33 -05:00
RaidMax
4b6f3e8851 Update nuget packages 2024-06-22 11:52:42 -05:00
RaidMax
34af7a332c
Update projects to .net 8 (#326)
* Update codebase to target .NET 8.0 and improve JSON serialization

This commit switches our target framework from .NET 6.0 to .NET 8.0 and replaces Newtonsoft.Json with System.Text.Json for serialization. The JsonConverter classes have been updated to support the new JSON model and some enhancements were applied to the codebase such as fixing a command property and updating various package references.

* Align with Develop

* Update SharedLibraryCore package version

The version of the SharedLibraryCore package reference has been updated across multiple projects from '2024.2.4.85' to '2024.2.5.9'. Meanwhile, version within SharedLibraryCore.csproj has been changed from '2024.02.04.085' to '2024.01.01.1'. Changes also include removal of .NET 8 requirement notice and reenabling of status upload to master communicator.

* Update properties in IRConParser and IRConParserConfiguration to be settable

The properties in the `IRConParser` and `IRConParserConfiguration` interfaces were updated to include setters. Previously, the properties in these interfaces were read-only. This change allows for the modifications and extensions of properties defined, thereby bolstering flexibility for the handling of games and parsers.

* Replace RestEase with Refit in API usage

Refit has been implemented as a replacement for RestEase in all API calls. As such, all related code, parameters and imports have been adjusted to function with Refit. Logic has also been added to handle certain Refit-specific behaviours. Occurrences of the RestEase package have been removed from the project.

* Enable auto-redirect in HttpClient

The HttpClient instance used in Application/Main.cs has been modified to automatically follow redirect responses. This was accomplished by adding "AllowAutoRedirect = true" to the HttpClientHandler used when creating the HttpClient.

---------

Co-authored-by: Amos <amos2580@hotmail.co.uk>
2024-06-22 10:19:06 -05:00
RaidMax
aa83d88c77 Add command execution backoff/timeout 2024-02-24 18:07:34 -06:00
RaidMax
b286548906 Add server status received event including raw response 2024-02-17 15:33:15 -06:00
RaidMax
570328dc1e
Update Data assembly dependency in SharedLibraryCore 2024-02-01 16:23:02 -06:00
Amos
a81f9ecfa0
slc update (#319) 2024-01-21 19:08:25 -06:00
RaidMax
ec6424b44f update l4d2 parser name 2023-09-02 15:45:03 -05:00
RaidMax
a66a502480 add initial support for LFD2 2023-09-02 15:35:40 -05:00
RaidMax
8d2a5a3ba3 adjust validation for master url 2023-09-02 13:38:56 -05:00
RaidMax
2ea43fdd63 update default master url 2023-09-02 13:22:33 -05:00
RaidMax
a2e5e94b02 fix some issues with chat search feature 2023-08-27 12:28:35 -05:00
RaidMax
a169653e91 add chat to advanced search 2023-08-26 22:56:37 -05:00
RaidMax
122d2e5708 fix color code matching regex 2023-06-24 20:08:40 -05:00
RaidMax
f19ca8a813 adjust last seen format in game interface 2023-06-02 16:35:00 -05:00
RaidMax
3dd3f6ab2d optimize player history retrieval 2023-05-30 18:12:57 -05:00
Amos
9bf0be8341
Resolves issue where muted player would be unmuted when flag penalty was removed (#303)
* resolves issue where muted player would be unmuted when flag penalty was removed

* Revert accidental code format
2023-05-28 11:37:27 -05:00
RaidMax
976e6e4752 add command to set log level and develop mode dynamically 2023-05-26 21:14:49 -05:00
RaidMax
4002745ad7 fix issue with alert manager concurrency 2023-05-14 22:46:03 -04:00
RaidMax
05f407e3bf fix issue with cancellation token on shutdown state sync 2023-04-19 22:46:46 -05:00
RaidMax
db8510f8e6 update top level client count stats to support filtering per game 2023-04-19 19:55:33 -05:00
RaidMax
c628cc8f55 maybe fix for an issue that should not exist 2023-04-15 16:49:34 -05:00
RaidMax
d3ac9d53a4 add configuration update callback for script plugins & update plugins to utilize 2023-04-15 14:27:51 -05:00
RaidMax
f7d005ccd1 update/rename notifyafterdelay to ExecuteAfterDelay 2023-04-09 14:07:50 -05:00
RaidMax
e3bbb048b6 add ServerCommandRequestExecuteEvent implementation 2023-04-09 14:07:30 -05:00
RaidMax
d45ba6434f enable support for custom say name on non IW4 games with tell/say raw 2023-04-07 14:04:04 -05:00
RaidMax
f32949083f track private slots for webfront overview 2023-04-05 23:10:40 -05:00
RaidMax
287ac9cf16 Add NotifyAfterDelay helper method 2023-04-05 22:26:42 -05:00
RaidMax
6faa9b0b43 add back missing "Port" field for Server 2023-04-05 22:26:04 -05:00
RaidMax
ebe69a94ad implement new eventing system 2023-04-05 09:54:57 -05:00