Ensure sensitive information isn't shown without permission

This commit is contained in:
KingRainbow44 2023-08-26 21:14:36 -04:00
parent 621000fd4b
commit f660a7b8a4
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -29,24 +29,40 @@ public final class InfoCommand implements CommandHandler {
var questingEnabled = gameOptions.gameOptions.questing.enabled;
var scriptsEnabled = gameOptions.enableScriptInBigWorld;
// TODO: Send to remote server (Grasscutter API) and send dump link.
CommandHandler.sendMessage(sender, """
Credits
- Slushy Team (akio, azzu, Areha11Fz, tamil)
- Yuki (resource minifying & packaging)
- Dimbreath (dumping most resources)
Created by Meledy
- currently maintained by KingRainbow44
- formerly maintained by Birdulon
Other Credits
- Slushy Team (akio, azzu, Areha11Fz, tamil; protocol)
- Yuki (resource minifying & packaging)
- Dimbreath (dumping most resources)""");
// TODO: Send to remote server (Grasscutter API) and send dump link.
if (
sender == null
|| sender.getAccount()
.hasPermission("grasscutter.command.troubleshoot")
|| playerCount == 1
) {
CommandHandler.sendMessage(sender, """
Server Information
Revision: %s
Player Count: %d
Questing Enabled: %s
Scripts Enabled: %s
Operating System: %s
Resource Information: %s"""
.formatted(
build, playerCount, questingEnabled, scriptsEnabled,
System.getProperty("os.name"), resourceInfo.toString()
)
);
Resource Information: %s
discord.gg/T5vZU6UyeG"""
.formatted(
build, playerCount, questingEnabled, scriptsEnabled,
System.getProperty("os.name"), resourceInfo.toString()
)
);
} else {
CommandHandler.sendMessage(sender, """
Grasscutter Discord: discord.gg/T5vZU6UyeG""");
}
}
}