Commit graph

258 commits

Author SHA1 Message Date
Madpeter
be4e03d8d7 issue 116
System.Text.Json defaults suck and we want it to work like Newtonsoft.Json
2025-10-10 11:25:44 +01:00
Madpeter
008cb44e24 Use UnsafeRelaxed JSON serialization globally
Replaces all usages of JsonSerializer.Serialize with the UnsafeRelaxed option via a new JsonOptions.UnsafeRelaxed static property. This ensures consistent relaxed escaping for all JSON output, improving compatibility with consumers expecting unescaped JSON. Refactors affected command, service, and static classes to use the new option.
2025-10-05 20:07:42 +01:00
Madpeter
811baa74bc Use relaxed JSON escaping for command replies
Updated JSON serialization in CommandsService to use UnsafeRelaxedJsonEscaping for replies, ensuring special characters are not escaped unnecessarily when sending processed command results.
2025-10-05 19:36:14 +01:00
Madpeter
4216105037 Update parcel flag command return value
Changed the return hint and reply for the parcel flag update command to consistently return 'true' instead of 'true|false' or a status message. This improves clarity and standardizes the command's output.
2025-10-05 19:27:04 +01:00
Madpeter
e63253dec0 Refactor BotCommandNotice to use auto-properties
Changed BotCommandNotice constructor parameter names and replaced field assignments with auto-properties for improved clarity and maintainability.
2025-10-05 18:21:50 +01:00
Madpeter
5d464edd4d Add ClearChatOnConnect option and improve channel cleaning
Introduces a new Discord config option 'ClearChatOnConnect' to control whether channels are cleaned on connect. Refactors channel cleaning logic to handle bulk and individual message deletion based on message age, and updates permission modification calls for clarity and maintainability.
2025-10-05 11:01:54 +01:00
Madpeter
7a04f2c520 Refactor TriggerEvent logic and improve debug output
Refactored the TriggerEvent method for clarity and modularity by extracting debug logging, event value building, rule evaluation, and action triggering into separate helper methods. Improved debug output and streamlined event and rule checks for better maintainability and readability.
2025-10-04 23:19:22 +01:00
Madpeter
7411ba3268 Refactor inventory event lookup logic
Replaced ContainsKey and indexer access with TryGetValue for InventoryEvents dictionary to improve performance and readability in EventsService.
2025-10-04 23:11:34 +01:00
Madpeter
04b4e872a8 Make InventoryUpdateEvent asynchronous
Wraps InventoryUpdateEvent logic in a Task to run asynchronously, improving responsiveness and preventing blocking of the main thread during event processing.
2025-10-04 23:05:56 +01:00
Madpeter
050ef3c133 Replace Newtonsoft.Json with System.Text.Json
Migrated all serialization and deserialization from Newtonsoft.Json to System.Text.Json across the codebase for improved performance and reduced dependencies. Updated package references and refactored helper method names for consistency (e.g., IsEmpty, NotEmpty, InRange). Also updated NuGet package versions in project files.
2025-10-03 23:12:20 +01:00
Madpeter
93dbde2818 Improve inventory preload tracking and reporting
Refactored inventory preload logic to track both folder and item counts, and updated related command and service methods to report these values. Changed folder loading to be asynchronous and recursive, improved reporting format, and fixed root folder naming in inventory contents command.
2025-10-03 21:56:33 +01:00
Madpeter
e14ba787d4 Refactor inventory node loading logic
Simplifies the inventory node loading by replacing type checks with a string comparison on the entry type name. Removes redundant else-if block and ensures all entries are processed consistently.
2025-10-03 01:25:35 +01:00
Madpeter
70c1dcc86c Add randomized delay to folder preloading
Replaced fixed delay with a randomized delay when preloading folders to reduce predictability and overloading the server with multiple requests at the same time Introduced a static Random instance for delay calculation.
2025-10-03 00:58:14 +01:00
Madpeter
91a1ba4086 Add inventory preload status and folder count commands
Introduces two new commands to check if inventory preload is done and to request the number of preloaded folders. Updates inventory node mapping to use dynamic type names and improves folder preload tracking in DataStoreService.
2025-10-03 00:50:54 +01:00
Madpeter
7118d523cd Update ReturnHints formatting in Inventory command
Changed the ReturnHints string in InventoryContentsCatched to use <br/> for line breaks, improving readability of the JSON data object description.
2025-10-02 22:13:50 +01:00
Madpeter
0139326d67 Add cached inventory mapping and log truncation
Introduces InventoryContentsCatched to return mapped inventory using cached data and adds InventoryNodeEntry for structured inventory representation. Also truncates command log results to 100 characters in CommandsService for improved logging.
2025-10-02 22:07:02 +01:00
Madpeter
c00a11a99d Add inventory prefetching support
Introduces configuration options and logic for prefetching inventory folders on startup, including depth control. Updates Dockerfile and DataStoreConfig to support new settings, and modifies DataStoreService to handle inventory preloading asynchronously.
2025-10-02 11:22:19 +01:00
Madpeter
c40c551316 Add async inventory contents retrieval method
Introduces AsyncInventoryContents to fetch folder contents asynchronously, allowing non-blocking operations. Also updates documentation for the blocking method to clarify its behavior and output format.
2025-10-01 10:00:08 +01:00
Madpeter
231a19ff08 Add async inventory operations with smart replies
Introduces asynchronous versions of rez, send, and transfer inventory commands with smart reply support, returning request UUIDs and JSON status objects. Adds the InventoryAsyncReply class for structured replies and updates command attributes for clarity. Enhances error handling and reply mechanisms for improved integration with external systems.
2025-09-30 22:28:11 +01:00
Madpeter
61da8bf4cd update parcel ban/unban to work 2025-09-28 00:39:44 +01:00
Madpeter
b890fdc54b Update LibreMetavese and add support for ResetParcelAcccessLists 2025-09-28 00:11:54 +01:00
Madpeter
8f79b49495 Update ParcelCommands.cs 2025-09-27 22:22:19 +01:00
Madpeter
c0be75434c fix bork'd RequestBanAction 2025-09-27 19:31:20 +01:00
Madpeter
4f708621fa add GetCurrentParcelUUID 2025-09-26 18:36:39 +01:00
Madpeter
dc9310e5ff tidy up 2025-09-17 20:57:23 +01:00
Madpeter
3a29bdf748 Update Estate.cs 2025-09-06 23:28:10 +01:00
Madpeter
6bd37c55d8 adds non capps fallback 2025-09-06 23:27:32 +01:00
Madpeter
d74b2bc090 clean up command 2025-09-06 22:10:09 +01:00
Madpeter
fc7418a173 SetEstateConfig 2025-09-06 21:59:39 +01:00
Madpeter
e78a2cb60e SetEstateTerrainRaw 2025-09-03 22:09:37 +01:00
Madpeter
bbc9aa6553 Update Animation.cs 2025-08-09 19:49:53 +01:00
Madpeter
e1cb79f1fa Update Estate.cs 2025-07-10 22:05:49 +01:00
Madpeter
33a069df25 add SetEstateCovenant 2025-07-10 22:04:34 +01:00
Madpeter
0786af9672 GetEstateCovenant now works as expected 2025-07-10 19:00:35 +01:00
Madpeter
4b235b4911 WIP GetEstateCovenant 2025-07-10 11:35:17 +01:00
Madpeter
51f85df0ea add GetDisplayName as a command 2025-07-10 00:30:26 +01:00
Madpeter
851328c74e improve relay and datastore
datastore can now prefetch display names (note the first time it sees a avatar the display name will be ?)
the relay service can now talk to rabbit as a target
the relay service can now use an extended output json
2025-07-10 00:27:55 +01:00
Madpeter
68d1cd08e0 add support for /json endpoint to http 2025-07-09 22:42:15 +01:00
Madpeter
7179fbde47 Update RabbitMQ.cs 2025-07-09 20:25:56 +01:00
Madpeter
cfe12fb6c9 add rabbitMQ commands support to wiki and add missing arg hint info 2025-07-09 20:23:47 +01:00
Madpeter
8f95809c80 adds new rabbit SendMessageToQ command 2025-07-09 20:19:27 +01:00
Madpeter
10dc20e350 fix About wording for some commands 2025-07-09 19:54:52 +01:00
Madpeter
1754b099c0 add GetCurrentRegionType 2025-07-09 18:01:35 +01:00
Madpeter
18c2334e8c fix the new SetExtendedRegionInfo 2025-07-09 16:15:35 +01:00
Madpeter
effd9929a4 Update WikiService.cs
opps fix example command maker fucking up the format
2025-07-09 16:14:46 +01:00
Madpeter
78ea90a1c0 lol opps 2025-07-07 22:33:22 +01:00
Madpeter
e28dc5787b extendedSetRegionInfoAsync
new command in testing
2025-07-07 22:11:31 +01:00
Madpeter
15f501dc72 patch SetRegionInfo to allow adult sims 2025-07-07 20:15:03 +01:00
Madpeter
c5a83c986c SetRegionFlags (an estate level command) 2025-06-29 17:31:12 +01:00
Madpeter
4e5523a391 rework the outfit system 2025-06-25 10:23:21 +01:00