mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Introduced forum account authentication system.
Added a new configuration .txt to enable forum database communication. Every connected client receives a new verb to use this system, 'Activate Forum Account' as defined in forum_activation.dm. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1173 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -241,6 +241,59 @@
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
/datum/configuration/proc/loadforumsql(filename) // -- TLE
|
||||
var/text = file2text(filename)
|
||||
|
||||
if (!text)
|
||||
diary << "No forumdbconfig.txt file found, retaining defaults"
|
||||
world << "No forumdbconfig.txt file found, retaining defaults"
|
||||
return
|
||||
|
||||
diary << "Reading forum database configuration file [filename]"
|
||||
|
||||
var/list/CL = dd_text2list(text, "\n")
|
||||
|
||||
for (var/t in CL)
|
||||
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
|
||||
diary << "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).
|
||||
|
||||
Reference in New Issue
Block a user