mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
remove this blocked string & don't send messages containing discord.gg to server-chat
This commit is contained in:
parent
30fd3ea6a1
commit
c1f0d81fcc
@ -73,12 +73,6 @@ public class ChatManager extends FreedomService
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.startsWith("Connected using PickaxeChat for "))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// Truncate messages that are too long - 256 characters is vanilla client max
|
||||
if (message.length() > 256)
|
||||
{
|
||||
|
@ -292,6 +292,12 @@ public class Discord extends FreedomService
|
||||
{
|
||||
message = StringUtils.remove(message, "@");
|
||||
}
|
||||
|
||||
if (message.toLowerCase().contains("discord.gg"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (enabled && !chat_channel_id.isEmpty())
|
||||
{
|
||||
CompletableFuture<Message> sentMessage = bot.getTextChannelById(chat_channel_id).sendMessage(message).submit(true);
|
||||
|
Loading…
Reference in New Issue
Block a user