method renamed
This commit is contained in:
parent
9647a48fb6
commit
23ddeb539c
@ -356,7 +356,7 @@ class ManiaControl implements CommandListener, TimerListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Connect finished
|
// Connect finished
|
||||||
$this->log("Server Connection successfully established!");
|
$this->log('Server Connection successfully established!');
|
||||||
|
|
||||||
// Hide old widgets
|
// Hide old widgets
|
||||||
$this->client->sendHideManialinkPage();
|
$this->client->sendHideManialinkPage();
|
||||||
|
@ -233,13 +233,13 @@ class ManiaExchangeManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Map Info Asynchronously
|
* Fetch Map Info asynchronously
|
||||||
*
|
*
|
||||||
* @param int $mapId
|
* @param int $mapId
|
||||||
* @param callable $function
|
* @param callable $function
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getMapInfo($mapId, callable $function) {
|
public function fetchMapInfo($mapId, callable $function) {
|
||||||
// Get Title Prefix
|
// Get Title Prefix
|
||||||
$titlePrefix = $this->maniaControl->mapManager->getCurrentMap()->getGame();
|
$titlePrefix = $this->maniaControl->mapManager->getCurrentMap()->getGame();
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ class MapManager implements CallbackListener {
|
|||||||
public function addMapFromMx($mapId, $login, $update = false) {
|
public function addMapFromMx($mapId, $login, $update = false) {
|
||||||
if (is_numeric($mapId)) {
|
if (is_numeric($mapId)) {
|
||||||
// Check if map exists
|
// Check if map exists
|
||||||
$this->maniaControl->mapManager->mxManager->getMapInfo($mapId, function (MXMapInfo $mapInfo) use (&$login, &$update) {
|
$this->maniaControl->mapManager->mxManager->fetchMapInfo($mapId, function (MXMapInfo $mapInfo) use (&$login, &$update) {
|
||||||
if (!$mapInfo || !isset($mapInfo->uploaded)) {
|
if (!$mapInfo || !isset($mapInfo->uploaded)) {
|
||||||
// Invalid id
|
// Invalid id
|
||||||
$this->maniaControl->chat->sendError('Invalid MX-Id!', $login);
|
$this->maniaControl->chat->sendError('Invalid MX-Id!', $login);
|
||||||
|
Loading…
Reference in New Issue
Block a user