mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-04 14:56:04 +00:00
fix lua file stuff and more file stuff
This commit is contained in:
41
src/main.cpp
41
src/main.cpp
@@ -27,32 +27,27 @@ void UnixSignalHandler(int sig) {
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
try {
|
||||
#ifndef WIN32
|
||||
// ignore SIGPIPE, the signal that is sent for example when a client
|
||||
// disconnects while data is being sent to him ("broken pipe").
|
||||
signal(SIGPIPE, UnixSignalHandler);
|
||||
// ignore SIGPIPE, the signal that is sent for example when a client
|
||||
// disconnects while data is being sent to him ("broken pipe").
|
||||
signal(SIGPIPE, UnixSignalHandler);
|
||||
#endif // WIN32
|
||||
DebugPrintTID();
|
||||
// curl needs to be initialized to properly deallocate its resources later
|
||||
Assert(curl_global_init(CURL_GLOBAL_DEFAULT) == CURLE_OK);
|
||||
DebugPrintTID();
|
||||
// curl needs to be initialized to properly deallocate its resources later
|
||||
Assert(curl_global_init(CURL_GLOBAL_DEFAULT) == CURLE_OK);
|
||||
#ifdef DEBUG
|
||||
std::thread t1(loop);
|
||||
t1.detach();
|
||||
std::thread t1(loop);
|
||||
t1.detach();
|
||||
#endif
|
||||
ConsoleInit();
|
||||
InitServer(argc, argv);
|
||||
InitConfig();
|
||||
InitLua();
|
||||
InitRes();
|
||||
HBInit();
|
||||
StatInit();
|
||||
NetMain();
|
||||
// clean up curl at the end to be sure
|
||||
curl_global_cleanup();
|
||||
} catch (const std::exception& e) {
|
||||
error(std::string(e.what()));
|
||||
throw;
|
||||
}
|
||||
ConsoleInit();
|
||||
InitServer(argc, argv);
|
||||
InitConfig();
|
||||
InitLua();
|
||||
InitRes();
|
||||
HBInit();
|
||||
StatInit();
|
||||
NetMain();
|
||||
// clean up curl at the end to be sure
|
||||
curl_global_cleanup();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user