Git Product home page Git Product logo

chatregulator's Introduction

Hi, I'm 4drian3d

  • ☕ Java and Kotlin Developer
  • 📗 Knowledge of Velocity API, Paper API, Sponge API and more

I'm mostly known for making a bunch of Velocity plugins, a few for Paper and others cross-platform

All my plugins are available at Modrinth

Modrinth

My stats

GitHub stats

chatregulator's People

Contributors

4drian3d avatar adrian3d04 avatar espryth avatar renovate[bot] avatar yosoyvillaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

chatregulator's Issues

[Feature Request] Ignored Commands

Is your feature request related to a problem? Please describe.
There are commands that do not need to be verified, for example: /pay 4drian3d 404777 or /banuuid as21231asd21(random uuid)

Describe the solution you'd like
That there is a configuration to ignore certain commands

Describe alternatives you've considered
Alternatives such as signs that execute commands, aliases, etc., but would not be cost-effective for most servers.

Additional context
To be implemented in ChatRegulator 3.0

[Feature Request] Adding a white list

It doesn't matter if it was a command or a message, but it's a useful thing.

Describe the solution you'd like
In the configuration, add a new whitelist block, in which you can write any words that will be ignored by pattern (regex). For example, allow a link to the server's store, IP address, and so on

Describe alternatives you've considered
None

Additional context
None

[BUG] Invalid output of <string> placeholder

Describe the bug
When using the placeholder in alert message, the regex is displayed instead of the original message sent by infractor.
D3adhkwen failed Swearing [sbdev] ([f(u|v|4)ck(er)?])
messages.conf:
alert="<aqua><player> <yellow>failed <red>Swearing <aqua>[<server>] <red>(<string>)"

Only happens when REPLACE mode is used.

To Reproduce
Steps to reproduce the behavior:

  1. Use placeholder in alert message with REPLACE mode

Expected behavior
The original message sent by infractor should be displayed.

Additional context
None

[Feature Request] Remove *** from strings in log

Please remove String: ***** the stars in strings in log, its hard to identify false positives etc. in case of regex

example:

[19:23:34] Hráč Deen použil zakázaný výraz: | String: ***** ze mam vytezit 16 zlata a furt mi jeste nedroplo ani jednou :D
[19:30:26] Hráč AmonisCZE použil zakázaný výraz: | String: nvm není **ůj miner ne?

[Feature Request] Syntax Blocker

Is your feature request related to a problem? Please describe.
It would be helpful to some to block plugin commands but use :, for example: /titleannouncer:announcetitle

Describe the solution you'd like
Block executed commands containing the : character in their first argument

Describe alternatives you've considered
Manually blocking each command, which is not feasible.

Additional context
It is an easy to implement check, probably to be done in version 2.2.0.

String Index Out Of Range Error

Hi,
Just recently started using your plugin on my velocity instance. Recently I have had this error popup on my logs and I'm not sure if this effects the actual running of the plugin. I have changed nothing in the config.

Error:
[19:36:52 ERROR]: Couldn't pass CommandExecuteEvent to chatregulator
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.StringLatin1.charAt(StringLatin1.java:48) ~[?:?]
at java.lang.String.charAt(String.java:711) ~[?:?]
at net.dreamerzero.chatregulator.modules.Replacer.addFinalDot(Replacer.java:21) ~[?:?]
at net.dreamerzero.chatregulator.modules.Replacer.applyFormat(Replacer.java:28) ~[?:?]
at net.dreamerzero.chatregulator.listener.command.CommandListener.onCommand(CommandListener.java:121) ~[?:?]
at net.dreamerzero.chatregulator.listener.command.Lmbda$19.execute(Unknown Source) ~[?:?]
at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity.jar:3.0.1]
at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:585) ~[velocity.jar:3.0.1]
at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:466) ~[velocity.jar:3.0.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
at java.lang.Thread.run(Thread.java:831) [?:?]

Thanks,
@swanserquack

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/ChatRegulatorBuild.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-java v4
  • nick-invision/retry v3.0.0
  • actions/upload-artifact v4
.github/workflows/codeql-analysis.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • github/codeql-action v3
  • github/codeql-action v3
  • github/codeql-action v3
gradle
gradle.properties
settings.gradle.kts
  • org.gradle.toolchains.foojay-resolver-convention 0.8.0
api/build.gradle.kts
common/build.gradle.kts
gradle/libs.versions.toml
  • net.kyori:adventure-api 4.15.0
  • net.kyori:adventure-text-minimessage 4.15.0
  • com.velocitypowered:velocity-api 3.3.0-SNAPSHOT
  • org.bstats:bstats-velocity 3.0.2
  • org.spongepowered:configurate-hocon 4.1.2
  • io.github.miniplaceholders:miniplaceholders-api 2.2.3
  • org.assertj:assertj-core 3.25.3
  • org.junit:junit-bom 5.10.2
  • org.mockito:mockito-core 5.10.0
  • com.spotify:completable-futures 0.3.5
  • com.github.ben-manes.caffeine:caffeine 3.1.8
  • org.slf4j:slf4j-api 2.0.12
  • net.kyori.blossom 2.1.0
  • com.github.johnrengelman.shadow 8.1.1
  • xyz.jpenilla.run-velocity 2.2.3
  • org.jetbrains.gradle.plugin.idea-ext 1.1.7
plugin/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.6

  • Check this box to trigger a request for Renovate to run again on this repository

[Feature Request] Add new moderation commands

Is your feature request related to a problem? Please describe.

Before i jump into specific features, i'd like to state that i've been using and thoroughly enjoying the plugin so far. The suggestions below mainly aim to enhance the overall functionalities of the plugin and add few more moderation features which are currently missing.

Describe the solution you'd like

These suggestions consist of:

  • New/chatregulator mute [server] command

Allows server admins to toggle the chat cross servers; enable or disable chat messages to be sent on specific servers. This can be very useful at times where chat gets messy. The above includes the introduction of 2 new permissions, the permission to use the command (chatregulator.command.mute) and a permission to bypass the mute and chat while messages are disabled (chatregulator.bypass.mute).

  • New Discord Integration

Provide a build-in or external compatibility to send Chat Regulator's alerts and punishments to a configurable discord channel. The webhook, would include several useful information in regards to the check (violation) as well as several player information you deem relevant.

Additional context

These suggested features would improve the overall experience of using the Chat Regulator plugin and have been heavily considered on both both players, administrators and plugin developer & contributors in mind. I'm eager to hear your thougths and feedback regarding these suggestions. Thank you for your time and consideration.

Kind regards,
ImDarkLaw

Discord support, capslock update

Hi, I would like to propose a new solution to the caps lock problem.
My suggestion is to change the maximum number of uppercase letters in the message to % uppercase in the message.
For long messages, this system would do much better.
For example, if the player's message is more than 60% uppercase. The player will get a warning

I would also like you to add support for the discord webhook.. This would make managing the server much easier when none of the administrators is online.
It would also provide interesting alert logs

Allow Cyrillic in Unicode

The entire Russian alphabet is blocked in Unicode, perhaps this is correct, but many Russian players play minecraft.

Allow the Unicode module to use the entire Russian alphabet using pattern.

[BUG] The plugin does not work correctly

Describe the bug
Nothing happens when there is a violation

Expected behavior
If you try to violate and look at the statistics, then it is added, but the violator is not punished, does not write anything. I used the usual settings, it didn't help either

Additional context
There are no errors. Config -- https://p.reflex.rip/eyab.bash.
Velocity v3.1.1

memory leak

hello there i found some memoryleak if you can fix it please

image

Error on Startup

This Error Code: Couldn't pass ProxyInitializeEvent to chatregulator
java.lang.NoSuchMethodError: 'net.kyori.adventure.text.format.TextDecorationAndState net.kyori.adventure.text.format.TextDecoration.withState(boolean)'

This error came on Start

Latest Velocity Version.
Java 16.

Please fix it.

[BUG] Blacklisted messages are not blocked.

Describe the bug
When on the latest Velocity and ChatRegulator build, chat messages that include blacklitsed words or phrases are not blocked. You are given the warning message yet your messages are still sent.

To Reproduce
Steps to reproduce the behavior:

  1. Install the ChatRegulator plugin latest version on the latest velocity release.
  2. Log on, test a message, you should see that your message goes through no matter what.

Expected behavior
Usually your messages would be blocked as prior behaviour of the plugin. However this bug allows players to say whatever vulgarities they want.

Additional context
Tested on both my production server and a brand new fresh local velocity server, behaviour persists.

[Feature Request] Show entire blocked message in staff notification

Is your feature request related to a problem? Please describe.
Sometimes, while reviewing blocked messages, more context is required to understand whether it was flagged correctly.

Describe the solution you'd like
The notification sent to staff when a message is blocked due to Blacklist should include the entire message, or at least make it an option. It should still highlight the part that matched a rule defined in the config, maybe in bold?

Describe alternatives you've considered
I've considered coding an integration in my own plugin, either by showing an additional notification message or replacing the ChatRegulator notifications system entirely. This is obviously kind of inconvenient for what looks like a simple feature at first glance.

Additional context
Not needed

Add a blacklist of commands

In case any of the commands entered in the list are executed, the command will be blocked or commands will be executed to prevent the player from executing that command.

command-blacklist:
- //calc
- //solve
- etc

[Bug] The flood module does not work correctly

If you try to write more than a message, a warning pops up.

I propose to rewrite the system and check every word, not the whole sentence, because the most common sentence is blocked, although there is a large limitation in the config

[BUG] Bug on command execution

This Error Code: Couldn't pass ProxyInitializeEvent to chatregulator
java.lang.NoSuchMethodError: 'net.kyori.adventure.text.format.TextDecorationAndState net.kyori.adventure.text.format.TextDecoration.withState(boolean)'

This error came on Start

Newest Velocity Version.
Java 16.

Please fix it.

[Feature Request] Ability to use <message> in staff alert message

Is your feature request related to a problem? Please describe.
The staff alert message now only shows the violation and server.

Describe the solution you'd like
Ability to display original message sent by infractor in staff alert message
For example:
<red>The player <aqua><player></aqua> <red>was using many caps in the chat of <aqua><server></aqua> server. (<message>)

Describe alternatives you've considered
None

Additional context
None

[Feature Request] Add a bypass command list to modules, cooldown system to messages.

Is your feature request related to a problem? Please describe.

  • Modules don't have a bypass to commands that could be considered sensitive/private commands such as login, register, changepassword.
  • Notification/alert messages easily stack when a player spam/trigger a module.

Describe the solution you'd like

  • Include a global list of commands to be ignored by modules.
  • Add a cooldown system to prevent repetitive/flooding notification/alert messages.

Describe alternatives you've considered

  • Regarding to repetitive/flooding notification/alert messages there could also be more extensive detection if the content/text change while on cooldown the message should be sent again.

Additional context

  • None

[BUG] Chat signing issues

Describe the bug
I'm getting the message "A plugin changed a signed chat message. The server may not accept it." on my proxy, while my server gets "SayWut sent message with invalid signature: "

To Reproduce
Use infractions module to replace the messages.

Expected behavior
Replaced message get sent instead

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.