Showing the changes to libraries/script-engine/src/UsersScriptingInterface.cpp (1 of 11 files). Show all
Unified · Split
| @@ -18,6 +18,7 @@ UsersScriptingInterface::UsersScriptingInterface() { · 17 unmodified lines | ||
| 18 | 18 | auto nodeList = DependencyManager::get<NodeList>(); |
| 19 | 19 | connect(nodeList.data(), &LimitedNodeList::canKickChanged, this, &UsersScriptingInterface::canKickChanged); |
| 20 | 20 | connect(nodeList.data(), &NodeList::ignoreRadiusEnabledChanged, this, &UsersScriptingInterface::ignoreRadiusEnabledChanged); |
| 21 | + connect(nodeList.data(), &NodeList::usernameFromID, this, &UsersScriptingInterface::usernameFromID); | |
| 21 | 22 | } |
| 22 | 23 | |
| 23 | 24 | void UsersScriptingInterface::ignore(const QUuid& nodeID) { |
| @@ -35,6 +36,11 @@ void UsersScriptingInterface::mute(const QUuid& nodeID) { · 11 unmodified lines | ||
| 35 | 36 | DependencyManager::get<NodeList>()->muteNodeBySessionID(nodeID); |
| 36 | 37 | } |
| 37 | 38 | |
| 39 | +void UsersScriptingInterface::requestUsernameFromID(const QUuid& nodeID) { | |
| 40 | + // ask the Domain Server via the NodeList for the username associated with the given session ID | |
| 41 | + DependencyManager::get<NodeList>()->requestUsernameFromSessionID(nodeID); | |
| 42 | +} | |
| 43 | + | |
| 38 | 44 | bool UsersScriptingInterface::getCanKick() { |
| 39 | 45 | // ask the NodeList to return our ability to kick |
| 40 | 46 | return DependencyManager::get<NodeList>()->getThisNodeCanKick(); |