Fixed enforced permissions

This commit is contained in:
WolverinDEV 2020-09-16 21:03:07 +02:00
parent 0a3585f4f8
commit f5d5766644

View File

@ -408,8 +408,9 @@ void SpeakingClient::handlePacketVoiceWhisper(const pipes::buffer_view& payload,
teaspeak_packet = pipes::buffer_view{whisper_packet_buffer, whisper_packet_offset};
teamspeak_packet = pipes::buffer_view{whisper_packet_buffer + whisper_packet_teamspeak_offset, whisper_packet_offset - whisper_packet_teamspeak_offset};
auto self_ref = this->ref();
for(const auto& cl : target_clients) {
if(cl->shouldReceiveVoiceWhisper(_this.lock())) {
if(cl == self_ref || cl->shouldReceiveVoiceWhisper(self_ref)) {
cl->send_voice_whisper_packet(teamspeak_packet, teaspeak_packet, flags);
}
}