Feature: opt-in survey when exiting a game
On first start-up, the game will ask if you want to participate in our automated survey. You have to opt-in, and can easily opt-out (via the Options) at any time. When opt-in, whenever you exit a game, a JSON blob will be send to the survey server hosted by OpenTTD. This JSON blob contains information that gives a global picture of the game just played: - What settings were used - How many humans vs AIs - How long the game has been played - Basic information about the OS / CPU All this information is kept very generic, so there is no chance we send private information to our survey server. Nothing in the JSON blob could identify you as a person; it mostly tells about the game played. At any time you can see what the JSON blob includes, by pressing the "Preview Survey Results" button in-game.
This commit is contained in:
		 Patric Stout
					Patric Stout
				
			
				
					committed by
					
						 Patric Stout
						Patric Stout
					
				
			
			
				
	
			
			
			 Patric Stout
						Patric Stout
					
				
			
						parent
						
							021c45c4f6
						
					
				
				
					commit
					7634553d22
				
			| @@ -131,7 +131,8 @@ void NetworkHTTPRequest::WinHttpCallback(DWORD code, void *info, DWORD length) | ||||
|  | ||||
| 			/* If there is any error, we simply abort the request. */ | ||||
| 			if (status_code >= 400) { | ||||
| 				Debug(net, 0, "HTTP request failed: status-code {}", status_code); | ||||
| 				/* No need to be verbose about rate limiting. */ | ||||
| 				Debug(net, status_code == HTTP_429_TOO_MANY_REQUESTS ? 1 : 0, "HTTP request failed: status-code {}", status_code); | ||||
| 				this->finished = true; | ||||
| 				this->callback->OnFailure(); | ||||
| 				return; | ||||
| @@ -242,7 +243,9 @@ void NetworkHTTPRequest::Connect() | ||||
| 	if (data.empty()) { | ||||
| 		WinHttpSendRequest(this->request, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, reinterpret_cast<DWORD_PTR>(this)); | ||||
| 	} else { | ||||
| 		WinHttpSendRequest(this->request, L"Content-Type: application/x-www-form-urlencoded\r\n", -1, const_cast<char *>(data.c_str()), static_cast<DWORD>(data.size()), static_cast<DWORD>(data.size()), reinterpret_cast<DWORD_PTR>(this)); | ||||
| 		/* When the payload starts with a '{', it is a JSON payload. */ | ||||
| 		LPCWSTR content_type = StrStartsWith(data, "{") ? L"Content-Type: application/json\r\n" : L"Content-Type: application/x-www-form-urlencoded\r\n"; | ||||
| 		WinHttpSendRequest(this->request, content_type, -1, const_cast<char *>(data.c_str()), static_cast<DWORD>(data.size()), static_cast<DWORD>(data.size()), reinterpret_cast<DWORD_PTR>(this)); | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user