@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use eXpansion\Framework\AdminGroups\Helpers\AdminGroups; |
| 6 | 6 | use eXpansion\Framework\AdminGroups\Model\AbstractAdminChatCommand; |
| 7 | 7 | use eXpansion\Framework\Core\Helpers\ChatNotification; |
| 8 | -use eXpansion\Framework\Core\Helpers\Time; |
|
| 9 | 8 | use eXpansion\Framework\Core\Helpers\TMString; |
| 10 | 9 | use eXpansion\Framework\Core\Storage\MapStorage; |
| 11 | 10 | use eXpansion\Framework\Core\Storage\PlayerStorage; |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | |
| 119 | 119 | $logMessage = $this->chatNotification->getMessage('expansion_admin_chat.shuffle.msg', |
| 120 | 120 | ["%adminLevel%" => $level, "%admin%" => $admin], "en"); |
| 121 | - $this->logger->info("[". $login. "] " . TMString::trimStyles($logMessage)); |
|
| 121 | + $this->logger->info("[".$login."] ".TMString::trimStyles($logMessage)); |
|
| 122 | 122 | |
| 123 | 123 | } |
| 124 | 124 | } |
@@ -137,8 +137,8 @@ |
||
| 137 | 137 | |
| 138 | 138 | /** |
| 139 | 139 | * @param Player $player |
| 140 | - * @param $text |
|
| 141 | - * @param $color |
|
| 140 | + * @param string $text |
|
| 141 | + * @param string $color |
|
| 142 | 142 | * @param null $group |
| 143 | 143 | */ |
| 144 | 144 | private function sendChat(Player $player, $text, $color, $group = null) |
@@ -113,21 +113,21 @@ discard block |
||
| 113 | 113 | if (count($diff) > 0) { |
| 114 | 114 | $this->sendChat($player, $text, '$ff0', $group); |
| 115 | 115 | } |
| 116 | - $this->console->writeln('$ff0[' . $nick . '$ff0] ' . $text); |
|
| 116 | + $this->console->writeln('$ff0['.$nick.'$ff0] '.$text); |
|
| 117 | 117 | |
| 118 | 118 | return; |
| 119 | 119 | } else { |
| 120 | 120 | $this->sendChat($player, $text, '$ff0', null); |
| 121 | - $this->console->writeln('$ff0[' . $nick . '$ff0] ' . $text); |
|
| 121 | + $this->console->writeln('$ff0['.$nick.'$ff0] '.$text); |
|
| 122 | 122 | |
| 123 | 123 | return; |
| 124 | 124 | } |
| 125 | 125 | } else { |
| 126 | 126 | $this->sendChat($player, $text, '$ff0', null); |
| 127 | - $this->console->writeln('$ff0[' . $nick . '$ff0] ' . $text); |
|
| 127 | + $this->console->writeln('$ff0['.$nick.'$ff0] '.$text); |
|
| 128 | 128 | } |
| 129 | 129 | } else { |
| 130 | - $this->console->writeln('$333[' . $nick . '$333] ' . $text); |
|
| 130 | + $this->console->writeln('$333['.$nick.'$333] '.$text); |
|
| 131 | 131 | $this->chatNotification->sendMessage('expansion_customchat.chat.disabledstate', |
| 132 | 132 | $player->getLogin()); |
| 133 | 133 | } |
@@ -173,10 +173,10 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | try { |
| 175 | 175 | $this->connection->chatSendServerMessage( |
| 176 | - $prefix . '$fff$<' . $nick . '$>$z$s' . $postfix . $separator . ' ' . $color . $text, $group |
|
| 176 | + $prefix.'$fff$<'.$nick.'$>$z$s'.$postfix.$separator.' '.$color.$text, $group |
|
| 177 | 177 | ); |
| 178 | 178 | } catch (\Exception $e) { |
| 179 | - $this->console->writeln('$ff0 error while sending chat: $fff' . $e->getMessage()); |
|
| 179 | + $this->console->writeln('$ff0 error while sending chat: $fff'.$e->getMessage()); |
|
| 180 | 180 | $this->logger->error("Error while sending custom chat", ['exception' => $e]); |
| 181 | 181 | } |
| 182 | 182 | } |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | try { |
| 214 | 214 | $this->connection->chatEnableManualRouting(); |
| 215 | 215 | } catch (\Exception $e) { |
| 216 | - $this->console->writeln('Error while enabling custom chat: $f00' . $e->getMessage()); |
|
| 216 | + $this->console->writeln('Error while enabling custom chat: $f00'.$e->getMessage()); |
|
| 217 | 217 | $this->logger->error("Error enabling custom chat", ['exception' => $e]); |
| 218 | 218 | } |
| 219 | 219 | } |
@@ -95,14 +95,14 @@ |
||
| 95 | 95 | case "on": |
| 96 | 96 | $this->chatNotification->sendMessage("expansion_customchat.chat.enabled", null, |
| 97 | 97 | ['%admin%' => $groupName, '%nickname%' => $nickName]); |
| 98 | - $this->logger->info("[" . $login . "] Public chat is now enabled!"); |
|
| 98 | + $this->logger->info("[".$login."] Public chat is now enabled!"); |
|
| 99 | 99 | $this->customChat->setStatus(true); |
| 100 | 100 | break; |
| 101 | 101 | case "disable": |
| 102 | 102 | case "off": |
| 103 | 103 | $this->chatNotification->sendMessage("expansion_customchat.chat.disabled", null, |
| 104 | 104 | ['%admin%' => $groupName, '%nickname%' => $nickName]); |
| 105 | - $this->logger->info("[" . $login . "] Public chat is now disabled!"); |
|
| 105 | + $this->logger->info("[".$login."] Public chat is now disabled!"); |
|
| 106 | 106 | $this->customChat->setStatus(false); |
| 107 | 107 | break; |
| 108 | 108 | default: |
@@ -81,9 +81,9 @@ |
||
| 81 | 81 | |
| 82 | 82 | $logMessage = $this->chatNotification->getMessage($this->chatMessage, |
| 83 | 83 | ['%adminLevel%' => $group, '%admin%' => $nickName, "%parameter%" => $parameter], "en"); |
| 84 | - $this->logger->info("[". $login. "] " . TMString::trimStyles($logMessage)); |
|
| 84 | + $this->logger->info("[".$login."] ".TMString::trimStyles($logMessage)); |
|
| 85 | 85 | |
| 86 | - } catch (DedicatedException $e) { |
|
| 86 | + } catch (DedicatedException $e) { |
|
| 87 | 87 | $this->logger->error("Error on admin command", ["exception" => $e]); |
| 88 | 88 | $this->chatNotification->sendMessage("expansion_admin_chat.dedicatedexception", $login, |
| 89 | 89 | ["%message%" => $e->getMessage()]); |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | ['%adminLevel%' => $group, '%admin%' => $nickName, "%parameter%" => $parameter], "en"); |
| 84 | 84 | $this->logger->info("[". $login. "] " . TMString::trimStyles($logMessage)); |
| 85 | 85 | |
| 86 | - } catch (DedicatedException $e) { |
|
| 86 | + } catch (DedicatedException $e) { |
|
| 87 | 87 | $this->logger->error("Error on admin command", ["exception" => $e]); |
| 88 | 88 | $this->chatNotification->sendMessage("expansion_admin_chat.dedicatedexception", $login, |
| 89 | 89 | ["%message%" => $e->getMessage()]); |
@@ -84,6 +84,6 @@ |
||
| 84 | 84 | |
| 85 | 85 | $logMessage = $this->chatNotification->getMessage('%adminLevel% %admin% cancels current vote.', |
| 86 | 86 | ["%adminLevel%" => $level, "%admin%" => $admin]); |
| 87 | - $this->logger->info("[". $login. "] " . TMString::trimStyles($logMessage)); |
|
| 87 | + $this->logger->info("[".$login."] ".TMString::trimStyles($logMessage)); |
|
| 88 | 88 | } |
| 89 | 89 | } |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | $timeHelper |
| 83 | 83 | ); |
| 84 | 84 | |
| 85 | - $this->description = 'expansion_admin_chat.' . strtolower($functionName) . '.description'; |
|
| 86 | - $this->chatMessage = 'expansion_admin_chat.' . strtolower($functionName) . '.msg'; |
|
| 85 | + $this->description = 'expansion_admin_chat.'.strtolower($functionName).'.description'; |
|
| 86 | + $this->chatMessage = 'expansion_admin_chat.'.strtolower($functionName).'.msg'; |
|
| 87 | 87 | $this->functionName = $functionName; |
| 88 | 88 | } |
| 89 | 89 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | $logMessage = $this->chatNotification->getMessage($this->chatMessage, |
| 106 | 106 | ['%adminLevel%' => $group, '%admin%' => $nickName], "en"); |
| 107 | - $this->logger->info("[". $login. "] " . TMString::trimStyles($logMessage)); |
|
| 107 | + $this->logger->info("[".$login."] ".TMString::trimStyles($logMessage)); |
|
| 108 | 108 | |
| 109 | 109 | } catch (DedicatedException $e) { |
| 110 | 110 | $this->logger->error("Error on admin command", ["exception" => $e]); |
@@ -91,8 +91,8 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | $this->description = 'expansion_admin_chat.'.strtolower($functionName).'.description'; |
| 93 | 93 | $this->chatMessage = 'expansion_admin_chat.'.strtolower($functionName).'.msg'; |
| 94 | - $this->functionName = (string)$functionName; |
|
| 95 | - $this->parameterDescription = (string)$parameterDescription; |
|
| 94 | + $this->functionName = (string) $functionName; |
|
| 95 | + $this->parameterDescription = (string) $parameterDescription; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | $logMessage = $this->chatNotification->getMessage($this->chatMessage, |
| 128 | 128 | ['%adminLevel%' => $group, '%admin%' => $nickName, "%parameter%" => $parameter], "en"); |
| 129 | - $this->logger->info("[". $login. "] " . TMString::trimStyles($logMessage)); |
|
| 129 | + $this->logger->info("[".$login."] ".TMString::trimStyles($logMessage)); |
|
| 130 | 130 | |
| 131 | 131 | } catch (DedicatedException $e) { |
| 132 | 132 | $this->logger->error("Error on admin command", ["exception" => $e]); |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | ); |
| 33 | 33 | $logMessage = $this->chatNotification->getMessage($this->chatMessage, |
| 34 | 34 | ['%adminLevel%' => $group, '%admin%' => $nickName, '%return%' => $return], "en"); |
| 35 | - $this->logger->info("[". $login. "] " . TMString::trimStyles($logMessage)); |
|
| 35 | + $this->logger->info("[".$login."] ".TMString::trimStyles($logMessage)); |
|
| 36 | 36 | |
| 37 | 37 | } catch (DedicatedException $e) { |
| 38 | 38 | $this->logger->error("Error on admin command", ["exception" => $e]); |
@@ -99,8 +99,8 @@ discard block |
||
| 99 | 99 | $timeHelper |
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | - $this->description = 'expansion_admin_chat.' . strtolower($functionName) . '.description'; |
|
| 103 | - $this->chatMessage = 'expansion_admin_chat.' . strtolower($functionName) . '.msg'; |
|
| 102 | + $this->description = 'expansion_admin_chat.'.strtolower($functionName).'.description'; |
|
| 103 | + $this->chatMessage = 'expansion_admin_chat.'.strtolower($functionName).'.msg'; |
|
| 104 | 104 | $this->functionName = $functionName; |
| 105 | 105 | $this->parameterLoginDescription = $parameterLoginDescription; |
| 106 | 106 | $this->parameterReasonDescription = $parameterReasonDescription; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | '%player%' => $playerNickName, |
| 150 | 150 | "%reason%" => $reason |
| 151 | 151 | ], "en"); |
| 152 | - $this->logger->info("[". $login. "] " . TMString::trimStyles($logMessage)); |
|
| 152 | + $this->logger->info("[".$login."] ".TMString::trimStyles($logMessage)); |
|
| 153 | 153 | |
| 154 | 154 | |
| 155 | 155 | } catch (DedicatedException $e) { |