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
+2 -11
View File
@@ -633,12 +633,7 @@ inline void send_channels(ConnectedClient* client, ChannelIT begin, const Channe
break;
}
if(dynamic_cast<VoiceClient*>(client)) {
auto vc = dynamic_cast<VoiceClient*>(client);
vc->sendCommand0(builder.build(), false, true); /* we need to process this command directly so it will be processed before the channellistfinished stuff */
} else {
client->sendCommand(builder);
}
client->sendCommand(builder);
if(begin != end)
send_channels(client, begin, end, override_orderid);
}
@@ -779,11 +774,7 @@ void ConnectedClient::sendServerInit() {
command["pv"] = 6; //Protocol version
command["acn"] = this->getDisplayName();
command["aclid"] = this->getClientId();
if(dynamic_cast<VoiceClient*>(this)) {
dynamic_cast<VoiceClient*>(this)->sendCommand0(command.build(), false, true); /* process it directly so the order for the channellist entries is ensured. (First serverinit then everything else) */
} else {
this->sendCommand(command);
}
this->sendCommand(command);
}
bool ConnectedClient::handleCommandFull(Command& cmd, bool disconnectOnFail) {