mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-04 23:06:25 +00:00
add command-line options
This commit is contained in:
@@ -30,11 +30,11 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <set>
|
||||
#include <thread>
|
||||
#include "Options.h"
|
||||
|
||||
extern int TraceBack;
|
||||
std::set<std::string>* ConfList = nullptr;
|
||||
bool TCPTerminate = false;
|
||||
int DEFAULT_PORT = 4444;
|
||||
bool Terminate = false;
|
||||
bool LoginAuth = false;
|
||||
std::string Username = "";
|
||||
@@ -306,7 +306,7 @@ void CoreMain() {
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_protocol = IPPROTO_TCP;
|
||||
hints.ai_flags = AI_PASSIVE;
|
||||
iRes = getaddrinfo(nullptr, std::to_string(DEFAULT_PORT).c_str(), &hints, &res);
|
||||
iRes = getaddrinfo(nullptr, std::to_string(options.port).c_str(), &hints, &res);
|
||||
if (iRes) {
|
||||
debug("(Core) addr info failed with error: " + std::to_string(iRes));
|
||||
WSACleanup();
|
||||
|
||||
Reference in New Issue
Block a user