Some changes

This commit is contained in:
WolverinDEV
2019-08-25 22:16:42 +02:00
parent 787f911b6f
commit 79f8c91157
17 changed files with 320 additions and 119 deletions
@@ -651,9 +651,13 @@ CommandResult ConnectedClient::handleCommandGetConnectionInfo(Command &cmd) {
auto client = this->server->findClient(cmd["clid"].as<ClientId>());
if (!client) return {findError("client_invalid_id"), "invalid client id"};
auto info = client->requestConnectionInfo(_this.lock());
if (info)
bool send_temp;
auto info = client->request_connection_info(_this.lock(), send_temp);
if (info) {
this->notifyConnectionInfo(client, info);
} else if(send_temp) {
this->notifyConnectionInfo(client, nullptr);
}
return CommandResult::Success;
}
@@ -872,6 +876,7 @@ CommandResult ConnectedClient::handleCommandPermissionList(Command &cmd) {
if (!permission->clientSupported) continue;
auto &blk = list_builder[index++];
blk["permname"] = permission->name;
blk["permdesc"] = permission->description;
blk["permid"] = permission->type;
@@ -879,7 +884,7 @@ CommandResult ConnectedClient::handleCommandPermissionList(Command &cmd) {
return list_builder;
};
if(this->getType() == CLIENT_TEASPEAK || this->getType() == CLIENT_TEAMSPEAK || this->getType() == CLIENT_QUERY) {
if((this->getType() == CLIENT_TEASPEAK || this->getType() == CLIENT_TEAMSPEAK || this->getType() == CLIENT_QUERY) && false) {
Command response(this->getExternalType() == CLIENT_TEAMSPEAK ? "notifypermissionlist" : "");
{
lock_guard lock(permission_list_string_lock);