Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SimpleChatFilter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DapperGoose
SimpleChatFilter
Commits
c46974e7
Verified
Commit
c46974e7
authored
2 years ago
by
TheJoeCoder
Browse files
Options
Downloads
Patches
Plain Diff
Add README and fix bug
Signed-off-by:
TheJoeCoder
<
joe@radialbog9.uk
>
parent
a3c95d4d
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#41
canceled
2 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+33
-0
33 additions, 0 deletions
README.md
src/main/java/net/dappergoose/simplechatfilter/SimpleChatFilter.java
+1
-1
1 addition, 1 deletion
...va/net/dappergoose/simplechatfilter/SimpleChatFilter.java
with
34 additions
and
1 deletion
README.md
0 → 100644
+
33
−
0
View file @
c46974e7
# SimpleChatFilter
A simple chat filter for Bungeecord servers.
## Permissions
*
`simplechatfilter.bypass.<category>`
- Bypass the chat filter for the category.
*
`simplechatfilter.bypass.*`
- Bypass the chat filter entirely.
*
`simplechatfilter.staff`
- See staff message when a player breaches the chat filter.
## Configuration
```
yaml
# The list of categories to be filtered.
# Place the categories in order of severity, highest first.
# Only the most severe category will be applied to a message.
categories
:
# A category name
# Can be anything you want
advertising-pfcloud
:
# Blocked phrases
# These are case-insensitive.
# If the message contains any of these, it will be blocked.
blocked
:
-
a friendly bot designed to join servers
-
If you are searching for a good server hosting provider
-
https://shop.pfcloud.io
# The commands to run when a message is blocked. Use {username} for the offending player's username.
commands
:
-
ipban {username} Bot/Advertising -s
# A message to send to the player when their message is blocked.
message
:
'
&cPlease
do
not
advertise!'
# The message to send to staff when a player breaches the chat filter.
staff-message
:
'
&a[ChatFilter]
&c{username}
&7
broke
rule
&c{category}
&7on
server
&c{server}&7.'
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/net/dappergoose/simplechatfilter/SimpleChatFilter.java
+
1
−
1
View file @
c46974e7
...
...
@@ -95,7 +95,7 @@ public final class SimpleChatFilter extends Plugin implements Listener {
)
));
for
(
String
command
:
pluginConfig
.
getStringList
(
"categories."
+
matchedCategory
+
".commands"
))
{
getProxy
().
getPluginManager
().
dispatchCommand
(
getProxy
().
getConsole
(),
command
.
replace
(
"{
player
}"
,
p
.
getName
()));
getProxy
().
getPluginManager
().
dispatchCommand
(
getProxy
().
getConsole
(),
command
.
replace
(
"{
username
}"
,
p
.
getName
()));
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment