Navigation Menu

Skip to content

Commit

Permalink
2017-06-01 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
undeflabs committed Jun 1, 2017
1 parent 4203975 commit 57c8556
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
4 changes: 3 additions & 1 deletion docs/CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@

### General changes

* Requires a `Maniaplanet Dedicated Server` build `2017-05-31_23_00` or higher
* Optimized again the map name handling: a map with a name like `ÐĘЯЯ@ MiNi LoL 21-5-17` results into a filename like `derra-mini-lol-21-5-17_121209.Map.gbx` instead of `de-mini-lol-21-5-17_121209.Map.gbx` (thanks askuri)
* Added `$map->name_slug` to class `includes/core/map.class.php` which holds the slugified version of a map name
* Added `$player->nickname_stripped` to class `includes/core/player.class.php` which holds the format and color stripped version of a nickname
Expand All @@ -17,8 +18,9 @@

### Bug fixes

* [PHP Notice] Undefined property: stdClass::$best on line 645 in file `plugins/plugin.checkpoints.php` (thanks phantom)
* Fixed [PHP Notice] Undefined property: stdClass::$best on line 645 in file `plugins/plugin.checkpoints.php` (thanks phantom)
* Fixed always return in `includes/core/plugin.class.php` in the method `getPlayerData()` which causes "You need to finish this map at least 1 time before being able to vote" in ManiaKarma and maybe more (thanks endbase for the research)
* Fixed wrong calculation of a player ranking average (thanks rasmusdk)



Expand Down
15 changes: 12 additions & 3 deletions includes/core/playerlist.class.php
Expand Up @@ -49,7 +49,7 @@ public function __construct ($debug) {

$this->setAuthor('undef.de');
$this->setVersion('1.0.1');
$this->setBuild('2017-05-31');
$this->setBuild('2017-06-01');
$this->setCopyright('2014 - 2017 by undef.de');
$this->setDescription('Manages Players on the server, add/remove Players and provides several get functions.');

Expand Down Expand Up @@ -516,7 +516,6 @@ public function recalculateRanks () {
}
sort($map_ids, SORT_NUMERIC);


$data = array();
$query = "
SELECT
Expand All @@ -537,9 +536,18 @@ public function recalculateRanks () {
$res->free_result();
}
foreach ($data as $map_id => $player_ids) {
$rank = 0;
foreach ($player_ids as $pid) {
if (isset($players[$pid])) {
$players[$pid]['sum'] += count($data[$map_id]);
$count = 1;
foreach ($data[$map_id] as $ply_pid) {
if ($pid == $ply_pid) {
$rank = $count;
break;
}
$count += 1;
}
$players[$pid]['sum'] += $rank;
$players[$pid]['count'] ++;
}
}
Expand All @@ -556,6 +564,7 @@ public function recalculateRanks () {
$query .= implode(',', $entries);
unset($entries);


// Check for size and warn
if (strlen($query) >= $aseco->db->settings['max_allowed_packet']) {
$aseco->console('[PlayerList][WARNING] SQL statement is larger then database "max_allowed_packet" of '. $aseco->db->settings['max_allowed_packet'] .' bytes! Please increase the database settings "max_allowed_packet" to a larger value!');
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin.modescript_handler.php
Expand Up @@ -58,7 +58,7 @@ public function __construct () {

$this->setAuthor('undef.de');
$this->setVersion('1.0.3');
$this->setBuild('2017-05-28');
$this->setBuild('2017-06-01');
$this->setCopyright('2014 - 2017 by undef.de');
$this->setDescription(new Message('plugin.modescript_handler', 'plugin_description'));

Expand Down
8 changes: 4 additions & 4 deletions uaseco.php
Expand Up @@ -21,7 +21,7 @@
*
* ----------------------------------------------------------------------------------
* Author: undef.de
* Copyright: May 2014 - May 2017 by undef.de
* Copyright: May 2014 - Jun 2017 by undef.de
* ----------------------------------------------------------------------------------
*
* LICENSE: This program is free software: you can redistribute it and/or modify
Expand All @@ -44,13 +44,13 @@
// Current project name, version and website
define('UASECO_NAME', 'UASECO');
define('UASECO_VERSION', '0.9.5');
define('UASECO_BUILD', '2017-05-31');
define('UASECO_BUILD', '2017-06-01');
define('UASECO_WEBSITE', 'https://www.UASECO.org');

// Setup required official dedicated server build, Api-Version and PHP-Version
define('MANIAPLANET_BUILD', '2017-05-22_21_00');
define('MANIAPLANET_BUILD', '2017-05-31_23_00');
define('XMLRPC_API_VERSION', '2013-04-16');
define('MODESCRIPT_API_VERSION', '2.1.0');
define('MODESCRIPT_API_VERSION', '2.1.1');
define('MIN_PHP_VERSION', '5.6.0');
define('MIN_MYSQL_VERSION', '5.1.0');
define('MIN_MARIADB_VERSION', '5.5.20');
Expand Down

0 comments on commit 57c8556

Please sign in to comment.