Added the possibility to depricate TS3 clients
This commit is contained in:
		
							parent
							
								
									5ee731bc92
								
							
						
					
					
						commit
						c21838d4f6
					
				@ -1 +1 @@
 | 
				
			|||||||
Subproject commit c8eb58e3b1486e8d5ea8943562bf8e94afa0b37a
 | 
					Subproject commit 9052429e2716c86ed25cd381de336021332bc1d5
 | 
				
			||||||
@ -51,6 +51,7 @@ message LicenseResponse {
 | 
				
			|||||||
    required Blacklist blacklist                = 2;
 | 
					    required Blacklist blacklist                = 2;
 | 
				
			||||||
    optional LicenseInfo license_info           = 3; //Only available when ServerValidation::license_info = true
 | 
					    optional LicenseInfo license_info           = 3; //Only available when ServerValidation::license_info = true
 | 
				
			||||||
    optional bool update_pending                = 4; /* if an update is pending */
 | 
					    optional bool update_pending                = 4; /* if an update is pending */
 | 
				
			||||||
 | 
					    optional bool deprecate_third_party_clients = 6;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
message PropertyUpdateRequest {
 | 
					message PropertyUpdateRequest {
 | 
				
			||||||
 | 
				
			|||||||
@ -1373,13 +1373,13 @@ std::deque<std::shared_ptr<EntryBinding>> config::create_bindings() {
 | 
				
			|||||||
                ADD_NOTE_RELOADABLE();
 | 
					                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, "");
 | 
					                BIND_STRING(config::server::clients::extra_welcome_message_teamspeak, "");
 | 
				
			||||||
                ADD_DESCRIPTION("Add an extra welcome message for TeamSpeak client users");
 | 
					                ADD_DESCRIPTION("Add an extra welcome message for TeamSpeak client users");
 | 
				
			||||||
                ADD_NOTE_RELOADABLE();
 | 
					                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);
 | 
					                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("The welcome message type modes");
 | 
				
			||||||
                ADD_DESCRIPTION(std::to_string(WelcomeMessageType::WELCOME_MESSAGE_TYPE_NONE) + " - None, do nothing");
 | 
					                ADD_DESCRIPTION(std::to_string(WelcomeMessageType::WELCOME_MESSAGE_TYPE_NONE) + " - None, do nothing");
 | 
				
			||||||
 | 
				
			|||||||
@ -369,6 +369,11 @@ void LicenseService::handle_message_license_info(const void *buffer, size_t buff
 | 
				
			|||||||
        return;
 | 
					        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->send_property_update_request();
 | 
				
			||||||
    this->request_state_ = request_state::property_update;
 | 
					    this->request_state_ = request_state::property_update;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user