From 51b4906b57848f80d424eb3b1ed6e20841ca34d2 Mon Sep 17 00:00:00 2001 From: Elmsroth Date: Wed, 17 Mar 2021 21:46:19 +0100 Subject: [PATCH] Fix core startup message when db version is same as core (#150) * Fix core startup message when db version is same as core * [Styling] Fix blank space database.cpp L664 * Grrrr $%#! --- src/shared/Database/Database.cpp | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/shared/Database/Database.cpp b/src/shared/Database/Database.cpp index bc752c8c..0c5af3aa 100644 --- a/src/shared/Database/Database.cpp +++ b/src/shared/Database/Database.cpp @@ -644,15 +644,23 @@ bool Database::CheckDatabaseVersion(DatabaseTypes database) } else { - sLog.outString("The table `db_version` indicates that your [%s] database has a higher version than the one referenced by the core." - "\nYou have probably applied DB updates, and that's a good thing to keep your server up to date.", core_db_requirements.dbname.c_str()); - sLog.outString(); - PrintNormalYouHaveDatabaseVersion(current_db_version, current_db_structure, current_db_content, description); - sLog.outString(); - PrintNormalDatabaseVersionReferencedByCore(core_db_requirements); - sLog.outString(); - sLog.outString("You can run the core without any problem like that."); - sLog.outString(); + if (current_db_version == core_db_requirements.expected_version && current_db_structure == core_db_requirements.expected_structure) + { + sLog.outString("The table `db_version` indicates that your [%s] database hase the same version as the core requirements.", core_db_requirements.dbname.c_str()); + sLog.outString(); + } + else + { + sLog.outString("The table `db_version` indicates that your [%s] database has a higher version than the one referenced by the core." + "\nYou have probably applied DB updates, and that's a good thing to keep your server up to date.", core_db_requirements.dbname.c_str()); + sLog.outString(); + PrintNormalYouHaveDatabaseVersion(current_db_version, current_db_structure, current_db_content, description); + sLog.outString(); + PrintNormalDatabaseVersionReferencedByCore(core_db_requirements); + sLog.outString(); + sLog.outString("You can run the core without any problem like that."); + sLog.outString(); + } } return true;