Conflict resolution

Merge remote-tracking branch 'Aurorastation/development'

# Conflicts:
#	config/example/config.txt
This commit is contained in:
skull132
2016-03-25 22:25:41 +02:00
45 changed files with 749 additions and 289 deletions
+7 -83
View File
@@ -209,6 +209,9 @@ var/list/gamemode_cache = list()
var/aggressive_changelog = 0
//Web interface settings
var/webint_url = ""
/datum/configuration/New()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
for (var/T in L)
@@ -278,7 +281,7 @@ var/list/gamemode_cache = list()
config.log_access = 1
if ("sql_enabled")
config.sql_enabled = text2num(value)
config.sql_enabled = 1
if ("log_say")
config.log_say = 1
@@ -678,6 +681,9 @@ var/list/gamemode_cache = list()
if("show_auxiliary_roles")
config.show_auxiliary_roles = 1
if("webint_url")
config.webint_url = value
else
log_misc("Unknown setting in configuration: '[name]'")
@@ -741,88 +747,6 @@ var/list/gamemode_cache = list()
else
log_misc("Unknown setting in configuration: '[name]'")
/datum/configuration/proc/loadsql(filename) // -- TLE
var/list/Lines = file2list(filename)
for(var/t in Lines)
if(!t) continue
t = trim(t)
if (length(t) == 0)
continue
else if (copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
var/value = null
if (pos)
name = lowertext(copytext(t, 1, pos))
value = copytext(t, pos + 1)
else
name = lowertext(t)
if (!name)
continue
switch (name)
if ("address")
sqladdress = value
if ("port")
sqlport = value
if ("database")
sqldb = value
if ("login")
sqllogin = value
if ("password")
sqlpass = value
if ("enable_stat_tracking")
sqllogging = 1
else
log_misc("Unknown setting in configuration: '[name]'")
/datum/configuration/proc/loadforumsql(filename) // -- TLE
var/list/Lines = file2list(filename)
for(var/t in Lines)
if(!t) continue
t = trim(t)
if (length(t) == 0)
continue
else if (copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
var/value = null
if (pos)
name = lowertext(copytext(t, 1, pos))
value = copytext(t, pos + 1)
else
name = lowertext(t)
if (!name)
continue
switch (name)
if ("address")
forumsqladdress = value
if ("port")
forumsqlport = value
if ("database")
forumsqldb = value
if ("login")
forumsqllogin = value
if ("password")
forumsqlpass = value
if ("activatedgroup")
forum_activated_group = value
if ("authenticatedgroup")
forum_authenticated_group = value
else
log_misc("Unknown setting in configuration: '[name]'")
/datum/configuration/proc/pick_mode(mode_name)
// I wish I didn't have to instance the game modes in order to look up
// their information, but it is the only way (at least that I know of).
+2 -2
View File
@@ -27,7 +27,7 @@ var/global/datum/news_controller/news_controller
//Stores a new article for publishing.
/datum/news_controller/proc/update()
establish_db_connection()
establish_db_connection(dbcon)
if(!dbcon.IsConnected())
error("SQL database connection failed. News_controller failed to retreive information.")
fails++
@@ -52,7 +52,7 @@ var/global/datum/news_controller/news_controller
//Publish the stored article.
/datum/news_controller/proc/publish()
establish_db_connection()
establish_db_connection(dbcon)
if(!dbcon.IsConnected())
error("SQL database connection failed. News_controller failed to retreive information.")
fails++