Merge pull request #48 from RoboMWM/patch-13

Log auto-muted chat messages
This commit is contained in:
Ryan Hamshire 2016-05-11 10:59:42 -07:00
commit 4202290cf2

View File

@ -164,7 +164,9 @@ class PlayerEventHandler implements Listener
//otherwise assume chat troll and mute all chat from this sender until an admin says otherwise //otherwise assume chat troll and mute all chat from this sender until an admin says otherwise
else if(GriefPrevention.instance.config_trollFilterEnabled) else if(GriefPrevention.instance.config_trollFilterEnabled)
{ {
String notificationMessage = "(Auto-Muted " + player.getName() + "): " + message;
GriefPrevention.AddLogEntry("Auto-muted new player " + player.getName() + " for profanity shortly after join. Use /SoftMute to undo.", CustomLogEntryTypes.AdminActivity); GriefPrevention.AddLogEntry("Auto-muted new player " + player.getName() + " for profanity shortly after join. Use /SoftMute to undo.", CustomLogEntryTypes.AdminActivity);
GriefPrevention.AddLogEntry(notificationMessage, CustomLogEntryTypes.MutedChat, false);
GriefPrevention.instance.dataStore.toggleSoftMute(player.getUniqueId()); GriefPrevention.instance.dataStore.toggleSoftMute(player.getUniqueId());
} }
} }