Compare commits

..

No commits in common. "afe617b6422fab5f1589ec18d4d33946c3accd76" and "c2ff687e2971159940713f05a92ae869f81a6b3d" have entirely different histories.

2 changed files with 5 additions and 30 deletions

View File

@ -47,17 +47,6 @@ class PlayerActions implements EchoListener, CommunicationListener, UsageInforma
const SPECTATOR_BUT_KEEP_SELECTABLE = 3;
const ECHO_WARN_PLAYER = 'ManiaControl.PlayerManager.WarnPlayer';
/*
* Callback Constants
*/
const CB_PLAYER_FORCED_TO_PLAY = 'PlayerActions.PlayerForcedToPlay';
const CB_PLAYER_FORCED_TO_TEAM = 'PlayerActions.PlayerForcedToTeam';
const CB_PLAYER_FORCED_TO_SPEC = 'PlayerActions.PlayerForcedToSpec';
const CB_PLAYER_MUTED = 'PlayerActions.PlayerMuted';
const CB_PLAYER_WARNED = 'PlayerActions.PlayerWarned';
const CB_PLAYER_KICKED = 'PlayerActions.PlayerKicked';
const CB_PLAYER_BANNED = 'PlayerActions.PlayerBanned';
/*
* Permission Setting Constants
*/
@ -212,8 +201,6 @@ class PlayerActions implements EchoListener, CommunicationListener, UsageInforma
return false;
}
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_PLAYER_FORCED_TO_TEAM, $target, $teamId);
$message = false;
$teamName = '';
if ($teamId === self::TEAM_BLUE) {
@ -242,7 +229,7 @@ class PlayerActions implements EchoListener, CommunicationListener, UsageInforma
if ($message) {
$this->maniaControl->getChat()->sendInformation($message);
Logger::logInfo($message, true);
Logger::logInfo($chatMessage, true);
}
return true;
@ -294,8 +281,6 @@ class PlayerActions implements EchoListener, CommunicationListener, UsageInforma
}
}
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_PLAYER_FORCED_TO_PLAY, $target);
// Announce force
if ($displayAnnouncement) {
if ($calledByAdmin) {
@ -355,8 +340,6 @@ class PlayerActions implements EchoListener, CommunicationListener, UsageInforma
return false;
}
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_PLAYER_FORCED_TO_SPEC, $target);
if ($calledByAdmin) {
$title = $admin->getAuthLevelName();
$message = $this->maniaControl->getChat()->formatMessage(
@ -477,8 +460,6 @@ class PlayerActions implements EchoListener, CommunicationListener, UsageInforma
return false;
}
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_PLAYER_MUTED, $target);
if ($calledByAdmin) {
$title = $admin->getAuthLevelName();
$message = $this->maniaControl->getChat()->formatMessage(
@ -580,8 +561,6 @@ class PlayerActions implements EchoListener, CommunicationListener, UsageInforma
// Display manialink
$this->maniaControl->getManialinkManager()->displayWidget($maniaLink, $target);
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_PLAYER_WARNED, $target);
if ($calledByAdmin) {
$title = $admin->getAuthLevelName();
$message = $this->maniaControl->getChat()->formatMessage(
@ -646,8 +625,6 @@ class PlayerActions implements EchoListener, CommunicationListener, UsageInforma
}
}
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_PLAYER_KICKED, $target);
if ($calledByAdmin) {
$title = $admin->getAuthLevelName();
$message = $this->maniaControl->getChat()->formatMessage(
@ -702,8 +679,6 @@ class PlayerActions implements EchoListener, CommunicationListener, UsageInforma
return;
}
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_PLAYER_BANNED, $target);
$title = $admin->getAuthLevelName();
$message = $this->maniaControl->getChat()->formatMessage(
"{$title} %s banned %s!",

View File

@ -600,12 +600,12 @@ class PlayerManager implements CallbackListener, TimerListener, CommunicationLis
}
$player = new Player($this->maniaControl, false);
$player->index = intval($row->index);
$player->index = $row->index;
$player->login = $row->login;
$player->rawNickname = $row->nickname;
$player->nickname = Formatter::stripDirtyCodes($player->rawNickname);
$player->path = $row->path;
$player->authLevel = intval($row->authLevel);
$player->authLevel = $row->authLevel;
return $player;
}
@ -715,12 +715,12 @@ class PlayerManager implements CallbackListener, TimerListener, CommunicationLis
}
$player = new Player($this->maniaControl, false);
$player->index = intval($playerIndex);
$player->index = $playerIndex;
$player->login = $row->login;
$player->rawNickname = $row->nickname;
$player->nickname = Formatter::stripDirtyCodes($player->rawNickname);
$player->path = $row->path;
$player->authLevel = intval($row->authLevel);
$player->authLevel = $row->authLevel;
return $player;
}