Merge branch 'master' into discord-bot
# Conflicts: # src/de/steamwar/bungeecore/bot/listeners/IngameChatListener.java
Dieser Commit ist enthalten in:
Commit
67566c2327
@ -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', ' '));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren