added maniacontrol restart callback

This commit is contained in:
kremsy
2015-06-26 16:53:41 +02:00
parent 0b02f63309
commit 82e1dd1c65
4 changed files with 14 additions and 2 deletions

View File

@ -228,7 +228,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
$this->restart($data->message);
}
$this->restart();
}, 5000);
}, 3000);
return new CommunicationAnswer();
});
}
@ -507,6 +507,9 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
* @param string $message
*/
public function restart($message = null) {
// Trigger callback on Restart
$this->getCallbackManager()->triggerCallback(Callbacks::ONRESTART);
// Announce restart
try {
$this->getChat()->sendInformation('Restarting ManiaControl...');