Commit Graph

386 Commits

Author SHA1 Message Date
Teriuihi 42736bd566 Update APRIL_FOOLS_RESET string in Config class
APRIL_FOOLS_RESET string in Config class has been updated from "reverse" to "esrever". This change updates the behavior of the April Fools feature in the chat application.
2024-03-31 14:53:36 +02:00
Teriuihi 157edbd6b6 Merge branch 'main' into april_fools 2024-03-31 13:37:42 +02:00
Teriuihi 4af85d0e79 Add option to disable chat filters in private channels
A constructor parameter and corresponding field 'disableInPrivate' have been added to the ChatFilter class. This handles disabling specific chat filters in private channels. The necessary checks have been implemented in RegexManager. The configuration for each filter is also updated in RegexConfig to incorporate this new functionality.
2024-03-31 13:37:05 +02:00
Teriuihi a7e029b0a1 Refactor April 1st date check in ChatListener
Removed the more complex date logic used to check for April 1st in the ChatListener class. This check checked if it was April 1st in any timezone. Replaced it with a simpler check using LocalDate's methods for month and day comparison. This only checks if it's April 1st in UTC. This aims to enhance code readability and simplify date handling.
2024-03-31 10:56:21 +02:00
Teriuihi ab98222f06 Refactor April 1st check in ChatListener class
A new method, `isWithinApril1st`, is introduced to simplify April 1st date check logic in the `ChatListener` class. This new method calculates the start and end of April 1st for all timezones in UTC and determines if the current time falls within this range.
2024-03-24 17:24:24 +01:00
Teriuihi ad91cda0c0 Add method to remove string at start
A new method `removeStringAtStart` has been added to the `ModifiableString` class. It replaces the starting string in a given text. Also, a condition has been modified in the `ChatListener` class to invoke this new method when the input string starts with the `APRIL_FOOLS_RESET` string. Additional unit tests were created to validate these changes.
2024-03-24 17:12:55 +01:00
Teriuihi 9270423928 Add reverse chat feature for April Fools' and corresponding tests
This commit includes a new feature that reverses the text speech of chat users on April 1st as an April Fools' prank. It also includes a reset option, configurable via a new parameter in the configuration file. Furthermore, it provides tests for the reverse string functionality, ensuring that it works correctly, even with complex strings that include tags.
2024-03-24 16:58:09 +01:00
Teriuihi 034de90062 Implement evidence for automatic ban for 'punish' filter violations
When a user who violate the 'punish' filter rules is automatically banned, there will now be a post about it in the #evidence channel.
2024-03-02 20:41:59 +01:00
Teriuihi bd8fa02f1e Add 'punish' filter and automatic banning functionality
Extended the RegexManager filterText method to include a 'punish' case that triggers an automatic ban for users who violate the filter. This commit also updates the PluginMessageListener to handle 'punish' commands, thus completing the execution of an auto-ban function.
2024-03-02 19:18:13 +01:00
Len 8a5b407359 update gradle 2024-01-04 09:28:53 +01:00
Len f63c4c0836 Update velocity 2023-12-17 12:39:07 +01:00
Len eb7c1dd1e1 Update to 1.20.4 2023-12-17 12:37:21 +01:00
Teriuihi 278129e8d8 Changed pinging to prevent ping for not @'d user
Allowed \ to escape ping
2023-08-14 01:29:06 +02:00
Teriuihi f1deebf49e Merge remote-tracking branch 'origin/main' 2023-08-11 22:30:34 +02:00
Teriuihi 3e29fc7d17 Added minimum hex value for nick colors 2023-08-11 22:30:23 +02:00
Len ffa90b5c94 add MENTIONPLAYERTAG to Config.java 2023-07-15 17:45:03 +02:00
Len 9d7f944c88 Fix Tagging players and triggering a replacematcher not resetting chatcolor 2023-07-15 17:42:12 +02:00
Teriuihi 4b930e62c3 Log party messages that are from a toggled user on the local server as well 2023-07-10 23:33:42 +02:00
Teriuihi c02e4dd884 Log all party messages 2023-07-10 23:15:08 +02:00
Teriuihi 8a463696ed Made chatusermanager use synchronized functions 2023-07-07 23:16:32 +02:00
Teriuihi ce5ea19961 Removed unused imports 2023-07-07 23:16:15 +02:00
Teriuihi 591ca93981 Fixed first join messages only working if chat user is not loaded yet 2023-07-07 23:15:45 +02:00
Teriuihi d7cfe97644 Added first join messages back 2023-06-26 21:40:15 +02:00
Teriuihi c86a344d49 Trying a different way to see if a player is a new player 2023-06-22 02:00:51 +02:00
Teriuihi 5583abbbca Fix party info not showing if party owner is null 2023-06-20 23:44:32 +02:00
Teriuihi 55918670bc Maybe fixed mentions 2023-06-20 00:40:44 +02:00
Teriuihi f3c7a312c0 Added first join messages 2023-06-20 00:35:46 +02:00
Teriuihi d8f064e7ca Fix spy needing mute-server permission 2023-06-20 00:09:48 +02:00
Teriuihi 9b7868bea7 Fix mentions happening within words 2023-06-17 23:58:33 +02:00
Teriuihi 6c6b798677 Fix load order 2023-04-23 22:48:33 +02:00
Teriuihi 0c1b197054 Don't send players a ping sound if they have the player that's pinging them ignored 2022-11-25 19:49:37 +01:00
Len 57afbbe805 Update permissions for nicknames 2022-10-29 10:29:26 +02:00
Len 5398d97248 Merge branch 'main' of https://github.com/Altitude-Devs/Chat 2022-10-09 20:25:52 +02:00
Len d90f5ac376 Update nicknames for Player and CMI. 2022-10-09 20:25:40 +02:00
Teriuihi 0c7ad69e85 Only replace the first instance of a name/nickname 2022-10-09 19:33:06 +02:00
Teriuihi 7ef9b4a64a Make .replace require a TextReplacementConfig 2022-10-09 19:32:51 +02:00
Teriuihi 5b06049265 Fixed double @ if someone doesn't have a nickname (or has the same nickname as the username) 2022-10-09 18:04:41 +02:00
Teriuihi ea051fd905 Fixed spacing for target replacement 2022-10-09 01:21:10 +02:00
Teriuihi 87d5c1b264 Fixed blocked messages not highlighting what was blocked 2022-10-09 01:18:13 +02:00
Teriuihi 5e62786010 Fixed case-sensitive name matching for replacing names/nicknames 2022-10-09 00:47:43 +02:00
Teriuihi 4f01c86877 @ players when they are mentioned by name or nickname (case-insensitive) 2022-10-09 00:36:50 +02:00
Teriuihi 6beb398e10 Added a way to replace text with components and patterns with strings/components 2022-10-09 00:36:07 +02:00
Len e811b0ca9a Update permissions for nickcommand. V2 2022-10-08 22:36:46 +02:00
Len 3eff30a4be Update permissions for nickcommand. 2022-10-08 11:14:58 +02:00
Len 3aa0b09133 Fix ChatFilter.java not applying to message. 2022-10-08 11:05:56 +02:00
Len 5db22461cf Fix [i] duplicating in GC 2022-10-08 10:36:06 +02:00
Len 3bdaa798c3 Continue the loop do not break it. 2022-10-03 19:39:41 +02:00
Len 7fcfb2321f Update config style 2022-10-03 19:29:25 +02:00
Len 7af91c1c94 Fix permission for emoteslist 2022-10-03 19:13:42 +02:00
Len 7de83f536b Show correct nickname in previews 2022-10-03 18:27:58 +02:00