Finalizing the new group manager
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "../manager/ActionLogger.h"
|
||||
#include "./voice/VoiceClient.h"
|
||||
#include "../rtc/imports.h"
|
||||
#include "../groups/GroupManager.h"
|
||||
|
||||
using namespace std::chrono;
|
||||
using namespace ts;
|
||||
@@ -25,7 +26,7 @@ using namespace ts::protocol;
|
||||
//#define PKT_LOG_VOICE
|
||||
//#define PKT_LOG_WHISPER
|
||||
|
||||
SpeakingClient::SpeakingClient(sql::SqlManager *a, const std::shared_ptr<VirtualServer> &b) : ConnectedClient(a, b), whisper_handler_{this} {
|
||||
SpeakingClient::SpeakingClient(sql::SqlManager *a, const std::shared_ptr<VirtualServer> &b) : ConnectedClient{a, b}, whisper_handler_{this} {
|
||||
speak_begin = std::chrono::system_clock::now();
|
||||
speak_last_packet = std::chrono::system_clock::now();
|
||||
};
|
||||
@@ -122,8 +123,6 @@ command_result SpeakingClient::handleCommandClientInit(Command& cmd) {
|
||||
}
|
||||
|
||||
TIMING_STEP(timings, "db assign ");
|
||||
this->server->group_manager()->enableCache(this->getClientDatabaseId());
|
||||
TIMING_STEP(timings, "gr cache ");
|
||||
|
||||
const static vector<string> available_parameters = {
|
||||
"client_nickname",
|
||||
@@ -437,10 +436,6 @@ void SpeakingClient::processJoin() {
|
||||
}
|
||||
|
||||
TIMING_STEP(timings, "server reg ");
|
||||
ref_server->group_manager()->cleanupAssignments(this->getClientDatabaseId());
|
||||
TIMING_STEP(timings, "grp cleanup");
|
||||
ref_server->group_manager()->update_server_group_property(this->ref(), true, nullptr);
|
||||
TIMING_STEP(timings, "grp apply ");
|
||||
|
||||
this->properties()[property::CLIENT_COUNTRY] = config::geo::countryFlag;
|
||||
if(geoloc::provider) {
|
||||
@@ -574,7 +569,6 @@ void SpeakingClient::processLeave() {
|
||||
unique_lock server_channel_lock(this->server->channel_tree_lock);
|
||||
server->unregisterClient(ownLock, "disconnected", server_channel_lock); /* already moves client to void if needed */
|
||||
}
|
||||
server->group_manager()->disableCache(ownLock->getClientDatabaseId());
|
||||
server->music_manager_->cleanup_client_bots(this->getClientDatabaseId());
|
||||
//ref_server = nullptr; Removed caused nullptr exceptions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user