Fix ipv6 introduced in latest TFS

This commit is contained in:
slawkens 2022-12-16 23:05:43 +01:00
parent ad75499a91
commit e552bcfe82

View File

@ -697,7 +697,14 @@ else if ($id > 0 && isset($player) && $player->isLoaded())
<label for="lastip" class="control-label">Last IP:</label> <label for="lastip" class="control-label">Last IP:</label>
<input type="text" class="form-control" id="lastip" name="lastip" <input type="text" class="form-control" id="lastip" name="lastip"
autocomplete="off" autocomplete="off"
maxlength="10" value="<?php echo longToIp($player->getLastIP()); ?>" maxlength="10" value="<?php
if (strlen($player->getLastIP()) > 11) {
echo inet_ntop($player->getLastIP());
}
else {
echo longToIp($player->getLastIP());
}
?>"
readonly/> readonly/>
</div> </div>
</div> </div>
@ -894,4 +901,4 @@ else if ($id > 0 && isset($player) && $player->isLoaded())
$("#player_outfit").attr("src", new_outfit); $("#player_outfit").attr("src", new_outfit);
console.log(new_outfit); console.log(new_outfit);
} }
</script> </script>