mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-08 23:19:40 +00:00
(svn r15991) -Fix: don't add 0.0.0.0/:: to the server list; you can't connect to them in any case
This commit is contained in:
parent
0f0cc67d62
commit
c2dbc8270b
@ -65,7 +65,14 @@ static void NetworkGameListHandleDelayedInsert()
|
|||||||
* @return a point to the newly added or already existing item */
|
* @return a point to the newly added or already existing item */
|
||||||
NetworkGameList *NetworkGameListAddItem(NetworkAddress address)
|
NetworkGameList *NetworkGameListAddItem(NetworkAddress address)
|
||||||
{
|
{
|
||||||
if (StrEmpty(address.GetHostname())) return NULL;
|
const char *hostname = address.GetHostname();
|
||||||
|
|
||||||
|
/* Do not query the 'any' address. */
|
||||||
|
if (StrEmpty(hostname) ||
|
||||||
|
strcmp(hostname, "0.0.0.0") == 0 ||
|
||||||
|
strcmp(hostname, "::") == 0) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
NetworkGameList *item, *prev_item;
|
NetworkGameList *item, *prev_item;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user