Add banByUsername, banByFingerprint, and banByIP parameters.
Showing the changes to libraries/script-engine/src/UsersScriptingInterface.cpp (1 of 7 files). Show all
Unified · Split
| @@ -4,6 +4,7 @@ · 3 unmodified lines | ||
| 4 | 4 | // |
| 5 | 5 | // Created by Stephen Birarda on 2016-07-11. |
| 6 | 6 | // Copyright 2016 High Fidelity, Inc. |
| 7 | +// Copyright 2021 Vircadia contributors. | |
| 7 | 8 | // |
| 8 | 9 | // Distributed under the Apache License, Version 2.0. |
| 9 | 10 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| @@ -51,15 +52,15 @@ float UsersScriptingInterface::getAvatarGain(const QUuid& nodeID) { · 41 unmodified lines | ||
| 51 | 52 | return DependencyManager::get<NodeList>()->getAvatarGain(nodeID); |
| 52 | 53 | } |
| 53 | 54 | |
| 54 | −void UsersScriptingInterface::kick(const QUuid& nodeID) { | |
| 55 | +void UsersScriptingInterface::kick(const QUuid& nodeID, bool banByUsername, bool banByFingerprint, bool banByIP) { | |
| 55 | 56 | |
| 56 | 57 | if (_kickConfirmationOperator) { |
| 57 | 58 | bool waitingForKickResponse = _kickResponseLock.resultWithReadLock<bool>([&] { return _waitingForKickResponse; }); |
| 58 | 59 | if (getCanKick() && !waitingForKickResponse) { |
| 59 | − _kickConfirmationOperator(nodeID); | |
| 60 | + _kickConfirmationOperator(nodeID, banByUsername, banByFingerprint, banByIP); | |
| 60 | 61 | } |
| 61 | 62 | } else { |
| 62 | − DependencyManager::get<NodeList>()->kickNodeBySessionID(nodeID); | |
| 63 | + DependencyManager::get<NodeList>()->kickNodeBySessionID(nodeID, banByUsername, banByFingerprint, banByIP); | |
| 63 | 64 | } |
| 64 | 65 | } |
| 65 | 66 | |