Commit Graph
100 Commits
Author SHA1 Message Date
auto 769859a617 Fix bypass permission logic for ignored players in chat
Updated the filtering logic to correctly handle the "chat.ignorebypass" permission, ensuring players with bypass permission are not excluded due to ignore settings. Adjusted related conditionals in ChatHandler and ChatListener, and refactored patterns without altering functionality.
2025-03-22 02:44:42 +01:00
auto cb0bda8d5b Prevent sending mail to ignored players.
Added a check to block users from sending mail to players who have ignored them. A message is displayed to inform the sender, ensuring clearer communication and respecting player preferences.
2025-03-21 22:56:10 +01:00
auto 5212954946 Refactor config reload and server name handling.
Replaced inconsistent `ReloadConfig` usage with `reloadConfig` across the codebase for better naming consistency. Introduced `ServerName` utility to standardize server name retrieval and improve maintainability. Added logging enhancements for better debugging of muted users and blocked messages.
2025-03-21 22:55:57 +01:00
auto f1b8af6136 Merge branch 'ignore_fix' 2025-03-21 20:35:06 +01:00
auto 9e437079e4 Remove Galaxy dependency
Switched back to paper since we don't use any features from Galaxy that aren't already in paper
2025-03-21 20:34:45 +01:00
auto 45eceaf4a6 Merge branch 'main' into ignore_fix 2025-01-02 00:37:11 +01:00
auto 3275db13d0 Merge branch 'main' into vote_mute 2025-01-02 00:36:36 +01:00
auto c5eebb7e88 Merge remote-tracking branch 'origin/main' 2025-01-02 00:36:11 +01:00
auto 5e34e6e7fa Don't ignore users with bypass permission
Refactored chat logic to respect 'chat.ignorebypass' permission for both senders and receivers. This only applies to cases where a user is sending text to another user, checks for login/out messages were not fixed
2025-01-02 00:30:55 +01:00
auto c5c60d25b1 Cleanup 2025-01-02 00:22:03 +01:00
auto b3e545a0c8 Log custom messages sent in custom channels
Added a log statement to capture and log information whenever a message is sent in a custom channel. This includes the player's name, the channel name, and the message content for better monitoring and debugging.
2024-09-25 20:03:12 +02:00
auto 0877d05296 Merge remote-tracking branch 'origin/main' 2024-07-19 22:03:03 +02:00
auto 340975e99e Change default config file path
The path to the configuration file that was initially set to the user's home directory has been modified. It has been shifted to "/mnt/configs/ChatPlugin".
2024-07-19 20:46:39 +02:00
auto a908e32d0b Fix message validation and chat log order
Corrected conditional logic in VoteToMuteHelper to validate messages properly and adjusted sorting of chat logs in VoteToMuteStarter to display in reverse chronological order. The update now accurately verifies the existence of selected messages and presents recent logs first for more user-friendly navigation.
2024-06-04 21:18:57 +02:00
auto 8393d12c6d Update vote-to-mute feature
The vote-to-mute feature is updated to include information about the vote initiating player. Also, the duration to retrieve chat logs increased from 5 minutes to 10 minutes. Lastly, eligible players are now notified live about the voting progress.
2024-05-05 16:14:48 +02:00
auto 782c7df4ef Update vote to mute functionality in chat system
Several changes were made to update the vote to mute functionality in the chat system. The threshold for eligible players online for vote has been changed from 10 to 6. In addition, improvements have been made to prevent the vote from ending prematurely. Lastly, feedback messages to users when they cast their vote and an update to the vote start message format have been implemented.
2024-05-05 15:42:59 +02:00
auto a876a9f77b Update vote validation and argument naming
Updated the method "votePassed" in "ActiveVoteToMute" to consider a scenario where no votes have been made for muting. Also, corrected the argument name from "yesno" to "yesNo" in "VoteToMuteHelper" to match with its name in the command constructor
2024-05-05 00:11:56 +02:00
auto f3147b3256 Refine ChatPlugin and improve "vote to mute" logic
Modified ChatPlugin to include "thisPlugin" within the ShutdownListener initialization. Additionally, adjusted the mute vote failure message color from green to red in ActiveVoteToMute file and added a condition to return false if there are no votes. Also, made improvements to the pagination logic in the VoteToMuteStarter file. Lastly, improved the chat logging mechanics in ChatLogHandler by adding and refining various log information for capturing action details.
2024-05-04 23:41:27 +02:00
auto 65503a02f3 Refactor death message display in PlayerListener
The commit refactors the method for displaying player death messages in the PlayerListener class. Specifically, it adds functionality to replace usernames with display names in death notifications. More descriptive death messages with themed colors and icons are now shown.
2024-04-30 22:15:46 +02:00
auto 7140a0cd78 Merge branch 'main' into vote_mute 2024-04-28 21:38:26 +02:00
auto 99f66c3b4b Prevent empty stack exception in PlayerListener
An additional condition is added to prevent an exception from being thrown when attempting to peek an empty stack in the PlayerListener.java file. This should resolve issues where checking if the playerDeathsStack is before the cut off time caused an empty stack exception error.
2024-04-28 21:38:12 +02:00
auto 187f71d6c3 Implement logging for ChatLogHandler
The ChatLogHandler now includes logging for better troubleshooting and understanding of the server state. Logging triggers when chat logging is disabled, when it starts, and also if there's a failure in saving chat messages to the database.
2024-04-28 21:36:45 +02:00
auto 3b2aa84164 Add player muted logging and abstract embed building
The update introduces a log entry indicating when a player has been muted due to voting. The embed creation for this process has been isolated and extracted into a separate function. This contributes to better code modularity and organization.
2024-04-13 16:52:56 +02:00
auto 0fb497c2f1 Merge branch 'main' into vote_mute 2024-04-13 16:15:56 +02:00
auto de24ca4437 Refactor PlayerListener for mute handling and text prioritization
Improved the PlayerListener class by adjusting event handling priority and adding nullability constraints for PlayerDeathEvent for better program robustness. Also removed a now unused import of the TextComponent class for cleaner codebase management.
2024-04-13 16:15:35 +02:00
auto e351e86bea Add mute handling and text styling in PlayerListener
Enhanced PlayerListener feature by incorporating checks for server mute status before sending death messages. Additionally, styled the death messages by adding text color and italics when mute state is false to improve readability.
2024-04-10 22:02:01 +02:00
auto 192fca3a89 Fix chat log message deletion query
Corrected the SQL query in the `deleteOldMessages` method within `ChatLogQueries.java`. Originally, it was incorrectly deleting newer messages rather than older ones due to an incorrect comparison symbol. It has now been adjusted to properly delete older messages based on the provided duration.
2024-04-07 19:16:32 +02:00
auto d6135f2456 Add mute vote results sent to Discord and staff presence check
Enhanced the vote-to-mute feature by adding a function that sends the mute vote results to a general channel on Discord. A 'staff presence' check has also been added which prevents the mute vote from being initiated if a staff member is online, instead, it prompts users to directly contact a staff member for help.
2024-04-07 18:29:46 +02:00
auto c057c69653 Enable optional logging in ChatLogHandler
Modified the ChatLogHandler to support optional logging by introducing a new argument in the getInstance() method. This argument sets the logging state during instantiation. This facilitates better flexibility when using the ChatLogHandler across different sections of the code base as logging requirements may differ.
2024-04-07 18:11:19 +02:00
auto c25767e473 Add VoteToMuteHelper and enhance ActiveVoteToMute
Implemented a new module titled VoteToMuteHelper to enhance the voting system and augment the user experience. This module enhances the system by providing relevant player suggestions and setting up the mute player. Made updates to the ActiveVoteToMute module to handle potential voters and mute the player if the vote is passed. VoteToMute module is also updated to include the total eligible players. The code is made robust by adding appropriate error checks.
2024-04-07 18:07:20 +02:00
auto 37aa9fdf4c Replace Object2ObjectOpenHashMap with HashMap
The usage of Object2ObjectOpenHashMap in storing chat logs and the chat log handler was switched to HashMap. This was done to ensure the plugin can be run on proxy as velocity does not include this library
2024-04-07 16:32:33 +02:00
auto ed2ba74772 Add start of VoteToMute functionality in chat system
Implemented VoteToMute system enabling initiated voting for muting a player in chat. This includes creating new classes "ActiveVoteToMute", "VoteToMute", and "VoteToMuteStarter". The "VoteToMute" class handles the voting command logic, it allows players to vote on whether to mute other players. The code also adds a call to register this new command in the main VelocityChat class.
2024-04-06 19:39:36 +02:00
auto 44d6e994cc Implement chat log handler with database support
The code changes introduce the ability to log chat messages. A new ChatLogHandler class has been added that manages the queue of chat log messages, both storing them in memory and writing them to a database. New columns have been added to the database and the interactivity with the database is handled using prepared statements to improve security and performance. The chat messages are deleted from the database after a certain period, which can be configured.
2024-04-06 17:25:15 +02:00
auto 4e92285261 Add throwable to warn and error methods in ALogger
This update introduces modifications to the 'ALogger.java' file to handle possible exceptions more efficiently. It extends the warn and error functions to include a Throwable parameter, making error logs more informative for easier debugging.
2024-04-06 15:35:08 +02:00
auto a377bdfe48 Implement player death message limits
The code now includes player death message limits, with a configured maximum number of messages per defined period. This was added in the PlayerListener class and configuration options were placed in Config.java. This change will restrict spamming of death messages.
2024-04-06 13:11:05 +02:00
auto 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
auto 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
auto 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
auto 278129e8d8 Changed pinging to prevent ping for not @'d user
Allowed \ to escape ping
2023-08-14 01:29:06 +02:00
auto f1deebf49e Merge remote-tracking branch 'origin/main' 2023-08-11 22:30:34 +02:00
auto 3e29fc7d17 Added minimum hex value for nick colors 2023-08-11 22:30:23 +02:00
auto 4b930e62c3 Log party messages that are from a toggled user on the local server as well 2023-07-10 23:33:42 +02:00
auto c02e4dd884 Log all party messages 2023-07-10 23:15:08 +02:00
auto 8a463696ed Made chatusermanager use synchronized functions 2023-07-07 23:16:32 +02:00
auto ce5ea19961 Removed unused imports 2023-07-07 23:16:15 +02:00
auto 591ca93981 Fixed first join messages only working if chat user is not loaded yet 2023-07-07 23:15:45 +02:00
auto d7cfe97644 Added first join messages back 2023-06-26 21:40:15 +02:00
auto c86a344d49 Trying a different way to see if a player is a new player 2023-06-22 02:00:51 +02:00
auto 5583abbbca Fix party info not showing if party owner is null 2023-06-20 23:44:32 +02:00
auto 55918670bc Maybe fixed mentions 2023-06-20 00:40:44 +02:00
auto f3c7a312c0 Added first join messages 2023-06-20 00:35:46 +02:00
auto d8f064e7ca Fix spy needing mute-server permission 2023-06-20 00:09:48 +02:00
auto 9b7868bea7 Fix mentions happening within words 2023-06-17 23:58:33 +02:00
auto 6c6b798677 Fix load order 2023-04-23 22:48:33 +02:00
auto 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
auto 0c7ad69e85 Only replace the first instance of a name/nickname 2022-10-09 19:33:06 +02:00
auto 7ef9b4a64a Make .replace require a TextReplacementConfig 2022-10-09 19:32:51 +02:00
auto 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
auto ea051fd905 Fixed spacing for target replacement 2022-10-09 01:21:10 +02:00
auto 87d5c1b264 Fixed blocked messages not highlighting what was blocked 2022-10-09 01:18:13 +02:00
auto 5e62786010 Fixed case-sensitive name matching for replacing names/nicknames 2022-10-09 00:47:43 +02:00
auto 4f01c86877 @ players when they are mentioned by name or nickname (case-insensitive) 2022-10-09 00:36:50 +02:00
auto 6beb398e10 Added a way to replace text with components and patterns with strings/components 2022-10-09 00:36:07 +02:00
auto d7bd3aa222 Switched to using minimessage (mostly) 2022-10-02 04:52:33 +02:00
auto 9407ba8bec Switched to using minimessage (mostly) 2022-10-02 03:52:02 +02:00
auto 341a330e3d Removed sout for adding party users 2022-09-22 23:53:09 +02:00
auto 0339458c66 Added logging for chat messages 2022-09-22 23:52:46 +02:00
auto 9832abbb90 Fixed only sending to ignored players 2022-06-25 06:10:17 +02:00
auto 35ad214901 Fixed regex injection 2022-06-02 05:09:43 +02:00
auto 32e38ef32b spot the bug 2022-06-02 04:57:04 +02:00
auto b1f2370bec Added continue, fixed mail 2022-06-02 03:48:51 +02:00
auto 20c7f0a6d9 ez tmp fix for sendername receivername not being replaced properly 2022-05-30 23:59:54 +02:00
auto 40a6e6bcc9 Fixed colors not working in chat 2022-05-30 22:10:54 +02:00
auto 7ab95e437a Fixed bypass spam limits by spamming more than one character 2022-05-30 19:58:00 +02:00
auto 4068ad8ea6 Fixed message for toggling chat channel
Fixed stack overflow for untoggling chat channels
2022-05-30 19:43:31 +02:00
auto 82eecc3142 Colored toggle word, improved default party online/offline marker 2022-05-30 19:27:47 +02:00
auto 679602c1f7 Registered SilentJoinCommand 2022-05-30 19:19:41 +02:00
auto 0997c2bab6 Disable toggles on join 2022-05-24 04:20:21 +02:00
auto e39bab34fd Moved class to more logical place 2022-05-24 04:18:34 +02:00
auto 41897f4b16 Added toggle to party as well and made it so it can be added to other channels if needed 2022-05-24 04:17:55 +02:00
auto 60e1ad2220 Added a way to toggle custom channels 2022-05-24 03:06:34 +02:00
auto c645201ef3 Removed variable, moved call inline 2022-05-24 02:50:18 +02:00
auto fdd9d81400 Fix party users not being removed correctly (they left the party but still had their party id set) 2022-05-24 02:49:36 +02:00
auto 3e313cb00b Fixed being able to bypass replacement filters by having multiple of the same match in one string 2022-05-24 02:41:11 +02:00
auto dac0f7936e Use util to parse message 2022-05-24 02:06:28 +02:00
auto 0a6dfe799e Properly handle filtered messages in party chat 2022-03-15 00:20:07 +01:00
auto 98475583a9 Gave report an error message 2022-03-05 04:52:10 +01:00
auto 09507999aa Added player does not exist message when sending a message to a player that's not online 2022-03-02 17:36:15 +01:00
auto 7c9b12c394 Don't let someone join a party they are already in 2022-03-02 17:30:19 +01:00
auto 23e7c57333 Use exceptions for filters, highlight words that were filtered 2022-02-27 18:29:41 +01:00
auto b6aa5bed73 Removed forgotten debug message 2022-02-24 17:19:41 +01:00
auto 5f58cbe62a Merge remote-tracking branch 'origin/4.9' into 4.9 2022-02-20 19:12:41 +01:00
auto a0c626a88f Add confirmation message, change color, fix author icon url 2022-02-20 19:12:20 +01:00
auto 8d6efe0265 Don't ask for player 2022-02-20 19:03:11 +01:00
auto 56010fb9ad Added /report probably (and fixed party chat tab complete) 2022-02-20 18:19:52 +01:00
autoanddestro174 8fd784bba1 Maybe added proxydiscordlink and added report command 2022-02-19 16:58:22 +01:00
autoanddestro174 956d04abe0 Added party leave notif 2022-02-19 16:58:22 +01:00
autoanddestro174 e0ed414a38 Added confirmation message to mail sent 2022-02-19 16:58:22 +01:00
autoanddestro174 fcb2adb009 Maybe made nicknames auto sync 2022-02-19 16:58:22 +01:00
autoanddestro174 a3d1910c7d Fixed party notifs and spy 2022-02-19 16:58:22 +01:00