forked from mirror/openmw-tes3mp
[Server] Clean up logAppend and add new message for server shutdown
This commit is contained in:
parent
381a5fabc4
commit
d591180e99
2 changed files with 3 additions and 1 deletions
|
@ -139,7 +139,7 @@ LuaState::LuaState()
|
||||||
LOG_MESSAGE_SIMPLE(level, "[Script]: %s", message);
|
LOG_MESSAGE_SIMPLE(level, "[Script]: %s", message);
|
||||||
});
|
});
|
||||||
lua->set_function("logAppend", [](unsigned short level, const char *message) {
|
lua->set_function("logAppend", [](unsigned short level, const char *message) {
|
||||||
LOG_APPEND(level, "[Script]: %s", message);
|
LOG_APPEND(level, "%s", message);
|
||||||
});
|
});
|
||||||
|
|
||||||
lua->set_function("stopServer", [](int code) {
|
lua->set_function("stopServer", [](int code) {
|
||||||
|
|
|
@ -314,6 +314,8 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
if (code == 0)
|
if (code == 0)
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Quitting peacefully.");
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Quitting peacefully.");
|
||||||
|
else if (code == 1)
|
||||||
|
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Forcibly shutting down because of error.");
|
||||||
|
|
||||||
LOG_QUIT();
|
LOG_QUIT();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue