summaryrefslogtreecommitdiff
path: root/src/server.h
diff options
context:
space:
mode:
authorDesour <vorunbekannt75@web.de>2020-08-23 19:44:25 +0200
committerceleron55 <celeron55@gmail.com>2020-08-24 19:55:25 +0300
commitf27cf4777933f06f85fa2f013d56ca0a2cf1d588 (patch)
tree0de39c63d30849cbf4e7409f00470493a2de5b15 /src/server.h
parent3e5bce2251deb8e5fcbaa266431f8c0f10078bf2 (diff)
downloadminetest-f27cf4777933f06f85fa2f013d56ca0a2cf1d588.tar.gz
minetest-f27cf4777933f06f85fa2f013d56ca0a2cf1d588.tar.bz2
minetest-f27cf4777933f06f85fa2f013d56ca0a2cf1d588.zip
Properly handle mod-errors in on_shutdown
Diffstat (limited to 'src/server.h')
-rw-r--r--src/server.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server.h b/src/server.h
index f44716531..be6f60abc 100644
--- a/src/server.h
+++ b/src/server.h
@@ -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