This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).
Revisión | 87a098891caff97a8c8b6c250391ea2ceb50b17d (tree) |
---|---|
Tiempo | 2022-06-22 09:08:32 |
Autor | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Reworded the reason message for when a client is kicked for using a VPN.
@@ -230,17 +230,17 @@ | ||
230 | 230 | std::string reason = res["reason"]; |
231 | 231 | time_t tExpiration = SERVERBAN_ParseBanLength("perm"); |
232 | 232 | |
233 | - char buf[64]; | |
234 | - snprintf(buf, sizeof(buf), "This host has been automatically detected as a proxy (%s)", reason.c_str()); | |
233 | + FString comment; | |
234 | + comment.Format("An IP masking service (VPN) has been detected. Please disable it before connecting (%s).", reason.c_str()); | |
235 | 235 | |
236 | 236 | std::string unused; |
237 | - SERVERBAN_GetBanList()->addEntry(address.c_str(), nullptr, buf, unused, tExpiration); | |
237 | + SERVERBAN_GetBanList()->addEntry(address.c_str(), nullptr, comment, unused, tExpiration); | |
238 | 238 | |
239 | 239 | NETADDRESS_s netaddr; |
240 | 240 | netaddr.LoadFromString(address.c_str()); |
241 | 241 | kickIp(netaddr); |
242 | 242 | |
243 | - Printf("[TSPG] %s has been detected as a proxy and has been automatically banned (%s)\n", address.c_str(), reason.c_str()); | |
243 | + Printf("[TSPG] %s has been detected as an IP masking service (VPN) and has been automatically banned (%s).\n", address.c_str(), reason.c_str()); | |
244 | 244 | } |
245 | 245 | } |
246 | 246 |
@@ -253,10 +253,10 @@ | ||
253 | 253 | |
254 | 254 | if (SERVER_GetClient(ulIdx)->Address.CompareNoPort(addr)) |
255 | 255 | { |
256 | - char buf[512]; | |
257 | - snprintf(buf, sizeof(buf), "This host has been automatically detected as a proxy."); | |
256 | + FString reason; | |
257 | + reason.Format("An IP masking service (VPN) has been detected. Please disable it before connecting."); | |
258 | 258 | |
259 | - SERVER_KickPlayer(ulIdx, buf); | |
259 | + SERVER_KickPlayer(ulIdx, reason); | |
260 | 260 | } |
261 | 261 | } |
262 | 262 | } |