mirror of
https://github.com/TotalFreedomMC/TotalFreedomMod.git
synced 2024-09-28 12:23:02 +00:00
Move it back to this
This commit is contained in:
parent
692bb5e2ef
commit
d323807675
|
@ -16,7 +16,7 @@ public class Module_activitylog extends HTTPDModule
|
|||
@Override
|
||||
public NanoHTTPD.Response getResponse()
|
||||
{
|
||||
final String remoteAddress = socket.getRemoteSocketAddress().toString();
|
||||
final String remoteAddress = socket.getInetAddress().getHostAddress();
|
||||
|
||||
if (!isAuthorized(remoteAddress))
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ public class Module_indefbans extends HTTPDModule
|
|||
{
|
||||
File indefbanFile = new File(plugin.getDataFolder(), IndefiniteBanList.CONFIG_FILENAME);
|
||||
|
||||
final String remoteAddress = socket.getRemoteSocketAddress().toString();
|
||||
final String remoteAddress = socket.getInetAddress().getHostAddress();
|
||||
if (!isAuthorized(remoteAddress))
|
||||
{
|
||||
return new NanoHTTPD.Response(NanoHTTPD.Response.Status.NOT_FOUND, NanoHTTPD.MIME_PLAINTEXT,
|
||||
|
|
|
@ -65,7 +65,7 @@ public class Module_logfile extends HTTPDModule
|
|||
}
|
||||
|
||||
final StringBuilder out = new StringBuilder();
|
||||
final String remoteAddress = socket.getRemoteSocketAddress().toString();
|
||||
final String remoteAddress = socket.getInetAddress().getHostAddress();
|
||||
final String[] args = StringUtils.split(uri, "/");
|
||||
final ModuleMode mode = ModuleMode.getMode(getArg(args));
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ public class Module_punishments extends HTTPDModule
|
|||
File punishmentFile = new File(plugin.getDataFolder(), PunishmentList.CONFIG_FILENAME);
|
||||
if (punishmentFile.exists())
|
||||
{
|
||||
final String remoteAddress = socket.getRemoteSocketAddress().toString();
|
||||
final String remoteAddress = socket.getInetAddress().getHostAddress();
|
||||
if (!isAuthorized(remoteAddress))
|
||||
{
|
||||
return new NanoHTTPD.Response(NanoHTTPD.Response.Status.NOT_FOUND, NanoHTTPD.MIME_PLAINTEXT,
|
||||
|
|
|
@ -131,7 +131,7 @@ public class Module_schematic extends HTTPDModule
|
|||
}
|
||||
case UPLOAD:
|
||||
{
|
||||
final String remoteAddress = socket.getRemoteSocketAddress().toString();
|
||||
final String remoteAddress = socket.getInetAddress().getHostAddress();
|
||||
if (!isAuthorized(remoteAddress))
|
||||
{
|
||||
out.append(HTMLGenerationTools.paragraph("Schematic upload access denied: Your IP, " + remoteAddress + ", is not registered to an admin on this server."));
|
||||
|
|
Loading…
Reference in a new issue