workaround for unallowed characters in nicknames, player get kicked immideatly

This commit is contained in:
kremsy
2017-05-11 22:28:33 +02:00
parent c0d660adcd
commit 7c049d5222
2 changed files with 25 additions and 10 deletions

View File

@ -232,10 +232,18 @@ class CallbackManager implements UsageInformationAble {
}
// Handle callbacks
$timings = array();
$startTime = microtime(true);
$callbacks = $this->maniaControl->getClient()->executeCallbacks();
$timings = array();
$startTime = microtime(true);
try {
$callbacks = $this->maniaControl->getClient()->executeCallbacks();
} catch (ParseException $e) {
//TODO remove later, its for the wrong XML encoding of nadeo
return;
}
$timings["executeCallbacks"] = microtime(true) - $startTime;
foreach ($callbacks as $key => $callback) {
$time1 = microtime(true);
$this->handleCallback($callback);
@ -299,12 +307,8 @@ class CallbackManager implements UsageInformationAble {
$params = array_slice($params, 1, null, true);
foreach ($this->callbackListenings[$callbackName] as $listening) {
try {
/** @var Listening $listening */
$listening->triggerCallbackWithParams($params);
} catch (ParseException $e) {
//TODO remove later, its for the wrong XML encoding of nadeo
}
/** @var Listening $listening */
$listening->triggerCallbackWithParams($params);
}
}