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:
only.lurking@gmail.com
2011-03-10 06:47:43 +00:00
parent fd37bd99f0
commit e27e4923fe
6 changed files with 186 additions and 1 deletions
+53
View File
@@ -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).