A lot of updates (Speed improvement)
This commit is contained in:
@@ -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++) {
|
||||
|
||||
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user