just minor things
This commit is contained in:
parent
3cdb0a3d93
commit
a48bfe2f12
@ -31,7 +31,7 @@ class Chat {
|
|||||||
$this->maniaControl = $maniaControl;
|
$this->maniaControl = $maniaControl;
|
||||||
|
|
||||||
// Init settings
|
// Init settings
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_PREFIX, 'MC» ');
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_PREFIX, '» ');
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_FORMAT_INFORMATION, '$fff');
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_FORMAT_INFORMATION, '$fff');
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_FORMAT_SUCCESS, '$0f0');
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_FORMAT_SUCCESS, '$0f0');
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_FORMAT_ERROR, '$f00');
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_FORMAT_ERROR, '$f00');
|
||||||
|
@ -8,7 +8,7 @@ use ManiaControl\Commands\CommandListener;
|
|||||||
use ManiaControl\Players\Player;
|
use ManiaControl\Players\Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class offering various commands related to players
|
* Class offering various admin commands related to players
|
||||||
*
|
*
|
||||||
* @author steeffeen & kremsy
|
* @author steeffeen & kremsy
|
||||||
*/
|
*/
|
||||||
|
@ -43,7 +43,7 @@ class PlayerManager implements CallbackListener {
|
|||||||
$this->playerCommands = new PlayerCommands($maniaControl);
|
$this->playerCommands = new PlayerCommands($maniaControl);
|
||||||
|
|
||||||
// Init settings
|
// Init settings
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_JOIN_LEAVE_MESSAGES, false);
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_JOIN_LEAVE_MESSAGES, true);
|
||||||
|
|
||||||
// Register for callbacks
|
// Register for callbacks
|
||||||
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MC_ONINIT, $this, 'onInit');
|
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MC_ONINIT, $this, 'onInit');
|
||||||
@ -121,12 +121,12 @@ class PlayerManager implements CallbackListener {
|
|||||||
$this->addPlayer($player);
|
$this->addPlayer($player);
|
||||||
|
|
||||||
if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_JOIN_LEAVE_MESSAGES)) {
|
if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_JOIN_LEAVE_MESSAGES)) {
|
||||||
// TODO: improve styling?
|
|
||||||
$string = array(0 => 'New Player', 1 => '$0f0Operator', 2 => '$0f0Admin', 3 => '$0f0MasterAdmin', 4 => '$0f0MasterAdmin');
|
$string = array(0 => 'New Player', 1 => '$0f0Operator', 2 => '$0f0Admin', 3 => '$0f0MasterAdmin', 4 => '$0f0MasterAdmin');
|
||||||
$nickname = Formatter::stripCodes($player->nickname);
|
$nickname = Formatter::stripCodes($player->nickname); //TODO strip codes without colour codes like in serverviewer
|
||||||
$this->maniaControl->chat->sendChat(
|
$this->maniaControl->chat->sendChat(
|
||||||
'$ff0' . $string[$player->authLevel] . ': ' . $nickname . '$z $ff0Nation:$fff ' . $player->getCountry() .
|
'$ff0' . $string[$player->authLevel] . ': $fff' . $nickname . '$z $ff0Nation:$fff ' . $player->getCountry() .
|
||||||
' $ff0Ladder: $fff' . $player->ladderRank);
|
' $ff0Ladder: $fff' . $player->ladderRank);
|
||||||
|
$this->maniaControl->chat->sendInformation('This server uses ManiaControl v' . ManiaControl::VERSION,$player->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trigger own callback
|
// Trigger own callback
|
||||||
|
Loading…
Reference in New Issue
Block a user