permission system

This commit is contained in:
ZeroEpoch1969
2020-04-13 23:40:22 -07:00
parent e23bfa7f87
commit bc8ff3cd7f
44 changed files with 662 additions and 378 deletions

View File

@ -20,15 +20,12 @@ public class Module_permbans extends HTTPDModule
{
File permbanFile = new File(plugin.getDataFolder(), PermbanList.CONFIG_FILENAME);
// if people get mad that opening the permban list to the public causes a mass DDoS attack on the server due to ip
// leaks, it wasnt my idea
/*final String remoteAddress = socket.getInetAddress().getHostAddress();
final String remoteAddress = socket.getInetAddress().getHostAddress();
if (!isAuthorized(remoteAddress))
{
return new NanoHTTPD.Response(NanoHTTPD.Response.Status.NOT_FOUND, NanoHTTPD.MIME_PLAINTEXT,
"You may not view the permban list. Your IP, " + remoteAddress + ", is not registered to an admin on the server.");
}*/
}
if (permbanFile.exists())
{
return HTTPDaemon.serveFileBasic(new File(plugin.getDataFolder(), PermbanList.CONFIG_FILENAME));