improved loading of update interval setting
This commit is contained in:
parent
192cb2cb79
commit
8ff4e191a8
@ -48,6 +48,7 @@
|
|||||||
<option name="FOR_BRACE_FORCE" value="3" />
|
<option name="FOR_BRACE_FORCE" value="3" />
|
||||||
<indentOptions>
|
<indentOptions>
|
||||||
<option name="USE_TAB_CHARACTER" value="true" />
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
|
<option name="SMART_TABS" value="true" />
|
||||||
</indentOptions>
|
</indentOptions>
|
||||||
<arrangement>
|
<arrangement>
|
||||||
<groups>
|
<groups>
|
||||||
|
@ -60,12 +60,13 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
|
|||||||
// Init settings
|
// Init settings
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_ENABLEUPDATECHECK, true);
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_ENABLEUPDATECHECK, true);
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_AUTO_UPDATE, true);
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_AUTO_UPDATE, true);
|
||||||
$updateIntervalSetting = $this->maniaControl->settingManager->initSetting($this, self::SETTING_UPDATECHECK_INTERVAL, 1);
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_UPDATECHECK_INTERVAL, 1);
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_UPDATECHECK_CHANNEL, self::CHANNEL_BETA);
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_UPDATECHECK_CHANNEL, self::CHANNEL_BETA);
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_PERFORM_BACKUPS, true);
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_PERFORM_BACKUPS, true);
|
||||||
|
|
||||||
// Register for callbacks
|
// Register for callbacks
|
||||||
$this->maniaControl->timerManager->registerTimerListening($this, 'hourlyUpdateCheck', 1000 * 60 * 60 * $updateIntervalSetting->value);
|
$updateInterval = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_UPDATECHECK_INTERVAL);
|
||||||
|
$this->maniaControl->timerManager->registerTimerListening($this, 'hourlyUpdateCheck', 1000 * 60 * 60 * $updateInterval);
|
||||||
$this->maniaControl->callbackManager->registerCallbackListener(PlayerManager::CB_PLAYERCONNECT, $this, 'handlePlayerJoined');
|
$this->maniaControl->callbackManager->registerCallbackListener(PlayerManager::CB_PLAYERCONNECT, $this, 'handlePlayerJoined');
|
||||||
$this->maniaControl->callbackManager->registerCallbackListener(PlayerManager::CB_PLAYERDISCONNECT, $this, 'handlePlayerDisconnect');
|
$this->maniaControl->callbackManager->registerCallbackListener(PlayerManager::CB_PLAYERDISCONNECT, $this, 'handlePlayerDisconnect');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user