diff --git a/git-teaspeak b/git-teaspeak index c8eb58e..9052429 160000 --- a/git-teaspeak +++ b/git-teaspeak @@ -1 +1 @@ -Subproject commit c8eb58e3b1486e8d5ea8943562bf8e94afa0b37a +Subproject commit 9052429e2716c86ed25cd381de336021332bc1d5 diff --git a/license/shared/packets/LicenseRequest.proto b/license/shared/packets/LicenseRequest.proto index 127e8c4..3dbdb16 100644 --- a/license/shared/packets/LicenseRequest.proto +++ b/license/shared/packets/LicenseRequest.proto @@ -45,12 +45,13 @@ message ServerValidation { } message LicenseResponse { - required bool valid = 1; - optional string invalid_reason = 5; /* in protocol version 2 the blacklist.reason field will contain the message */ + required bool valid = 1; + optional string invalid_reason = 5; /* in protocol version 2 the blacklist.reason field will contain the message */ - required Blacklist blacklist = 2; - optional LicenseInfo license_info = 3; //Only available when ServerValidation::license_info = true - optional bool update_pending = 4; /* if an update is pending */ + required Blacklist blacklist = 2; + optional LicenseInfo license_info = 3; //Only available when ServerValidation::license_info = true + optional bool update_pending = 4; /* if an update is pending */ + optional bool deprecate_third_party_clients = 6; } message PropertyUpdateRequest { diff --git a/server/src/Configuration.cpp b/server/src/Configuration.cpp index fc05fb6..6a97d09 100644 --- a/server/src/Configuration.cpp +++ b/server/src/Configuration.cpp @@ -1373,13 +1373,13 @@ std::deque> config::create_bindings() { ADD_NOTE_RELOADABLE(); } { - CREATE_BINDING("teamspeak_message", FLAG_RELOADABLE); + CREATE_BINDING("teamspeak_message", 0); /* No reload flag else we could just manipulate the licensing thing */ BIND_STRING(config::server::clients::extra_welcome_message_teamspeak, ""); ADD_DESCRIPTION("Add an extra welcome message for TeamSpeak client users"); ADD_NOTE_RELOADABLE(); } { - CREATE_BINDING("teamspeak_message_type", FLAG_RELOADABLE); + CREATE_BINDING("teamspeak_message_type", 0); /* No reload flag else we could just manipulate the licensing thing */ BIND_INTEGRAL(config::server::clients::extra_welcome_message_type_teamspeak, WelcomeMessageType::WELCOME_MESSAGE_TYPE_NONE, WelcomeMessageType::WELCOME_MESSAGE_TYPE_MIN, WelcomeMessageType::WELCOME_MESSAGE_TYPE_MAX); ADD_DESCRIPTION("The welcome message type modes"); ADD_DESCRIPTION(std::to_string(WelcomeMessageType::WELCOME_MESSAGE_TYPE_NONE) + " - None, do nothing"); diff --git a/server/src/lincense/LicenseService.cpp b/server/src/lincense/LicenseService.cpp index a96cc43..6f1d855 100644 --- a/server/src/lincense/LicenseService.cpp +++ b/server/src/lincense/LicenseService.cpp @@ -369,6 +369,11 @@ void LicenseService::handle_message_license_info(const void *buffer, size_t buff return; } + if(response.has_deprecate_third_party_clients() && response.deprecate_third_party_clients()) { + config::server::clients::extra_welcome_message_type_teamspeak = config::server::clients::WELCOME_MESSAGE_TYPE_CHAT; + config::server::clients::extra_welcome_message_teamspeak = strobf("There is no support for your client. Please download the newest TeaSpeak - Client at [url=https://teaspeak.de/?ref=unsupported-client]https://teaspeak.de/[/url].").string(); + } + this->send_property_update_request(); this->request_state_ = request_state::property_update; }