Archiviert
1
0

Fix IngameChatListener

Dieser Commit ist enthalten in:
yoyosource 2021-07-30 09:44:55 +02:00
Ursprung 67566c2327
Commit d666689465

Datei anzeigen

@ -44,6 +44,11 @@ public class IngameChatListener extends BasicDiscordListener {
if (steamwarUser == null || event.getMessage().getContentRaw().length() > 250) { if (steamwarUser == null || event.getMessage().getContentRaw().length() > 250) {
event.getMessage().delete().complete(); event.getMessage().delete().complete();
} else { } 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', ' ')); ChatListener.discordChat(steamwarUser, event.getMessage().getContentDisplay().replaceAll("§[a-f0-9]", "").replace('\n', ' '));
} }
} }