SteamWar/BungeeCore
Archiviert
13
2

Merge branch 'master' into discord-bot

# Conflicts:
#	src/de/steamwar/bungeecore/bot/listeners/IngameChatListener.java
Dieser Commit ist enthalten in:
yoyosource 2021-07-30 09:16:04 +02:00
Commit 67566c2327
2 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -41,10 +41,10 @@ public class IngameChatListener extends BasicDiscordListener {
} }
Member member = event.getMember(); Member member = event.getMember();
SteamwarUser steamwarUser = SteamwarUser.get(member.getIdLong()); SteamwarUser steamwarUser = SteamwarUser.get(member.getIdLong());
if (steamwarUser == null) { if (steamwarUser == null || event.getMessage().getContentRaw().length() > 250) {
event.getMessage().delete().complete(); event.getMessage().delete().complete();
} else { } else {
ChatListener.discordChat(steamwarUser, event.getMessage().getContentRaw().replaceAll("\\$[a-f0-9]", "")); ChatListener.discordChat(steamwarUser, event.getMessage().getContentDisplay().replaceAll("§[a-f0-9]", "").replace('\n', ' '));
} }
} }

Datei anzeigen

@ -173,7 +173,10 @@ public class ChatListener extends BasicListener {
} }
public static void discordChat(SteamwarUser user, String message){ public static void discordChat(SteamwarUser user, String message){
String name = user.getUserGroup().getColorCode() + user.getUserGroup().name() + " " + user.getUserName() + "§r"; String name = "§r" + user.getUserGroup().name() + " " + user.getUserName() + "§r";
if (user.getUserGroup() != UserGroup.Member) {
name = user.getUserGroup().getColorCode() + user.getUserGroup().name() + " " + user.getUserName() + "§r";
}
String chatcolor = user.getUserGroup().getChatColorCode(); String chatcolor = user.getUserGroup().getChatColorCode();
if(user.getUserGroup() != UserGroup.Member || user.getTeam() == 12 || user.getTeam() == 285 || user.getTeam() == 54) if(user.getUserGroup() != UserGroup.Member || user.getTeam() == 12 || user.getTeam() == 285 || user.getTeam() == 54)