Revert "Permbans are now indefinite bans."

This reverts commit 4003db6dd9.
This commit is contained in:
Seth
2020-08-09 17:49:20 -07:00
parent 4003db6dd9
commit 54df0e08f5
8 changed files with 119 additions and 232 deletions

View File

@ -3,14 +3,14 @@ package me.totalfreedom.totalfreedommod.httpd.module;
import java.io.File;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.banning.IndefiniteBanList;
import me.totalfreedom.totalfreedommod.banning.PermbanList;
import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
public class Module_indefbans extends HTTPDModule
public class Module_permbans extends HTTPDModule
{
public Module_indefbans(TotalFreedomMod plugin, NanoHTTPD.HTTPSession session)
public Module_permbans(TotalFreedomMod plugin, NanoHTTPD.HTTPSession session)
{
super(plugin, session);
}
@ -18,17 +18,17 @@ public class Module_indefbans extends HTTPDModule
@Override
public NanoHTTPD.Response getResponse()
{
File permbanFile = new File(plugin.getDataFolder(), IndefiniteBanList.CONFIG_FILENAME);
File permbanFile = new File(plugin.getDataFolder(), PermbanList.CONFIG_FILENAME);
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 indefinite ban list. Your IP, " + remoteAddress + ", is not registered to an admin on the server.");
"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(), IndefiniteBanList.CONFIG_FILENAME));
return HTTPDaemon.serveFileBasic(new File(plugin.getDataFolder(), PermbanList.CONFIG_FILENAME));
}
else
{