mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-29 19:46:42 +00:00
Revert "Revert "Permbans are now indefinite bans.""
This reverts commit 54df0e08f5
.
This commit is contained in:
@ -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.PermbanList;
|
||||
import me.totalfreedom.totalfreedommod.banning.IndefiniteBanList;
|
||||
import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon;
|
||||
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
|
||||
|
||||
public class Module_permbans extends HTTPDModule
|
||||
public class Module_indefbans extends HTTPDModule
|
||||
{
|
||||
|
||||
public Module_permbans(TotalFreedomMod plugin, NanoHTTPD.HTTPSession session)
|
||||
public Module_indefbans(TotalFreedomMod plugin, NanoHTTPD.HTTPSession session)
|
||||
{
|
||||
super(plugin, session);
|
||||
}
|
||||
@ -18,17 +18,17 @@ public class Module_permbans extends HTTPDModule
|
||||
@Override
|
||||
public NanoHTTPD.Response getResponse()
|
||||
{
|
||||
File permbanFile = new File(plugin.getDataFolder(), PermbanList.CONFIG_FILENAME);
|
||||
File permbanFile = new File(plugin.getDataFolder(), IndefiniteBanList.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 permban list. Your IP, " + remoteAddress + ", is not registered to an admin on the server.");
|
||||
"You may not view the indefinite ban 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));
|
||||
return HTTPDaemon.serveFileBasic(new File(plugin.getDataFolder(), IndefiniteBanList.CONFIG_FILENAME));
|
||||
}
|
||||
else
|
||||
{
|
Reference in New Issue
Block a user