From d666689465044107e58bdaed3085e7c963a09a16 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 30 Jul 2021 09:44:55 +0200 Subject: [PATCH] Fix IngameChatListener --- .../bungeecore/bot/listeners/IngameChatListener.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/de/steamwar/bungeecore/bot/listeners/IngameChatListener.java b/src/de/steamwar/bungeecore/bot/listeners/IngameChatListener.java index 42116e68..42b878fe 100644 --- a/src/de/steamwar/bungeecore/bot/listeners/IngameChatListener.java +++ b/src/de/steamwar/bungeecore/bot/listeners/IngameChatListener.java @@ -44,6 +44,11 @@ public class IngameChatListener extends BasicDiscordListener { if (steamwarUser == null || event.getMessage().getContentRaw().length() > 250) { event.getMessage().delete().complete(); } else { + String s = event.getMessage().getContentDisplay(); + if (!steamwarUser.getUserGroup().isTeamGroup() && (s.contains("http") || s.contains("www"))) { + event.getMessage().delete().complete(); + return; + } ChatListener.discordChat(steamwarUser, event.getMessage().getContentDisplay().replaceAll("ยง[a-f0-9]", "").replace('\n', ' ')); } }