First implementation for the conversation system (not 100% finished yet)

This commit is contained in:
WolverinDEV
2019-07-19 22:55:03 +02:00
parent dd0eaf33e5
commit e507d1f75d
20 changed files with 1545 additions and 44 deletions
+2 -2
View File
@@ -112,12 +112,12 @@ void ConnectedClient::updateChannelClientProperties(bool lock_channel_tree, bool
deque<property::ClientProperties> notifyList;
debugMessage(this->getServerId(), "{} Got a channel talk power of {} Talk power set is {}", CLIENT_STR_LOG_PREFIX, permission_talk_power, this->properties()[property::CLIENT_TALK_POWER].as<uint64_t>());
if(permission_talk_power != this->properties()[property::CLIENT_TALK_POWER].as<uint64_t>() && this->currentChannel) { //We do not have to update tp if there's no channel
if(permission_talk_power != this->properties()[property::CLIENT_TALK_POWER].as<uint64_t>()) { //We do not have to update tp if there's no channel
this->properties()[property::CLIENT_TALK_POWER] = permission_talk_power;
notifyList.emplace_back(property::CLIENT_TALK_POWER);
auto update = this->properties()[property::CLIENT_IS_TALKER].as<bool>() || this->properties()[property::CLIENT_TALK_REQUEST].as<int64_t>() > 0;
if(update) {
if(update && this->currentChannel) {
if(this->currentChannel->talk_power_granted({permission_talk_power, permission_talk_power != permNotGranted})) {
this->properties()[property::CLIENT_IS_TALKER] = 0;
this->properties()[property::CLIENT_TALK_REQUEST] = 0;