mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
Only users with perm rez can see the log
This commit is contained in:
parent
35f8afe456
commit
0f39356e94
3 changed files with 4 additions and 12 deletions
|
@ -182,7 +182,7 @@ void EntityScriptServer::updateEntityPPS() {
|
|||
void EntityScriptServer::handleEntityServerScriptLogPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) {
|
||||
// These are temporary checks until we can ensure that nodes eventually disconnect if the Domain Server stops telling them
|
||||
// about each other.
|
||||
if (senderNode->getCanRez() || senderNode->getCanRezTmp()) {
|
||||
if (senderNode->getCanRez()) {
|
||||
bool enable = false;
|
||||
message->readPrimitive(&enable);
|
||||
|
||||
|
|
|
@ -21,19 +21,13 @@ EntityScriptServerLogDialog::EntityScriptServerLogDialog(QWidget* parent) : Base
|
|||
QObject::connect(nodeList.data(), &NodeList::nodeActivated, this, &EntityScriptServerLogDialog::nodeActivated);
|
||||
QObject::connect(nodeList.data(), &NodeList::nodeKilled, this, &EntityScriptServerLogDialog::nodeKilled);
|
||||
|
||||
QObject::connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptServerLogDialog::shouldEnableLog);
|
||||
QObject::connect(nodeList.data(), &NodeList::canRezTmpChanged, this, &EntityScriptServerLogDialog::shouldEnableLog);
|
||||
shouldEnableLog();
|
||||
QObject::connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptServerLogDialog::enableToEntityServerScriptLog);
|
||||
enableToEntityServerScriptLog(nodeList->getThisNodeCanRez());
|
||||
}
|
||||
|
||||
EntityScriptServerLogDialog::~EntityScriptServerLogDialog() {
|
||||
enableToEntityServerScriptLog(false);
|
||||
}
|
||||
void EntityScriptServerLogDialog::shouldEnableLog() {
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
enableToEntityServerScriptLog(nodeList->getThisNodeCanRez() || nodeList->getThisNodeCanRezTmp());
|
||||
};
|
||||
|
||||
void EntityScriptServerLogDialog::enableToEntityServerScriptLog(bool enable) {
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
|
||||
|
@ -63,7 +57,7 @@ void EntityScriptServerLogDialog::handleEntityServerScriptLogPacket(QSharedPoint
|
|||
void EntityScriptServerLogDialog::nodeActivated(SharedNodePointer activatedNode) {
|
||||
if (_subscribed && activatedNode->getType() == NodeType::EntityScriptServer) {
|
||||
_subscribed = false;
|
||||
shouldEnableLog();
|
||||
enableToEntityServerScriptLog(DependencyManager::get<NodeList>()->getThisNodeCanRez());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@ private slots:
|
|||
void nodeActivated(SharedNodePointer activatedNode);
|
||||
void nodeKilled(SharedNodePointer killedNode);
|
||||
|
||||
void shouldEnableLog();
|
||||
|
||||
private:
|
||||
bool _subscribed { false };
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue