A lot of updates (Speed improvement)

This commit is contained in:
WolverinDEV
2020-04-24 22:04:07 +02:00
parent 0a2c1bf3d9
commit 3e787a1d9f
18 changed files with 458 additions and 495 deletions
+1 -1
View File
@@ -275,7 +275,7 @@ command_result ConnectedClient::handleCommandClientPoke(Command &cmd) {
CMD_CHK_AND_INC_FLOOD_POINTS(25);
std::vector<ConnectedLockedClient<ConnectedClient>> clients{};
clients.resize(cmd.bulkCount());
clients.reserve(cmd.bulkCount());
bool is_single_poke = cmd.bulkCount() == 1;
for(size_t index{0}; index < cmd.bulkCount(); index++) {
+2 -7
View File
@@ -118,14 +118,9 @@ command_result ConnectedClient::handleCommandFTGetFileList(Command &cmd) {
}
if (fileList[0].has("name")) {
if(dynamic_cast<VoiceClient*>(this)) {
dynamic_cast<VoiceClient*>(this)->sendCommand0(fileList.build(), false, true); /* We need to process this directly else the order could get shuffled up! */
this->sendCommand(fileList);
if(this->getType() != CLIENT_QUERY)
this->sendCommand(fileListFinished);
} else {
this->sendCommand(fileList);
if(this->getType() != CLIENT_QUERY)
this->sendCommand(fileListFinished);
}
return command_result{error::ok};
} else {
return command_result{error::database_empty_result};