1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 00:55:20 +02:00

Properly handle mod-errors in on_shutdown

This commit is contained in:
Desour
2020-08-23 19:44:25 +02:00
committed by celeron55
parent 3e5bce2251
commit f27cf47779
3 changed files with 23 additions and 4 deletions

View File

@@ -131,7 +131,8 @@ public:
bool simple_singleplayer_mode,
Address bind_addr,
bool dedicated,
ChatInterface *iface = nullptr
ChatInterface *iface = nullptr,
std::string *on_shutdown_errmsg = nullptr
);
~Server();
DISABLE_CLASS_COPY(Server);
@@ -596,6 +597,10 @@ private:
ChatInterface *m_admin_chat;
std::string m_admin_nick;
// if a mod-error occurs in the on_shutdown callback, the error message will
// be written into this
std::string *const m_on_shutdown_errmsg;
/*
Map edit event queue. Automatically receives all map edits.
The constructor of this class registers us to receive them through