diff --git a/README.md b/README.md index fe909d5..992015e 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,13 @@ This is the server for the multiplayer mod **[BeamMP](https://beammp.com/)** for the game [BeamNG.drive](https://www.beamng.com/). The server is the point throug which all clients communicate. You can write lua mods for the server, detailed instructions on the [BeamMP Wiki](https://wiki.beammp.com). +## Support + Contact + +Feel free to ask any questions via the following channels: + +- **IRC**: `#beammp` on [irc.libera.chat](https://web.libera.chat/) +- **Discord**: [click for invite](https://discord.gg/beammp) + ## Minimum Requirements These values are guesstimated and are subject to change with each release. diff --git a/src/THeartbeatThread.cpp b/src/THeartbeatThread.cpp index 6588d75..75118e0 100644 --- a/src/THeartbeatThread.cpp +++ b/src/THeartbeatThread.cpp @@ -3,8 +3,12 @@ #include "Client.h" #include "Http.h" //#include "SocketIO.h" +#include +#include #include +namespace json = rapidjson; + void THeartbeatThread::operator()() { RegisterThread("Heartbeat"); std::string Body; @@ -85,10 +89,13 @@ void THeartbeatThread::operator()() { } else if (T == "200") { beammp_info(("Resumed authenticated session!")); isAuth = true; + } else { + if (Message.empty()) { + Message = "Backend didn't provide a reason"; + } + error("Backend REFUSED the auth key. " + Message); } } - - // SocketIO::Get().SetAuthenticated(isAuth); } }