Fixed filter bypass
This commit is contained in:
parent
3636255e8a
commit
8b747a81e1
@ -191,10 +191,11 @@ public class Chat extends MiniPlugin
|
|||||||
{
|
{
|
||||||
final Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
final String plyrname = player.toString();
|
final String plyrname = player.toString();
|
||||||
final String msg = event.getMessage();
|
final String msg = event.getMessage().replaceAll("[^\\x00-\\x7F]", "").trim();
|
||||||
final String filtertype = "chat";
|
final String filtertype = "chat";
|
||||||
final String dname = player.getPlayerListName();
|
final String dname = player.getPlayerListName();
|
||||||
|
|
||||||
|
|
||||||
JSONObject message = buildJsonChatObject(filtertype, dname, plyrname, msg, _serverName, 1);
|
JSONObject message = buildJsonChatObject(filtertype, dname, plyrname, msg, _serverName, 1);
|
||||||
String response = getResponseFromTwoHat(message, filtertype);
|
String response = getResponseFromTwoHat(message, filtertype);
|
||||||
|
|
||||||
@ -208,7 +209,7 @@ public class Chat extends MiniPlugin
|
|||||||
|
|
||||||
if (risk >= 5)
|
if (risk >= 5)
|
||||||
{
|
{
|
||||||
String filteredMessage = event.getMessage();
|
String filteredMessage = event.getMessage().replaceAll("[^\\x00-\\x7F]", "").trim();
|
||||||
|
|
||||||
if (parseHashes(response) == null)
|
if (parseHashes(response) == null)
|
||||||
event.setMessage(ChatColor.RED + msg);
|
event.setMessage(ChatColor.RED + msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user