mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 13:12:39 +02:00
initial commit
This commit is contained in:
parent
c0d7c06d4a
commit
36792e005a
5 changed files with 16 additions and 9 deletions
|
@ -800,7 +800,12 @@ void DomainServerSettingsManager::processUsernameFromIDRequestPacket(QSharedPoin
|
|||
usernameFromIDReplyPacket->write(nodeUUID.toRfc4122());
|
||||
usernameFromIDReplyPacket->writeString(verifiedUsername);
|
||||
|
||||
qDebug() << "Sending username" << verifiedUsername << "associated with node" << nodeUUID;
|
||||
// now put in the machine fingerprint
|
||||
DomainServerNodeData* nodeData = reinterpret_cast<DomainServerNodeData*>(matchingNode->getLinkedData());
|
||||
QUuid machineFingerprint = nodeData ? nodeData->getMachineFingerprint() : QUuid();
|
||||
usernameFromIDReplyPacket->write(machineFingerprint.toRfc4122());
|
||||
|
||||
qDebug() << "Sending username" << verifiedUsername << "and machine fingerprint" << machineFingerprint << "associated with node" << nodeUUID;
|
||||
|
||||
// Ship it!
|
||||
limitedNodeList->sendPacket(std::move(usernameFromIDReplyPacket), *sendingNode);
|
||||
|
|
|
@ -923,8 +923,10 @@ void NodeList::processUsernameFromIDReply(QSharedPointer<ReceivedMessage> messag
|
|||
QString nodeUUIDString = (QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID))).toString();
|
||||
// read the username from the packet
|
||||
QString username = message->readString();
|
||||
// read the machine fingerprint from the packet
|
||||
QString machineFingerprintString = (QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID))).toString();
|
||||
|
||||
qDebug() << "Got username" << username << "for node" << nodeUUIDString;
|
||||
qDebug() << "Got username" << username << "and machine fingerprint" << machineFingerprintString << "for node" << nodeUUIDString;
|
||||
|
||||
emit usernameFromIDReply(nodeUUIDString, username);
|
||||
emit usernameFromIDReply(nodeUUIDString, username, machineFingerprintString);
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ signals:
|
|||
void receivedDomainServerList();
|
||||
void ignoredNode(const QUuid& nodeID);
|
||||
void ignoreRadiusEnabledChanged(bool isIgnored);
|
||||
void usernameFromIDReply(const QString& nodeID, const QString& username);
|
||||
void usernameFromIDReply(const QString& nodeID, const QString& username, const QString& machineFingerprint);
|
||||
|
||||
private slots:
|
||||
void stopKeepalivePingTimer();
|
||||
|
|
|
@ -101,10 +101,10 @@ signals:
|
|||
void enteredIgnoreRadius();
|
||||
|
||||
/**jsdoc
|
||||
* Notifies scripts of the username associated with a UUID.
|
||||
* @function Users.enteredIgnoreRadius
|
||||
* Notifies scripts of the username and machine fingerprint associated with a UUID.
|
||||
* @function Users.usernameFromIDReply
|
||||
*/
|
||||
void usernameFromIDReply(const QString& nodeID, const QString& username);
|
||||
void usernameFromIDReply(const QString& nodeID, const QString& username, const QString& machineFingerprint);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ function populateUserList() {
|
|||
}
|
||||
|
||||
// The function that handles the reply from the server
|
||||
function usernameFromIDReply(id, username) {
|
||||
function usernameFromIDReply(id, username, machineFingerprint) {
|
||||
var data;
|
||||
// If the ID we've received is our ID...
|
||||
if (AvatarList.getAvatar('').sessionUUID === id) {
|
||||
|
@ -145,7 +145,7 @@ function usernameFromIDReply(id, username) {
|
|||
data = ['', username + ' (hidden)']
|
||||
} else {
|
||||
// Set the data to contain the ID and the username+ID concat string.
|
||||
data = [id, username + '/' + id];
|
||||
data = [id, username + '/' + machineFingerprint];
|
||||
}
|
||||
print('Username Data:', JSON.stringify(data));
|
||||
// Ship the data off to QML
|
||||
|
|
Loading…
Reference in a new issue