Some work on the TS version sign stuff
This commit is contained in:
parent
6def999318
commit
4090eab29f
@ -31,13 +31,13 @@ if(!pkg.dependencies['electron']) {
|
||||
options["version-string"] = {
|
||||
'CompanyName': 'TeaSpeak',
|
||||
'LegalCopyright': '© 2018-2019 Markus Hadenfeldt All Rights Reserved',
|
||||
'FileDescription' : 'The TeaSpeak-Client Application',
|
||||
'FileDescription' : 'TeaSpeak-Client',
|
||||
'OriginalFilename' : 'TeaClient.exe',
|
||||
'FileVersion' : pkg.version,
|
||||
'ProductVersion' : pkg.version,
|
||||
'ProductName' : 'TeaSpeak-Client',
|
||||
'InternalName' : 'TeaClient.exe'
|
||||
}
|
||||
};
|
||||
options.electronVersion = pkg.dependencies['electron'];
|
||||
options.protocols = [{name: "TeaSpeak - Connect", schemes: ["teaserver"]}];
|
||||
options.overwrite = true;
|
||||
|
@ -371,9 +371,16 @@ std::string _to_string(const T value) {
|
||||
result.resize(written);
|
||||
return result;
|
||||
}
|
||||
|
||||
NAN_METHOD(ServerConnection::_send_command) {
|
||||
return ObjectWrap::Unwrap<ServerConnection>(info.Holder())->send_command(info);
|
||||
}
|
||||
|
||||
struct TS3VersionSettings {
|
||||
std::string build;
|
||||
std::string platform;
|
||||
std::string sign;
|
||||
};
|
||||
NAN_METHOD(ServerConnection::send_command) {
|
||||
if(!this->protocol_handler) {
|
||||
Nan::ThrowError("ServerConnection not initialized");
|
||||
@ -443,10 +450,46 @@ NAN_METHOD(ServerConnection::send_command) {
|
||||
if(cmd[0].has("return_code"))
|
||||
cmd["return_code"] = nullptr;
|
||||
|
||||
TS3VersionSettings ts_version{};
|
||||
#ifdef WIN32
|
||||
/*
|
||||
ts_version = {
|
||||
"0.0.1 [Build: 1549713549]",
|
||||
"Linux",
|
||||
"7XvKmrk7uid2ixHFeERGqcC8vupeQqDypLtw2lY9slDNPojEv//F47UaDLG+TmVk4r6S0TseIKefzBpiRtLDAQ=="
|
||||
};
|
||||
*/
|
||||
|
||||
cmd["client_version"] = "0.0.1 [Build: 1549713549]";
|
||||
cmd["client_platform"] = "Linux";
|
||||
cmd["client_version_sign"] = "7XvKmrk7uid2ixHFeERGqcC8vupeQqDypLtw2lY9slDNPojEv//F47UaDLG+TmVk4r6S0TseIKefzBpiRtLDAQ==";
|
||||
ts_version = {
|
||||
"3.?.? [Build: 5680278000]",
|
||||
"Windows",
|
||||
"DX5NIYLvfJEUjuIbCidnoeozxIDRRkpq3I9vVMBmE9L2qnekOoBzSenkzsg2lC9CMv8K5hkEzhr2TYUYSwUXCg=="
|
||||
};
|
||||
#else
|
||||
/*
|
||||
ts_version = {
|
||||
"0.0.1 [Build: 1549713549]",
|
||||
"Linux",
|
||||
"7XvKmrk7uid2ixHFeERGqcC8vupeQqDypLtw2lY9slDNPojEv//F47UaDLG+TmVk4r6S0TseIKefzBpiRtLDAQ=="
|
||||
};
|
||||
*/
|
||||
ts_version = {
|
||||
"3.?.? [Build: 5680278000]",
|
||||
"Linux",
|
||||
"Hjd+N58Gv3ENhoKmGYy2bNRBsNNgm5kpiaQWxOj5HN2DXttG6REjymSwJtpJ8muC2gSwRuZi0R+8Laan5ts5CQ=="
|
||||
};
|
||||
#endif
|
||||
if(std::getenv("teaclient_ts_build") && std::getenv("teaclient_ts_platform") && std::getenv("teaclient_ts_sign")) {
|
||||
ts_version = {
|
||||
std::getenv("teaclient_ts_build"),
|
||||
std::getenv("teaclient_ts_platform"),
|
||||
std::getenv("teaclient_ts_sign")
|
||||
};
|
||||
}
|
||||
|
||||
cmd["client_version"] = ts_version.build;
|
||||
cmd["client_platform"] = ts_version.platform;
|
||||
cmd["client_version_sign"] = ts_version.sign;
|
||||
cmd[strobf("hwid").string()] = system_uuid(); /* we dont want anybody to patch this out */
|
||||
}
|
||||
}
|
||||
@ -637,7 +680,7 @@ void ServerConnection::_execute_callback_voice() {
|
||||
if(callback.IsEmpty()) {
|
||||
auto _callback = Nan::Get(this->handle(), Nan::New<v8::String>("callback_voice_data").ToLocalChecked()).ToLocalChecked();
|
||||
if(_callback.IsEmpty() || _callback->IsUndefined()) {
|
||||
cout << "Missing voice callback! Dropping packets" << endl;
|
||||
logger::warn(category::audio, tr("Missing voice callback! Dropping packets!"));
|
||||
lock_guard lock(this->pending_voice_lock);
|
||||
this->pending_voice.clear();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user