The MuteManager constructor within the Mute plugin has been refactored for better dependency injection. This change simplifies the class construction by directly initializing fields in the constructor parameters. Additionally, several minor code improvements have been made, including spelling corrections and replacing some conditional checks for readability. Other arrays or methods in the plugin are also revised for better maintainability and readability of the code.
* 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>
Added mute and unmute commands in ParserIW6x.js, including necessary updates in MuteManager.cs and Plugin.cs files. Refactored the query for mute penalties. Also added RootNamespace in Mute.csproj.
* Fix self-targeting
Remove creation of penalty on mute expiration
* Display mute penalties on profile
Expire mute penalties on unmute
* Resolves issues in code review
Added comment in ClientController.cs
Fixed order of operations in MuteManager.cs
Fixed condition in MuteManager.cs
* Fix self-targeting
Remove creation of penalty on mute expiration
* Display mute penalties on profile
Expire mute penalties on unmute
* Resolves issues in code review
Added comment in ClientController.cs
Fixed order of operations in MuteManager.cs
Fixed condition in MuteManager.cs
* Changed localisation value to be more generic
Fix null reference warning (it should never be null) (34da216)
* Resolve duplicate migration
Resolve unmuting state double penalties
* Change order of operation
* Added MuteInfoCommand.cs
* Resolve !pm and @broadcast permanently being disabled
Quick fix for PowerShell IE use
Makes date readable for target player
Resolved translation string inconsistencies
Minor code cleanups
Initial commit from review
Cleaned up code & amended a few checks
Comment typo
Fix infinite unmuting
Removed unnecessary checks (Unmuting an already unmuted player will not trigger MuteStateMeta creation (if already doesn't exist))
Resolved !listmutes showing expired mutes
Committing before refactor
Refactor from review
Removed reference to AdditionalProperty
Fix check for meta state when unmuting
Continued request solves main problem
Handle potential failed command execution
Missed CommandExecuted onJoin
Fix another PS Reference to Invoke-WebRequest
Fixes review issues & Cleaned up code
Adds support for Intercepting Commands via Plugin (Credit: @RaidMax)
Comparing
Revert formatting changes
Removing MuteList for Penalty
Added Mute, TempMute & Unmute Penalty
Fixed reference in Mute.csproj & Removed ListMutesCommand.cs