Changeset - r11610:3e592325d26d
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-04-08 21:16:24
rubidium@openttd.org
(svn r15991) -Fix: don't add 0.0.0.0/:: to the server list; you can't connect to them in any case
1 file changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/network/network_gamelist.cpp
Show inline comments
 
@@ -62,13 +62,20 @@ static void NetworkGameListHandleDelayed
 
 * return the existing item instead of adding it again
 
 * @param address the address of the to-be added item
 
 * @param port the port the server is running on
 
 * @return a point to the newly added or already existing item */
 
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;
 

	
 
	prev_item = NULL;
 
	for (item = _network_game_list; item != NULL; item = item->next) {
 
		if (item->address == address) return item;
0 comments (0 inline, 0 general)