From 3cd19d8c8f66ce8f5fb6f8b63d994dfe37edf3ea Mon Sep 17 00:00:00 2001 From: "johnsonmt88@gmail.com" Date: Mon, 25 Feb 2013 01:16:57 +0000 Subject: [PATCH] sql_enabled is no longer hardcoded to be enabled; having it off in the config.txt will actually be reflected in the code. The "Your server failed to establish a connection with the x database." message will now only show if you have sql_enabled. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5777 316c924e-a436-60f5-8080-3fe189b3f50e --- code/controllers/configuration.dm | 8 ++------ code/world.dm | 17 +++++++++-------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 195e9b0f1ee..bc253e2bdf6 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -17,7 +17,7 @@ var/log_adminwarn = 0 // log warnings admins get about bomb construction and such var/log_pda = 0 // log pda messages var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits - var/sql_enabled = 1 // for sql switching + var/sql_enabled = 0 // for sql switching var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour var/allow_vote_restart = 0 // allow votes to restart var/allow_vote_mode = 0 // allow votes to change mode @@ -28,7 +28,6 @@ var/vote_period = 600 // length of voting period (deciseconds, default 1 minute) var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi) var/vote_no_dead = 0 // dead people can't vote (tbi) -// var/enable_authentication = 0 // goon authentication var/del_new_on_log = 1 // del's new players if they log before they spawn in var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard var/traitor_scaling = 0 //if amount of traitors scales based on amount of players @@ -174,7 +173,7 @@ config.log_access = 1 if ("sql_enabled") - config.sql_enabled = text2num(value) + config.sql_enabled = 1 if ("log_say") config.log_say = 1 @@ -248,9 +247,6 @@ if ("allow_ai") config.allow_ai = 1 -// if ("authentication") -// config.enable_authentication = 1 - if ("norespawn") config.respawn = 0 diff --git a/code/world.dm b/code/world.dm index ceebc474b19..cd9f4b91175 100644 --- a/code/world.dm +++ b/code/world.dm @@ -47,15 +47,16 @@ data_core = new /obj/effect/datacore() paiController = new /datum/paiController() - if(!setup_database_connection()) - world.log << "Your server failed to establish a connection with the feedback database." - else - world.log << "Feedback database connection established." + if(config.sql_enabled) + if(!setup_database_connection()) + world.log << "Your server failed to establish a connection with the feedback database." + else + world.log << "Feedback database connection established." - if(!setup_old_database_connection()) - world.log << "Your server failed to establish a connection with the tgstation database." - else - world.log << "Tgstation database connection established." + if(!setup_old_database_connection()) + world.log << "Your server failed to establish a connection with the tgstation database." + else + world.log << "Tgstation database connection established." plmaster = new /obj/effect/overlay() plmaster.icon = 'icons/effects/tile_effects.dmi'