Move it back to this

This commit is contained in:
Telesphoreo 2021-06-29 21:36:06 -05:00
parent 692bb5e2ef
commit d323807675
5 changed files with 5 additions and 5 deletions

View file

@ -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))
{

View file

@ -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,

View file

@ -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));

View file

@ -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,

View file

@ -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."));