Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Commit

Permalink
Merge branch 'bugfix/110-ip-address-display'
Browse files Browse the repository at this point in the history
  • Loading branch information
oranges13 committed Jun 22, 2020
2 parents e55d77a + 00e223c commit b534c36
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

The **b**a**n** **m**anagement w**e**b **a**pp**l**ication (BoNeMEAL) makes it easy to manage your server's bans, mutes, kicks and warnings. It's designed to extend the [Ban-Management Bukkit plugin](http://dev.bukkit.org/bukkit-plugins/ban-management/) created by confuser by providing a clean, easy and responsive way to manage your punishments.

**PLEASE NOTE** This version currently only supports *BanManager 6 and below*. Schema changes introduced in Banmanager 7 have not been integrated into this application and are not currently supported.

# About this project

This project was started to offer an alternative or even a possible replacement for the clumsy "BanManager WebUI".
Expand Down
11 changes: 10 additions & 1 deletion application/app/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,19 @@ public function pastMutes()
return $this->hasManyRelation('App\PlayerMuteRecord');
}

public function getIpAttribute() {
// Unpack varbinary
$ip = unpack('C*', $this->attributes['ip']);
// Format IPv4 and IPv6 correctly
$glue = count($ip) == 4 ? "." : ":";
return implode($glue, $ip);
}

public function getUuidAttribute()
{
$this->attributes['uuid'] = id_to_uuid($this->attributes['id']);
return $this->attributes['uuid'];
// Fixes #109 when uuid not set
return $this->attributes['uuid'] ?: 'unset';
}

public function setUuidAttribute($value)
Expand Down
4 changes: 2 additions & 2 deletions updates.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"title": "BoNeMEAL v1.4.1",
"body": "<strong>SSL Mysql Connection Support</strong><br>Allows you to connect to MySQL servers that require SSL connections.<br>Various Bugfixes."
"title": "BoNeMEAL v1.4.2",
"body": "<strong>Support IPv6</strong><br>Ban Manager 7 supports players connecting via IPv6. If your database contains players with these addresses they will display properly."
}

0 comments on commit b534c36

Please sign in to comment.