diff --git a/src/Monitor.cpp b/src/Monitor.cpp index b0501eb..b333801 100644 --- a/src/Monitor.cpp +++ b/src/Monitor.cpp @@ -6,6 +6,8 @@ #include +#ifndef _WIN32 + static int listener; static std::mutex sockLock; // guards socket list static std::list sockets; @@ -110,3 +112,5 @@ void Monitor::start(void *unused) { } } } + +#endif // _WIN32 diff --git a/src/Monitor.hpp b/src/Monitor.hpp index c654b5a..49e91c6 100644 --- a/src/Monitor.hpp +++ b/src/Monitor.hpp @@ -1,5 +1,7 @@ #pragma once +#ifndef _WIN32 + #include "CNProtocol.hpp" #include @@ -10,3 +12,5 @@ namespace Monitor { void tick(CNServer *, time_t); void start(void *); }; + +#endif // _WIN32 diff --git a/src/main.cpp b/src/main.cpp index ee9220f..e381a2d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -104,7 +104,9 @@ int main() { TransportManager::init(); BuddyManager::init(); GroupManager::init(); +#ifndef _WIN32 Monitor::init(); +#endif Database::open(); switch (settings::EVENTMODE) { @@ -123,7 +125,9 @@ int main() { shardServer = new CNShardServer(settings::SHARDPORT); shardThread = new std::thread(startShard, (CNShardServer*)shardServer); +#ifndef _WIN32 monitorThread = new std::thread(Monitor::start, nullptr); +#endif loginServer.start();