From d591180e99b4ed44180ccdd1f9ca30695cdacc02 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 20 Sep 2017 16:30:12 +0300 Subject: [PATCH] [Server] Clean up logAppend and add new message for server shutdown --- apps/openmw-mp/Script/LuaState.cpp | 2 +- apps/openmw-mp/main.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw-mp/Script/LuaState.cpp b/apps/openmw-mp/Script/LuaState.cpp index c63caf483..644fc258b 100644 --- a/apps/openmw-mp/Script/LuaState.cpp +++ b/apps/openmw-mp/Script/LuaState.cpp @@ -139,7 +139,7 @@ LuaState::LuaState() LOG_MESSAGE_SIMPLE(level, "[Script]: %s", 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) { diff --git a/apps/openmw-mp/main.cpp b/apps/openmw-mp/main.cpp index 590c21fef..8a012a1fe 100644 --- a/apps/openmw-mp/main.cpp +++ b/apps/openmw-mp/main.cpp @@ -314,6 +314,8 @@ int main(int argc, char *argv[]) if (code == 0) 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();