prevent to send admin messages to everyone when no admin is connected
This commit is contained in:
parent
93423e36af
commit
e44dfa0ef2
@ -351,6 +351,7 @@ class Chat implements CallbackListener, CommunicationListener, UsageInformationA
|
||||
*/
|
||||
public function sendMessageToAdmins($message, $minLevel = AuthenticationManager::AUTH_LEVEL_MODERATOR, $prefix = true) {
|
||||
$admins = $this->maniaControl->getAuthenticationManager()->getConnectedAdmins($minLevel);
|
||||
if (count($admins) === 0) return false;
|
||||
return $this->sendChat($message, $admins, $prefix);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user