From ab71f0293be2f4839b4a29eb22fc333cc53eb30a Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 11 Jan 2018 01:52:06 -0800 Subject: [PATCH] Stops the dbadmin warning if SQL_ENABLED isnt set (#34223) --- code/modules/admin/admin_ranks.dm | 6 ++++-- config/config.txt | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index 201fe75979..7332eab8d0 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -143,8 +143,10 @@ GLOBAL_PROTECT(admin_ranks) previous_rights = R.rights else if(!SSdbcore.Connect()) - log_world("Failed to connect to database in load_admin_ranks(). Reverting to legacy system.") - WRITE_FILE(GLOB.world_game_log, "Failed to connect to database in load_admin_ranks(). Reverting to legacy system.") + if(CONFIG_GET(flag/sql_enabled)) + var/msg = "Failed to connect to database in load_admin_ranks(). Reverting to legacy system." + log_world(msg) + WRITE_FILE(GLOB.world_game_log, msg) CONFIG_SET(flag/admin_legacy_system, TRUE) load_admin_ranks() return diff --git a/config/config.txt b/config/config.txt index b934ddab41..72bde1bd39 100644 --- a/config/config.txt +++ b/config/config.txt @@ -30,7 +30,9 @@ LOBBY_COUNTDOWN 120 ## Round End Time: This is the amount of time after the round ends that players have to murder death kill each other. ROUND_END_COUNTDOWN 90 -## Comment this out if you want to use the SQL based admin system, the legacy system uses admins.txt. You need to set up your database to use the SQL based system. +## Comment this out if you want to use the SQL based admin system, the legacy system uses admins.txt. +## You need to set up your database to use the SQL based system. +## This flag is automatically enabled if SQL_ENABLED isn't ADMIN_LEGACY_SYSTEM ## Comment this out if you want to use the SQL based banning system. The legacy systems use the files in the data folder. You need to set up your database to use the SQL based system.