src/network/network.cpp
branchcpp_gui
changeset 6285 187e3ef04cc9
parent 6227 ab74f5faf662
child 6298 c30fe89622df
child 6545 8fbeb8254bf3
equal deleted inserted replaced
6284:45d0233e7d79 6285:187e3ef04cc9
  1419 	_network_available = false;
  1419 	_network_available = false;
  1420 
  1420 
  1421 	NetworkCoreShutdown();
  1421 	NetworkCoreShutdown();
  1422 }
  1422 }
  1423 
  1423 
       
  1424 /**
       
  1425  * Checks whether the given version string is compatible with our version.
       
  1426  * It'll check the first NETWORK_REVISION_LENGTH - 1 characters (-1 for '\0')
       
  1427  * against the current version and the NOREV_STRING.
       
  1428  * @param other the version string to compare to
       
  1429  */
       
  1430 bool IsNetworkCompatibleVersion(const char *other)
       
  1431 {
       
  1432 	extern const char _openttd_revision[];
       
  1433 	return strncmp(NOREV_STRING, other, NETWORK_REVISION_LENGTH - 1) == 0 ||
       
  1434 			strncmp(_openttd_revision, other, NETWORK_REVISION_LENGTH - 1) == 0;
       
  1435 }
       
  1436 
  1424 #endif /* ENABLE_NETWORK */
  1437 #endif /* ENABLE_NETWORK */