[General] Move credits integrity error message to new ErrorMessages file

Additionally, use correct log level for credit integrity message on server.
remotes/1728160796594174844/tmp_0.7.0-alpha
David Cernat 7 years ago
parent 0b5cb15f71
commit 72d286473b

@ -9,6 +9,7 @@
#include <components/settings/settings.hpp> #include <components/settings/settings.hpp>
#include <components/version/version.hpp> #include <components/version/version.hpp>
#include <components/openmw-mp/ErrorMessages.hpp>
#include <components/openmw-mp/Log.hpp> #include <components/openmw-mp/Log.hpp>
#include <components/openmw-mp/NetworkMessages.hpp> #include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Utils.hpp> #include <components/openmw-mp/Utils.hpp>
@ -216,10 +217,8 @@ int main(int argc, char *argv[])
if (!hasValidCredits) if (!hasValidCredits)
{ {
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "To respect the hard work that has gone into\n" LOG_MESSAGE_SIMPLE(Log::LOG_FATAL, "The server is shutting down");
"creating TES3MP, you are required to keep an unmodified tes3mp-credits file\n" LOG_APPEND(Log::LOG_FATAL, "- %s", TES3MP_CREDITS_ERROR);
"corresponding to this version of the code in the same folder as this\n"
"executable. It can have either an .md or a .txt extension.");
return 1; return 1;
} }

@ -146,7 +146,7 @@ add_component_dir (version
) )
add_component_dir (openmw-mp add_component_dir (openmw-mp
Log Utils NetworkMessages Version Log Utils ErrorMessages NetworkMessages Version
) )
add_component_dir (openmw-mp/Base add_component_dir (openmw-mp/Base

@ -0,0 +1,9 @@
#ifndef OPENMW_ERRORMESSAGES_HPP
#define OPENMW_ERRORMESSAGES_HPP
#define TES3MP_CREDITS_ERROR ("To respect the hard work that has gone into creating TES3MP, you are\n"\
"required to keep an unmodified tes3mp-credits file corresponding to this\n"\
"version of the code in the same folder as this executable. It can have either\n"\
"an .md or a .txt extension.")
#endif //OPENMW_ERRORMESSAGES_HPP
Loading…
Cancel
Save