Add config option to disable message social spy (#3910)

Adds a config option to allow to prevent socialspy from reading private messages. Useful if all you want from social spy is to read commands defined in the list.

Closes #1095.
This commit is contained in:
Josh Roy 2021-02-05 14:02:26 -05:00 committed by GitHub
parent cb168b0c8a
commit 500edb7860
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 15 deletions

View file

@ -379,6 +379,11 @@ public class Settings implements net.ess3.api.ISettings {
return config.getBoolean("socialspy-listen-muted-players", true);
}
@Override
public boolean isSocialSpyMessages() {
return config.getBoolean("socialspy-messages", true);
}
private Set<String> _getMuteCommands() {
final Set<String> muteCommands = new HashSet<>();
if (config.isList("mute-commands")) {