this is how you properly silence bells

This commit is contained in:
ZeroEpoch1969
2019-07-30 21:35:41 -07:00
parent 95ef7d6cfe
commit 9cb4bd7822
9 changed files with 52 additions and 91 deletions

View File

@ -19,12 +19,16 @@ public class Module_permbans extends HTTPDModule
public NanoHTTPD.Response getResponse()
{
File permbanFile = new File(plugin.getDataFolder(), PermbanList.CONFIG_FILENAME);
final String remoteAddress = socket.getInetAddress().getHostAddress();
// 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();
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));