mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-05 07:16:18 +00:00
add non-working GET for version
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -1,6 +1,7 @@
|
||||
#include "TSentry.h"
|
||||
|
||||
#include "Common.h"
|
||||
#include "CustomAssert.h"
|
||||
#include "Http.h"
|
||||
#include "TConfig.h"
|
||||
#include "THeartbeatThread.h"
|
||||
@@ -39,6 +40,8 @@ void UnixSignalHandler(int sig) {
|
||||
// global, yes, this is ugly, no, it cant be done another way
|
||||
TSentry Sentry { SECRET_SENTRY_URL };
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char** argv) try {
|
||||
#ifdef __unix
|
||||
#if DEBUG
|
||||
@@ -55,9 +58,18 @@ int main(int argc, char** argv) try {
|
||||
bool Shutdown = false;
|
||||
Application::RegisterShutdownHandler([&Shutdown] { Shutdown = true; });
|
||||
|
||||
Assert(!Application::IsOutdated(std::array<int, 3> { 1, 0, 0 }, std::array<int, 3> { 1, 0, 0 }));
|
||||
Assert(!Application::IsOutdated(std::array<int, 3> { 1, 0, 1 }, std::array<int, 3> { 1, 0, 0 }));
|
||||
Assert(Application::IsOutdated(std::array<int, 3> { 1, 0, 0 }, std::array<int, 3> { 1, 0, 1 }));
|
||||
Assert(Application::IsOutdated(std::array<int, 3> { 1, 0, 0 }, std::array<int, 3> { 1, 1, 0 }));
|
||||
Assert(Application::IsOutdated(std::array<int, 3> { 1, 0, 0 }, std::array<int, 3> { 2, 0, 0 }));
|
||||
Assert(!Application::IsOutdated(std::array<int, 3> { 2, 0, 0 }, std::array<int, 3> { 1, 0, 1 }));
|
||||
|
||||
TServer Server(argc, argv);
|
||||
TConfig Config;
|
||||
|
||||
Application::CheckForUpdates();
|
||||
|
||||
if (Config.Failed()) {
|
||||
info("Closing in 10 seconds");
|
||||
std::this_thread::sleep_for(std::chrono::seconds(10));
|
||||
|
||||
Reference in New Issue
Block a user