some todo resolves

This commit is contained in:
kremsy
2014-03-01 11:11:50 +01:00
committed by Steffen Schröder
parent 5dcc8e865c
commit 7c4a038722
15 changed files with 66 additions and 90 deletions

View File

@ -2,7 +2,6 @@
namespace ManiaControl;
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
/**
* Chat utility class
*
@ -68,15 +67,10 @@ class Chat {
return false;
}
$chatMessage = '$z$<' . $this->getPrefix($prefix) . $message . '$>$z';
try {
if ($login === null) {
$this->maniaControl->client->chatSendServerMessage($chatMessage);
} else {
$this->maniaControl->client->chatSendServerMessage($chatMessage, $login);
}
} catch(Exception $e) {
// TODO: is it even possible that an exception other than connection errors will be thrown? - remove try-catch?
return false;
if ($login === null) {
$this->maniaControl->client->chatSendServerMessage($chatMessage);
} else {
$this->maniaControl->client->chatSendServerMessage($chatMessage, $login);
}
return true;
}