mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
- Fixed the revision number not showing properly. Hopefully it's fixed for good this time, as it works off of logic, instead of line numbers.
- Standardized the database library code - Deleted a few unused database related files (karma and forum activation), so they won't get in my way later. They work off of no longer existent database tables. - Made it so the server maintains a constant connection with the database, which is established on world/New() and never broken, until the server ends. If 5 consecutive database connection attempts result in no connection getting established, the server will not attempt any more connections. Made all existing database connections use the global continuous connections. Currently we need two, as we have two databases, but the old database is going to get moved into the new one. - Fixed the spaghetti-like report in the permissions panel, which happened when someone had many permissions enabled. - Added database connection reports to display to dream daemon on server startup. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5015 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -47,10 +47,23 @@ var/global/datum/getrev/revdata = new("config/svndir.txt")
|
||||
|
||||
if(svndirpath && fexists(svndirpath) && fexists("[svndirpath]/entries") && isfile(file("[svndirpath]/entries")))
|
||||
var/list/filelist = file2list("[svndirpath]/entries")
|
||||
if(filelist.len < 4)
|
||||
return abort()
|
||||
revision = filelist[4]
|
||||
commiter = filelist[12]
|
||||
var/s_archive = "" //Stores the previous line so the revision owner can be assigned.
|
||||
|
||||
//This thing doesn't count blank lines, so doing filelist[4] isn't working.
|
||||
for(var/s in filelist)
|
||||
if(!commiter)
|
||||
if(s == "has-props")//The line before this is the committer.
|
||||
commiter = s_archive
|
||||
if(!revision)
|
||||
var/n = text2num(s)
|
||||
if(isnum(n))
|
||||
if(n > 5000 && n < 99999) //Do you think we'll still be up and running at r100000? :) ~Errorage
|
||||
revision = s
|
||||
if(revision && commiter)
|
||||
break
|
||||
s_archive = s
|
||||
if(!revision)
|
||||
abort()
|
||||
world.log << "Running TG Revision Number: [revision]."
|
||||
diary << "Revision info loaded succesfully"
|
||||
return
|
||||
|
||||
@@ -39,37 +39,6 @@ var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is
|
||||
*/
|
||||
|
||||
DBConnection
|
||||
New(dbi_handler,username,password_handler,cursor_handler)
|
||||
src.dbi = dbi_handler
|
||||
src.user = username
|
||||
src.password = password_handler
|
||||
src.default_cursor = cursor_handler
|
||||
_db_con = _dm_db_new_con()
|
||||
proc
|
||||
Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
|
||||
if(!sqllogging)
|
||||
return 0
|
||||
if(!src) return 0
|
||||
cursor_handler = src.default_cursor
|
||||
if(!cursor_handler) cursor_handler = Default_Cursor
|
||||
return _dm_db_connect(_db_con,dbi_handler,user_handler,password_handler,cursor_handler,null)
|
||||
|
||||
Disconnect() return _dm_db_close(_db_con)
|
||||
|
||||
IsConnected()
|
||||
if(!sqllogging) return 0
|
||||
var/success = _dm_db_is_connected(_db_con)
|
||||
return success
|
||||
|
||||
Quote(str) return _dm_db_quote(_db_con,str)
|
||||
|
||||
ErrorMsg() return _dm_db_error_msg(_db_con)
|
||||
SelectDB(database_name,dbi)
|
||||
if(IsConnected()) Disconnect()
|
||||
//return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
|
||||
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
|
||||
NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
|
||||
|
||||
var/_db_con // This variable contains a reference to the actual database connection.
|
||||
var/dbi // This variable is a string containing the DBI MySQL requires.
|
||||
var/user // This variable contains the username data.
|
||||
@@ -79,36 +48,76 @@ DBConnection
|
||||
var/server = ""
|
||||
var/port = 3306
|
||||
|
||||
DBQuery
|
||||
New(sql_query,DBConnection/connection_handler,cursor_handler)
|
||||
DBConnection/New(dbi_handler,username,password_handler,cursor_handler)
|
||||
src.dbi = dbi_handler
|
||||
src.user = username
|
||||
src.password = password_handler
|
||||
src.default_cursor = cursor_handler
|
||||
_db_con = _dm_db_new_con()
|
||||
|
||||
DBConnection/proc/Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
|
||||
if(!sqllogging)
|
||||
return 0
|
||||
if(!src) return 0
|
||||
cursor_handler = src.default_cursor
|
||||
if(!cursor_handler) cursor_handler = Default_Cursor
|
||||
return _dm_db_connect(_db_con,dbi_handler,user_handler,password_handler,cursor_handler,null)
|
||||
|
||||
DBConnection/proc/Disconnect() return _dm_db_close(_db_con)
|
||||
|
||||
DBConnection/proc/IsConnected()
|
||||
if(!sqllogging) return 0
|
||||
var/success = _dm_db_is_connected(_db_con)
|
||||
return success
|
||||
|
||||
DBConnection/proc/Quote(str) return _dm_db_quote(_db_con,str)
|
||||
|
||||
DBConnection/proc/ErrorMsg() return _dm_db_error_msg(_db_con)
|
||||
DBConnection/proc/SelectDB(database_name,dbi)
|
||||
if(IsConnected()) Disconnect()
|
||||
//return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
|
||||
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
|
||||
DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
|
||||
|
||||
|
||||
DBQuery/New(sql_query,DBConnection/connection_handler,cursor_handler)
|
||||
if(sql_query) src.sql = sql_query
|
||||
if(connection_handler) src.db_connection = connection_handler
|
||||
if(cursor_handler) src.default_cursor = cursor_handler
|
||||
_db_query = _dm_db_new_query()
|
||||
return ..()
|
||||
|
||||
proc
|
||||
|
||||
Connect(DBConnection/connection_handler) src.db_connection = connection_handler
|
||||
DBQuery
|
||||
var/sql // The sql query being executed.
|
||||
var/default_cursor
|
||||
var/list/columns //list of DB Columns populated by Columns()
|
||||
var/list/conversions
|
||||
var/list/item[0] //list of data values populated by NextRow()
|
||||
|
||||
Execute(sql_query=src.sql,cursor_handler=default_cursor)
|
||||
var/DBConnection/db_connection
|
||||
var/_db_query
|
||||
|
||||
DBQuery/proc/Connect(DBConnection/connection_handler) src.db_connection = connection_handler
|
||||
|
||||
DBQuery/proc/Execute(sql_query=src.sql,cursor_handler=default_cursor)
|
||||
Close()
|
||||
return _dm_db_execute(_db_query,sql_query,db_connection._db_con,cursor_handler,null)
|
||||
|
||||
NextRow() return _dm_db_next_row(_db_query,item,conversions)
|
||||
DBQuery/proc/NextRow() return _dm_db_next_row(_db_query,item,conversions)
|
||||
|
||||
RowsAffected() return _dm_db_rows_affected(_db_query)
|
||||
DBQuery/proc/RowsAffected() return _dm_db_rows_affected(_db_query)
|
||||
|
||||
RowCount() return _dm_db_row_count(_db_query)
|
||||
DBQuery/proc/RowCount() return _dm_db_row_count(_db_query)
|
||||
|
||||
ErrorMsg() return _dm_db_error_msg(_db_query)
|
||||
DBQuery/proc/ErrorMsg() return _dm_db_error_msg(_db_query)
|
||||
|
||||
Columns()
|
||||
DBQuery/proc/Columns()
|
||||
if(!columns)
|
||||
columns = _dm_db_columns(_db_query,/DBColumn)
|
||||
return columns
|
||||
|
||||
GetRowData()
|
||||
DBQuery/proc/GetRowData()
|
||||
var/list/columns = Columns()
|
||||
var/list/results
|
||||
if(columns.len)
|
||||
@@ -119,29 +128,21 @@ DBQuery
|
||||
results[C] = src.item[(cur_col.position+1)]
|
||||
return results
|
||||
|
||||
Close()
|
||||
DBQuery/proc/Close()
|
||||
item.len = 0
|
||||
columns = null
|
||||
conversions = null
|
||||
return _dm_db_close(_db_query)
|
||||
|
||||
Quote(str)
|
||||
DBQuery/proc/Quote(str)
|
||||
return db_connection.Quote(str)
|
||||
|
||||
SetConversion(column,conversion)
|
||||
DBQuery/proc/SetConversion(column,conversion)
|
||||
if(istext(column)) column = columns.Find(column)
|
||||
if(!conversions) conversions = new/list(column)
|
||||
else if(conversions.len < column) conversions.len = column
|
||||
conversions[column] = conversion
|
||||
|
||||
var/sql // The sql query being executed.
|
||||
var/default_cursor
|
||||
var/list/columns //list of DB Columns populated by Columns()
|
||||
var/list/conversions
|
||||
var/list/item[0] //list of data values populated by NextRow()
|
||||
|
||||
var/DBConnection/db_connection
|
||||
var/_db_query
|
||||
|
||||
DBColumn
|
||||
var/name
|
||||
@@ -152,7 +153,7 @@ DBColumn
|
||||
var/length
|
||||
var/max_length
|
||||
|
||||
New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
|
||||
DBColumn/New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
|
||||
src.name = name_handler
|
||||
src.table = table_handler
|
||||
src.position = position_handler
|
||||
@@ -162,8 +163,8 @@ DBColumn
|
||||
src.max_length = max_length_handler
|
||||
return ..()
|
||||
|
||||
proc
|
||||
SqlTypeName(type_handler=src.sql_type)
|
||||
|
||||
DBColumn/proc/SqlTypeName(type_handler=src.sql_type)
|
||||
switch(type_handler)
|
||||
if(TINYINT) return "TINYINT"
|
||||
if(SMALLINT) return "SMALLINT"
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
//*******************************
|
||||
//
|
||||
// Forum SQL Account Activation
|
||||
//
|
||||
//*******************************
|
||||
//
|
||||
// This module allows players to associate their BYOND keys with a specific forum username on the /tg/station forums.
|
||||
// Its original intent is to disable posting for any non-associated forum accounts, and only allow players who've activated
|
||||
// their account in-game to be able to post, hopefully reducing the spam the forum receives dramatically.
|
||||
//
|
||||
// This effect, of course, is not achieved entirely within BYOND. Some configuration on the forum-side is required as well.
|
||||
// Targetted for phpBB3, not tested with earlier versions.
|
||||
//
|
||||
//
|
||||
// Requires Dantom.DB library ( http://www.byond.com/developer/Dantom/DB )
|
||||
//
|
||||
// Written by TLE for /tg/station13
|
||||
|
||||
|
||||
/proc/associate_key_with_forum(var/accname as text, var/playerkey as text)
|
||||
var/DBConnection/dbcon = new()
|
||||
var/uid
|
||||
|
||||
// TODO: Replace local vars with global var references
|
||||
var/TG13user = forumsqllogin
|
||||
var/TG13pass = forumsqlpass
|
||||
var/TG13db = forumsqldb
|
||||
var/TG13address = forumsqladdress
|
||||
var/TG13port = forumsqlport
|
||||
|
||||
dbcon.Connect("dbi:mysql:[TG13db]:[TG13address]:[TG13port]","[TG13user]","[TG13pass]")
|
||||
if(!dbcon.IsConnected())
|
||||
src << "<font color=red><b>Server Connection Error</b> : Unable to open a connection with the forum database.</font>"
|
||||
src << "<i>Potential causes for this problem: Incorrect login information, incorrect server connection information, the forum server is down or not responding to requests, your firewall is blocking outgoing SQL requests.</i>"
|
||||
return
|
||||
|
||||
// Sanitize inputs to avoid SQL injection attacks
|
||||
accname = sanitizeSQL(accname)
|
||||
playerkey = sanitizeSQL(playerkey)
|
||||
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT user_id FROM [forumsqldb].phpbb_users WHERE username = '[accname]'")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
uid = query.item[1] // Find and save the account's user_id
|
||||
if(!uid)
|
||||
src << "Forum account not found!"
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("SELECT pf_byondkey FROM [forumsqldb].phpbb_profile_fields_data WHERE user_id = '[uid]'")
|
||||
if(!query.Execute())
|
||||
src << "Unable to verify whether account is already associated with a BYOND key or not. This error shouldn't occur, please contact an administrator."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
if(query.RowCount() > 0)
|
||||
query.NextRow()
|
||||
var/currentholder = query.item[1]
|
||||
src << "Forum account already has a BYOND key associated with it. The current BYOND key associated with the account is \"[currentholder]\"."
|
||||
src << "If this is not a key you own and you feel that someone has wrongfully authenticated your forum account please contact an administrator to have your account returned to you."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("SELECT * FROM [forumsqldb].phpbb_user_group WHERE user_id = '[uid]' AND group_id = '[forum_authenticated_group]'")
|
||||
if(!query.Execute())
|
||||
src << "Unable to verify whether account is already part of the authenticated group or not. This error should not occur, please contact an administrator."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
if(query.RowCount() > 0)
|
||||
src << "Forum account already belongs to the authenticated group. If this is your account and you did not authenticate it please contact an administrator to have your account returned to you."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("INSERT INTO [forumsqldb].phpbb_profile_fields_data (user_id, pf_byondkey) VALUES ('[uid]', '[playerkey]')") // Remember which key is associated with the account
|
||||
if(!query.Execute())
|
||||
src << "Unable to associate key with account. Authentication failed."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("UPDATE [forumsqldb].phpbb_user_group SET group_id = '[forum_authenticated_group]' WHERE user_id = '[uid]' AND group_id = '[forum_activated_group]'") // Replace 'registered_name Users' group with 'Activated Users'
|
||||
if(!query.Execute())
|
||||
src << "Unable to move account into authenticated group. This error shouldn't occur, contact an administrator for help. Authentication failed."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("UPDATE [forumsqldb].phpbb_users SET group_id = '[forum_authenticated_group]' WHERE user_id = '[uid]'") // Change 'default group' the the authenticated group. Not doing so was causing many authenticated accounts to retain their unauthenticated permissions, despite being succesfully authenticated.
|
||||
if(!query.Execute())
|
||||
src << "Unable to modify default group for account. This error should never occur, contact an administrator for help. Authentication failed."
|
||||
else
|
||||
src << "Authentication succeeded. You may now start posting on the <a href=http://nanotrasen.com/phpBB3/>tgstation forums</a>."
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
// This actually opens up a bunch of security holes to the forum DB. Given that it's not used much in the first place,
|
||||
// I'm going to keep this commented out until we're sure everything's secure. -- TLE
|
||||
/*
|
||||
/client/verb/activate_forum_account(var/a as text)
|
||||
set name = "Activate Forum Account"
|
||||
set category = "Special Verbs"
|
||||
set desc = "Associate a tgstation forum account with your BYOND key to enable posting."
|
||||
associate_key_with_forum(a, src.key)
|
||||
*/
|
||||
@@ -5,8 +5,7 @@ proc/sql_poll_players()
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
playercount += 1
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
log_game("SQL ERROR during player polling. Failed to connect.")
|
||||
else
|
||||
@@ -15,15 +14,13 @@ proc/sql_poll_players()
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during player polling. Error : \[[err]\]\n")
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
proc/sql_poll_admins()
|
||||
if(!sqllogging)
|
||||
return
|
||||
var/admincount = admins.len
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
log_game("SQL ERROR during admin polling. Failed to connect.")
|
||||
else
|
||||
@@ -32,7 +29,6 @@ proc/sql_poll_admins()
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during admin polling. Error : \[[err]\]\n")
|
||||
dbcon.Disconnect()
|
||||
|
||||
proc/sql_report_round_start()
|
||||
// TODO
|
||||
@@ -68,8 +64,7 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
|
||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
var/coord = "[H.x], [H.y], [H.z]"
|
||||
//world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])"
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
log_game("SQL ERROR during death reporting. Failed to connect.")
|
||||
else
|
||||
@@ -77,7 +72,6 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
@@ -105,8 +99,7 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
var/coord = "[H.x], [H.y], [H.z]"
|
||||
//world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])"
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
log_game("SQL ERROR during death reporting. Failed to connect.")
|
||||
else
|
||||
@@ -114,7 +107,6 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
proc/statistic_cycle()
|
||||
@@ -139,8 +131,7 @@ proc/sql_commit_feedback()
|
||||
log_game("Round ended without any feedback being generated. No feedback was sent to the database.")
|
||||
return
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
log_game("SQL ERROR during feedback reporting. Failed to connect.")
|
||||
else
|
||||
@@ -170,8 +161,6 @@ proc/sql_commit_feedback()
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
proc/debug_sql_commit_feedback()
|
||||
if(!blackbox)
|
||||
|
||||
@@ -226,3 +226,9 @@ var/fileaccess_timer = 1800 //Cannot access files by ftp until the game is finis
|
||||
#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
|
||||
|
||||
#define R_HOST 65535
|
||||
|
||||
|
||||
//Database connections
|
||||
//A connection is established on world creation. Ideally, the connection dies when the server restarts (After feedback logging.).
|
||||
var/DBConnection/dbcon = new() //Feedback database (New database)
|
||||
var/DBConnection/dbcon_old = new() //Tgstation database (Old database) - See the files in the SQL folder for information what goes where.
|
||||
@@ -1,14 +1,6 @@
|
||||
|
||||
datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1, var/reason, var/job = "", var/rounds = 0)
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
|
||||
@@ -73,16 +65,9 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
|
||||
datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/bantype_str
|
||||
if(bantype)
|
||||
@@ -115,9 +100,7 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
if(job)
|
||||
sql += " AND job = '[job]'"
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
|
||||
@@ -148,17 +131,10 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
|
||||
|
||||
datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/sql = "SELECT id FROM erro_ban WHERE id = [id]"
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
|
||||
|
||||
@@ -95,15 +95,8 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
|
||||
else
|
||||
//The current admin system uses SQL
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||
config.admin_legacy_system = 1
|
||||
|
||||
@@ -15,14 +15,7 @@
|
||||
usr << "\red You do not have permission to do this!"
|
||||
return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "\red Failed to establish database connection"
|
||||
return
|
||||
@@ -53,12 +46,18 @@
|
||||
var/adm_rank = select_query.item[2]
|
||||
var/adm_level = select_query.item[3]
|
||||
var/adm_flags = text2num(select_query.item[4])
|
||||
|
||||
var/rights_text = rights2text(adm_flags)
|
||||
rights_text = replacetextEx(rights_text, "+", "<br>+")
|
||||
if(length(rights_text) > 5)
|
||||
rights_text = copytext(rights_text, 5) //Removes the first <br>, which replacetextEx() adds.
|
||||
|
||||
output += "<tr bgcolor='[(i % 2) ? color1 : color2]'>"
|
||||
output += "<td align='center'><b>[adm_ckey]</b></td>"
|
||||
output += "<td align='center'><b>[adm_rank]</b></td>"
|
||||
output += "<td align='center'>[adm_level]</td>"
|
||||
output += "<td align='center'>"
|
||||
output += "<font size='2'>[rights2text(adm_flags)]</font>"
|
||||
output += "<font size='2'>[rights_text]</font>"
|
||||
output += "</td>"
|
||||
output += "<td align='center'><font size='2'>"
|
||||
|
||||
@@ -74,8 +73,6 @@
|
||||
|
||||
usr << browse(output,"window=editadminpermissions;size=600x500")
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
/datum/admins/proc/log_admin_rank_modification(var/adm_ckey, var/new_rank)
|
||||
if(!usr.client)
|
||||
@@ -85,14 +82,8 @@
|
||||
usr << "\red You do not have permission to do this!"
|
||||
return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
establish_db_connection()
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "\red Failed to establish database connection"
|
||||
return
|
||||
@@ -131,8 +122,6 @@
|
||||
log_query.Execute()
|
||||
usr << "\blue Admin rank changed."
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
|
||||
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
|
||||
@@ -144,14 +133,7 @@
|
||||
usr << "\red You do not have permission to do this!"
|
||||
return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "\red Failed to establish database connection"
|
||||
return
|
||||
@@ -194,5 +176,3 @@
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')")
|
||||
log_query.Execute()
|
||||
usr << "\blue Permission added."
|
||||
|
||||
dbcon.Disconnect()
|
||||
@@ -135,15 +135,7 @@
|
||||
if ( IsGuestKey(src.key) )
|
||||
return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
|
||||
@@ -181,8 +173,6 @@
|
||||
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO erro_player (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')")
|
||||
query_insert.Execute()
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
#undef TOPIC_SPAM_DELAY
|
||||
#undef UPLOAD_LIMIT
|
||||
#undef MIN_CLIENT_VERSION
|
||||
|
||||
@@ -43,9 +43,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
dat += "<A href='?src=\ref[src];setauthor=1'>Filter by Author: [author]</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];search=1'>\[Start Search\]</A><BR>"
|
||||
if(1)
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(!dbcon.IsConnected())
|
||||
establish_old_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
dat += "<font color=red><b>ERROR</b>: Unable to contact External Archive. Please contact your system administrator for assistance.</font><BR>"
|
||||
else if(!SQLquery)
|
||||
dat += "<font color=red><b>ERROR</b>: Malformed search request. Please contact your system administrator for assistance.</font><BR>"
|
||||
@@ -53,7 +52,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
dat += "<table>"
|
||||
dat += "<tr><td>AUTHOR</td><td>TITLE</td><td>CATEGORY</td><td>SS<sup>13</sup>BN</td></tr>"
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery(SQLquery)
|
||||
var/DBQuery/query = dbcon_old.NewQuery(SQLquery)
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
@@ -63,7 +62,6 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/id = query.item[4]
|
||||
dat += "<tr><td>[author]</td><td>[title]</td><td>[category]</td><td>[id]</td></tr>"
|
||||
dat += "</table><BR>"
|
||||
dbcon.Disconnect()
|
||||
dat += "<A href='?src=\ref[src];back=1'>\[Go Back\]</A><BR>"
|
||||
user << browse(dat, "window=publiclibrary")
|
||||
onclose(user, "publiclibrary")
|
||||
@@ -191,16 +189,15 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
dat += "<A href='?src=\ref[src];switchscreen=0'>(Return to main menu)</A><BR>"
|
||||
if(4)
|
||||
dat += "<h3>External Archive</h3>"
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(!dbcon.IsConnected())
|
||||
establish_old_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
dat += "<font color=red><b>ERROR</b>: Unable to contact External Archive. Please contact your system administrator for assistance.</font>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];orderbyid=1'>(Order book by SS<sup>13</sup>BN)</A><BR><BR>"
|
||||
dat += "<table>"
|
||||
dat += "<tr><td>AUTHOR</td><td>TITLE</td><td>CATEGORY</td><td></td></tr>"
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, author, title, category FROM library")
|
||||
var/DBQuery/query = dbcon_old.NewQuery("SELECT id, author, title, category FROM library")
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
@@ -211,7 +208,6 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
dat += "<tr><td>[author]</td><td>[title]</td><td>[category]</td><td><A href='?src=\ref[src];targetid=[id]'>\[Order\]</A></td></tr>"
|
||||
dat += "</table>"
|
||||
dat += "<BR><A href='?src=\ref[src];switchscreen=0'>(Return to main menu)</A><BR>"
|
||||
dbcon.Disconnect()
|
||||
if(5)
|
||||
dat += "<H3>Upload a New Title</H3>"
|
||||
if(!scanner)
|
||||
@@ -333,9 +329,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
if(scanner.cache)
|
||||
var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm")
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(!dbcon.IsConnected())
|
||||
establish_old_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
alert("Connection to Archive has been severed. Aborting.")
|
||||
else
|
||||
/*
|
||||
@@ -348,18 +343,17 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/sqlauthor = sanitizeSQL(scanner.cache.author)
|
||||
var/sqlcontent = sanitizeSQL(scanner.cache.dat)
|
||||
var/sqlcategory = sanitizeSQL(upload_category)
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')")
|
||||
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')")
|
||||
if(!query.Execute())
|
||||
usr << query.ErrorMsg()
|
||||
else
|
||||
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
|
||||
alert("Upload Complete.")
|
||||
dbcon.Disconnect()
|
||||
|
||||
if(href_list["targetid"])
|
||||
var/sqlid = sanitizeSQL(href_list["targetid"])
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(!dbcon.IsConnected())
|
||||
establish_old_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
alert("Connection to Archive has been severed. Aborting.")
|
||||
if(bibledelay)
|
||||
for (var/mob/V in hearers(src))
|
||||
@@ -368,7 +362,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
bibledelay = 1
|
||||
spawn(60)
|
||||
bibledelay = 0
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM library WHERE id=[sqlid]")
|
||||
var/DBQuery/query = dbcon_old.NewQuery("SELECT * FROM library WHERE id=[sqlid]")
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
@@ -383,7 +377,6 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
B.icon_state = "book[rand(1,7)]"
|
||||
src.visible_message("[src]'s printer hums as it produces a completely bound book. How did it do that?")
|
||||
break
|
||||
dbcon.Disconnect()
|
||||
if(href_list["orderbyid"])
|
||||
var/orderid = input("Enter your order:") as num|null
|
||||
if(orderid)
|
||||
|
||||
@@ -24,11 +24,6 @@
|
||||
|
||||
|
||||
proc/new_player_panel_proc()
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/output = "<div align='center'><B>New Player Options</B>"
|
||||
output +="<hr>"
|
||||
@@ -44,8 +39,7 @@
|
||||
output += "<p><a href='byond://?src=\ref[src];observe=1'>Observe</A></p>"
|
||||
|
||||
if(!IsGuestKey(src.key))
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
|
||||
if(dbcon.IsConnected())
|
||||
var/isadmin = 0
|
||||
@@ -62,7 +56,6 @@
|
||||
output += "<p><b><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A> (NEW!)</b></p>"
|
||||
else
|
||||
output += "<p><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A></p>"
|
||||
dbcon.Disconnect()
|
||||
|
||||
output += "</div>"
|
||||
|
||||
@@ -165,15 +158,7 @@
|
||||
return
|
||||
|
||||
if(href_list["privacy_poll"])
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
var/voted = 0
|
||||
@@ -210,8 +195,6 @@
|
||||
usr << "<b>Thank you for your vote!</b>"
|
||||
usr << browse(null,"window=privacypoll")
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
if(!ready && href_list["preference"])
|
||||
preferences.process_link(src, href_list)
|
||||
else if(!href_list["late_join"])
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
|
||||
/mob/new_player/proc/handle_privacy_poll()
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
var/voted = 0
|
||||
@@ -22,8 +14,6 @@
|
||||
if(!voted)
|
||||
privacy_poll()
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
/mob/new_player/proc/privacy_poll()
|
||||
var/output = "<div align='center'><B>Player poll</B>"
|
||||
output +="<hr>"
|
||||
@@ -57,15 +47,7 @@
|
||||
var/optiontext
|
||||
|
||||
/mob/new_player/proc/handle_player_polling()
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
var/isadmin = 0
|
||||
if(src.client && src.client.holder)
|
||||
@@ -95,20 +77,11 @@
|
||||
|
||||
src << browse(output,"window=playerpolllist;size=500x300")
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
/mob/new_player/proc/poll_player(var/pollid = -1)
|
||||
if(pollid == -1) return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid]")
|
||||
@@ -155,8 +128,6 @@
|
||||
PO.optiontext = options_query.item[2]
|
||||
options += PO
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
var/output = "<div align='center'><B>Player poll</B>"
|
||||
output +="<hr>"
|
||||
output += "<b>Question: [pollquestion]</b><br>"
|
||||
@@ -308,15 +279,7 @@
|
||||
|
||||
if(!isnum(pollid) || !isnum(optionid))
|
||||
return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
@@ -378,15 +341,7 @@
|
||||
|
||||
if(!isnum(pollid) || !istext(replytext))
|
||||
return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
@@ -444,15 +399,7 @@
|
||||
|
||||
if(!isnum(pollid) || !isnum(optionid))
|
||||
return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
|
||||
@@ -272,16 +272,7 @@ var/obj/machinery/blackbox_recorder/blackbox
|
||||
if(!feedback) return
|
||||
|
||||
round_end_data_gathering() //round_end time logging and some other data processing
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected()) return
|
||||
var/round_id
|
||||
|
||||
@@ -299,8 +290,6 @@ var/obj/machinery/blackbox_recorder/blackbox
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
// Sanitize inputs to avoid SQL injection attacks
|
||||
proc/sql_sanitize_text(var/text)
|
||||
text = replacetext(text, "'", "''")
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
/mob/verb/check_karma()
|
||||
set name = "Check Karma"
|
||||
set category = "Special Verbs"
|
||||
set desc = "Reports how much karma you have accrued"
|
||||
|
||||
if(config.sql_enabled)
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "\red Unable to connect to karma database. This error can occur if your host has failed to set up an SQL database or improperly configured its login credentials.<br>"
|
||||
return
|
||||
else
|
||||
usr.verbs -= /mob/verb/check_karma
|
||||
spawn(300)
|
||||
usr.verbs += /mob/verb/check_karma
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT karma FROM karmatotals WHERE byondkey='[src.key]'")
|
||||
query.Execute()
|
||||
|
||||
var/currentkarma
|
||||
while(query.NextRow())
|
||||
currentkarma = query.item[1]
|
||||
if(currentkarma)
|
||||
usr << "<b>Your current karma is:</b> [currentkarma]<br>"
|
||||
else
|
||||
usr << "<b>Your current karma is:</b> 0<br>"
|
||||
dbcon.Disconnect()
|
||||
else
|
||||
usr << "<b>SQL is off, karma is not usable<b>"
|
||||
@@ -34,6 +34,16 @@
|
||||
|
||||
..()
|
||||
|
||||
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."
|
||||
|
||||
sleep(50)
|
||||
|
||||
plmaster = new /obj/effect/overlay( )
|
||||
@@ -257,3 +267,79 @@ Starting up. [time2text(world.timeofday, "hh:mm.ss")]
|
||||
/* does this help? I do not know */
|
||||
if (src.status != s)
|
||||
src.status = s
|
||||
|
||||
#define FAILED_DB_CONNECTION_CUTOFF 5
|
||||
var/failed_db_connections = 0
|
||||
var/failed_old_db_connections = 0
|
||||
|
||||
proc/setup_database_connection()
|
||||
|
||||
if(failed_db_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to conenct anymore.
|
||||
return 0
|
||||
|
||||
if(!dbcon)
|
||||
dbcon = new()
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
. = dbcon.IsConnected()
|
||||
if ( . )
|
||||
failed_db_connections = 0 //If this connection succeeded, reset the failed connections counter.
|
||||
else
|
||||
failed_db_connections++ //If it failed, increase the failed connections counter.
|
||||
|
||||
return .
|
||||
|
||||
//This proc ensures that the connection to the feedback database (global variable dbcon) is established
|
||||
proc/establish_db_connection()
|
||||
if(failed_db_connections > FAILED_DB_CONNECTION_CUTOFF)
|
||||
return 0
|
||||
|
||||
if(!dbcon || !dbcon.IsConnected())
|
||||
return setup_database_connection()
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
|
||||
//These two procs are for the old database, while it's being phased out. See the tgstation.sql file in the SQL folder for more information.
|
||||
proc/setup_old_database_connection()
|
||||
|
||||
if(failed_old_db_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to conenct anymore.
|
||||
return 0
|
||||
|
||||
if(!dbcon_old)
|
||||
dbcon_old = new()
|
||||
|
||||
var/user = sqllogin
|
||||
var/pass = sqlpass
|
||||
var/db = sqldb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
dbcon_old.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
. = dbcon_old.IsConnected()
|
||||
if ( . )
|
||||
failed_old_db_connections = 0 //If this connection succeeded, reset the failed connections counter.
|
||||
else
|
||||
failed_old_db_connections++ //If it failed, increase the failed connections counter.
|
||||
|
||||
return .
|
||||
|
||||
//This proc ensures that the connection to the feedback database (global variable dbcon) is established
|
||||
proc/establish_old_db_connection()
|
||||
if(failed_old_db_connections > FAILED_DB_CONNECTION_CUTOFF)
|
||||
return 0
|
||||
|
||||
if(!dbcon_old || !dbcon_old.IsConnected())
|
||||
return setup_old_database_connection()
|
||||
else
|
||||
return 1
|
||||
|
||||
#undef FAILED_DB_CONNECTION_CUTOFF
|
||||
286
tgstation.dme
286
tgstation.dme
@@ -6,266 +6,6 @@
|
||||
|
||||
// BEGIN_FILE_DIR
|
||||
#define FILE_DIR .
|
||||
#define FILE_DIR ".svn"
|
||||
#define FILE_DIR ".svn/pristine"
|
||||
#define FILE_DIR ".svn/pristine/00"
|
||||
#define FILE_DIR ".svn/pristine/01"
|
||||
#define FILE_DIR ".svn/pristine/02"
|
||||
#define FILE_DIR ".svn/pristine/03"
|
||||
#define FILE_DIR ".svn/pristine/04"
|
||||
#define FILE_DIR ".svn/pristine/05"
|
||||
#define FILE_DIR ".svn/pristine/06"
|
||||
#define FILE_DIR ".svn/pristine/07"
|
||||
#define FILE_DIR ".svn/pristine/08"
|
||||
#define FILE_DIR ".svn/pristine/09"
|
||||
#define FILE_DIR ".svn/pristine/0a"
|
||||
#define FILE_DIR ".svn/pristine/0b"
|
||||
#define FILE_DIR ".svn/pristine/0c"
|
||||
#define FILE_DIR ".svn/pristine/0d"
|
||||
#define FILE_DIR ".svn/pristine/0e"
|
||||
#define FILE_DIR ".svn/pristine/0f"
|
||||
#define FILE_DIR ".svn/pristine/10"
|
||||
#define FILE_DIR ".svn/pristine/11"
|
||||
#define FILE_DIR ".svn/pristine/12"
|
||||
#define FILE_DIR ".svn/pristine/13"
|
||||
#define FILE_DIR ".svn/pristine/14"
|
||||
#define FILE_DIR ".svn/pristine/15"
|
||||
#define FILE_DIR ".svn/pristine/16"
|
||||
#define FILE_DIR ".svn/pristine/17"
|
||||
#define FILE_DIR ".svn/pristine/18"
|
||||
#define FILE_DIR ".svn/pristine/19"
|
||||
#define FILE_DIR ".svn/pristine/1a"
|
||||
#define FILE_DIR ".svn/pristine/1b"
|
||||
#define FILE_DIR ".svn/pristine/1c"
|
||||
#define FILE_DIR ".svn/pristine/1d"
|
||||
#define FILE_DIR ".svn/pristine/1e"
|
||||
#define FILE_DIR ".svn/pristine/1f"
|
||||
#define FILE_DIR ".svn/pristine/20"
|
||||
#define FILE_DIR ".svn/pristine/21"
|
||||
#define FILE_DIR ".svn/pristine/22"
|
||||
#define FILE_DIR ".svn/pristine/23"
|
||||
#define FILE_DIR ".svn/pristine/24"
|
||||
#define FILE_DIR ".svn/pristine/25"
|
||||
#define FILE_DIR ".svn/pristine/26"
|
||||
#define FILE_DIR ".svn/pristine/27"
|
||||
#define FILE_DIR ".svn/pristine/28"
|
||||
#define FILE_DIR ".svn/pristine/29"
|
||||
#define FILE_DIR ".svn/pristine/2a"
|
||||
#define FILE_DIR ".svn/pristine/2b"
|
||||
#define FILE_DIR ".svn/pristine/2c"
|
||||
#define FILE_DIR ".svn/pristine/2d"
|
||||
#define FILE_DIR ".svn/pristine/2e"
|
||||
#define FILE_DIR ".svn/pristine/2f"
|
||||
#define FILE_DIR ".svn/pristine/30"
|
||||
#define FILE_DIR ".svn/pristine/31"
|
||||
#define FILE_DIR ".svn/pristine/32"
|
||||
#define FILE_DIR ".svn/pristine/33"
|
||||
#define FILE_DIR ".svn/pristine/34"
|
||||
#define FILE_DIR ".svn/pristine/35"
|
||||
#define FILE_DIR ".svn/pristine/36"
|
||||
#define FILE_DIR ".svn/pristine/37"
|
||||
#define FILE_DIR ".svn/pristine/38"
|
||||
#define FILE_DIR ".svn/pristine/39"
|
||||
#define FILE_DIR ".svn/pristine/3a"
|
||||
#define FILE_DIR ".svn/pristine/3b"
|
||||
#define FILE_DIR ".svn/pristine/3c"
|
||||
#define FILE_DIR ".svn/pristine/3d"
|
||||
#define FILE_DIR ".svn/pristine/3e"
|
||||
#define FILE_DIR ".svn/pristine/3f"
|
||||
#define FILE_DIR ".svn/pristine/40"
|
||||
#define FILE_DIR ".svn/pristine/41"
|
||||
#define FILE_DIR ".svn/pristine/42"
|
||||
#define FILE_DIR ".svn/pristine/43"
|
||||
#define FILE_DIR ".svn/pristine/44"
|
||||
#define FILE_DIR ".svn/pristine/45"
|
||||
#define FILE_DIR ".svn/pristine/46"
|
||||
#define FILE_DIR ".svn/pristine/47"
|
||||
#define FILE_DIR ".svn/pristine/48"
|
||||
#define FILE_DIR ".svn/pristine/49"
|
||||
#define FILE_DIR ".svn/pristine/4a"
|
||||
#define FILE_DIR ".svn/pristine/4b"
|
||||
#define FILE_DIR ".svn/pristine/4c"
|
||||
#define FILE_DIR ".svn/pristine/4d"
|
||||
#define FILE_DIR ".svn/pristine/4e"
|
||||
#define FILE_DIR ".svn/pristine/4f"
|
||||
#define FILE_DIR ".svn/pristine/50"
|
||||
#define FILE_DIR ".svn/pristine/51"
|
||||
#define FILE_DIR ".svn/pristine/52"
|
||||
#define FILE_DIR ".svn/pristine/53"
|
||||
#define FILE_DIR ".svn/pristine/54"
|
||||
#define FILE_DIR ".svn/pristine/55"
|
||||
#define FILE_DIR ".svn/pristine/56"
|
||||
#define FILE_DIR ".svn/pristine/57"
|
||||
#define FILE_DIR ".svn/pristine/58"
|
||||
#define FILE_DIR ".svn/pristine/59"
|
||||
#define FILE_DIR ".svn/pristine/5a"
|
||||
#define FILE_DIR ".svn/pristine/5b"
|
||||
#define FILE_DIR ".svn/pristine/5c"
|
||||
#define FILE_DIR ".svn/pristine/5d"
|
||||
#define FILE_DIR ".svn/pristine/5e"
|
||||
#define FILE_DIR ".svn/pristine/5f"
|
||||
#define FILE_DIR ".svn/pristine/60"
|
||||
#define FILE_DIR ".svn/pristine/61"
|
||||
#define FILE_DIR ".svn/pristine/62"
|
||||
#define FILE_DIR ".svn/pristine/63"
|
||||
#define FILE_DIR ".svn/pristine/64"
|
||||
#define FILE_DIR ".svn/pristine/65"
|
||||
#define FILE_DIR ".svn/pristine/66"
|
||||
#define FILE_DIR ".svn/pristine/67"
|
||||
#define FILE_DIR ".svn/pristine/68"
|
||||
#define FILE_DIR ".svn/pristine/69"
|
||||
#define FILE_DIR ".svn/pristine/6a"
|
||||
#define FILE_DIR ".svn/pristine/6b"
|
||||
#define FILE_DIR ".svn/pristine/6c"
|
||||
#define FILE_DIR ".svn/pristine/6d"
|
||||
#define FILE_DIR ".svn/pristine/6e"
|
||||
#define FILE_DIR ".svn/pristine/6f"
|
||||
#define FILE_DIR ".svn/pristine/70"
|
||||
#define FILE_DIR ".svn/pristine/71"
|
||||
#define FILE_DIR ".svn/pristine/72"
|
||||
#define FILE_DIR ".svn/pristine/73"
|
||||
#define FILE_DIR ".svn/pristine/74"
|
||||
#define FILE_DIR ".svn/pristine/75"
|
||||
#define FILE_DIR ".svn/pristine/76"
|
||||
#define FILE_DIR ".svn/pristine/77"
|
||||
#define FILE_DIR ".svn/pristine/78"
|
||||
#define FILE_DIR ".svn/pristine/79"
|
||||
#define FILE_DIR ".svn/pristine/7a"
|
||||
#define FILE_DIR ".svn/pristine/7b"
|
||||
#define FILE_DIR ".svn/pristine/7c"
|
||||
#define FILE_DIR ".svn/pristine/7d"
|
||||
#define FILE_DIR ".svn/pristine/7e"
|
||||
#define FILE_DIR ".svn/pristine/7f"
|
||||
#define FILE_DIR ".svn/pristine/80"
|
||||
#define FILE_DIR ".svn/pristine/81"
|
||||
#define FILE_DIR ".svn/pristine/82"
|
||||
#define FILE_DIR ".svn/pristine/83"
|
||||
#define FILE_DIR ".svn/pristine/84"
|
||||
#define FILE_DIR ".svn/pristine/85"
|
||||
#define FILE_DIR ".svn/pristine/86"
|
||||
#define FILE_DIR ".svn/pristine/87"
|
||||
#define FILE_DIR ".svn/pristine/88"
|
||||
#define FILE_DIR ".svn/pristine/89"
|
||||
#define FILE_DIR ".svn/pristine/8a"
|
||||
#define FILE_DIR ".svn/pristine/8b"
|
||||
#define FILE_DIR ".svn/pristine/8c"
|
||||
#define FILE_DIR ".svn/pristine/8d"
|
||||
#define FILE_DIR ".svn/pristine/8e"
|
||||
#define FILE_DIR ".svn/pristine/8f"
|
||||
#define FILE_DIR ".svn/pristine/90"
|
||||
#define FILE_DIR ".svn/pristine/91"
|
||||
#define FILE_DIR ".svn/pristine/92"
|
||||
#define FILE_DIR ".svn/pristine/93"
|
||||
#define FILE_DIR ".svn/pristine/94"
|
||||
#define FILE_DIR ".svn/pristine/95"
|
||||
#define FILE_DIR ".svn/pristine/96"
|
||||
#define FILE_DIR ".svn/pristine/97"
|
||||
#define FILE_DIR ".svn/pristine/98"
|
||||
#define FILE_DIR ".svn/pristine/99"
|
||||
#define FILE_DIR ".svn/pristine/9a"
|
||||
#define FILE_DIR ".svn/pristine/9b"
|
||||
#define FILE_DIR ".svn/pristine/9c"
|
||||
#define FILE_DIR ".svn/pristine/9d"
|
||||
#define FILE_DIR ".svn/pristine/9e"
|
||||
#define FILE_DIR ".svn/pristine/9f"
|
||||
#define FILE_DIR ".svn/pristine/a0"
|
||||
#define FILE_DIR ".svn/pristine/a1"
|
||||
#define FILE_DIR ".svn/pristine/a2"
|
||||
#define FILE_DIR ".svn/pristine/a3"
|
||||
#define FILE_DIR ".svn/pristine/a4"
|
||||
#define FILE_DIR ".svn/pristine/a5"
|
||||
#define FILE_DIR ".svn/pristine/a6"
|
||||
#define FILE_DIR ".svn/pristine/a7"
|
||||
#define FILE_DIR ".svn/pristine/a8"
|
||||
#define FILE_DIR ".svn/pristine/a9"
|
||||
#define FILE_DIR ".svn/pristine/aa"
|
||||
#define FILE_DIR ".svn/pristine/ab"
|
||||
#define FILE_DIR ".svn/pristine/ac"
|
||||
#define FILE_DIR ".svn/pristine/ad"
|
||||
#define FILE_DIR ".svn/pristine/ae"
|
||||
#define FILE_DIR ".svn/pristine/af"
|
||||
#define FILE_DIR ".svn/pristine/b0"
|
||||
#define FILE_DIR ".svn/pristine/b1"
|
||||
#define FILE_DIR ".svn/pristine/b2"
|
||||
#define FILE_DIR ".svn/pristine/b3"
|
||||
#define FILE_DIR ".svn/pristine/b4"
|
||||
#define FILE_DIR ".svn/pristine/b5"
|
||||
#define FILE_DIR ".svn/pristine/b6"
|
||||
#define FILE_DIR ".svn/pristine/b7"
|
||||
#define FILE_DIR ".svn/pristine/b8"
|
||||
#define FILE_DIR ".svn/pristine/b9"
|
||||
#define FILE_DIR ".svn/pristine/ba"
|
||||
#define FILE_DIR ".svn/pristine/bb"
|
||||
#define FILE_DIR ".svn/pristine/bc"
|
||||
#define FILE_DIR ".svn/pristine/bd"
|
||||
#define FILE_DIR ".svn/pristine/be"
|
||||
#define FILE_DIR ".svn/pristine/bf"
|
||||
#define FILE_DIR ".svn/pristine/c0"
|
||||
#define FILE_DIR ".svn/pristine/c1"
|
||||
#define FILE_DIR ".svn/pristine/c2"
|
||||
#define FILE_DIR ".svn/pristine/c3"
|
||||
#define FILE_DIR ".svn/pristine/c4"
|
||||
#define FILE_DIR ".svn/pristine/c5"
|
||||
#define FILE_DIR ".svn/pristine/c6"
|
||||
#define FILE_DIR ".svn/pristine/c7"
|
||||
#define FILE_DIR ".svn/pristine/c8"
|
||||
#define FILE_DIR ".svn/pristine/c9"
|
||||
#define FILE_DIR ".svn/pristine/ca"
|
||||
#define FILE_DIR ".svn/pristine/cb"
|
||||
#define FILE_DIR ".svn/pristine/cc"
|
||||
#define FILE_DIR ".svn/pristine/cd"
|
||||
#define FILE_DIR ".svn/pristine/ce"
|
||||
#define FILE_DIR ".svn/pristine/cf"
|
||||
#define FILE_DIR ".svn/pristine/d0"
|
||||
#define FILE_DIR ".svn/pristine/d1"
|
||||
#define FILE_DIR ".svn/pristine/d2"
|
||||
#define FILE_DIR ".svn/pristine/d3"
|
||||
#define FILE_DIR ".svn/pristine/d4"
|
||||
#define FILE_DIR ".svn/pristine/d5"
|
||||
#define FILE_DIR ".svn/pristine/d6"
|
||||
#define FILE_DIR ".svn/pristine/d7"
|
||||
#define FILE_DIR ".svn/pristine/d8"
|
||||
#define FILE_DIR ".svn/pristine/d9"
|
||||
#define FILE_DIR ".svn/pristine/da"
|
||||
#define FILE_DIR ".svn/pristine/db"
|
||||
#define FILE_DIR ".svn/pristine/dc"
|
||||
#define FILE_DIR ".svn/pristine/dd"
|
||||
#define FILE_DIR ".svn/pristine/de"
|
||||
#define FILE_DIR ".svn/pristine/df"
|
||||
#define FILE_DIR ".svn/pristine/e0"
|
||||
#define FILE_DIR ".svn/pristine/e1"
|
||||
#define FILE_DIR ".svn/pristine/e2"
|
||||
#define FILE_DIR ".svn/pristine/e3"
|
||||
#define FILE_DIR ".svn/pristine/e4"
|
||||
#define FILE_DIR ".svn/pristine/e5"
|
||||
#define FILE_DIR ".svn/pristine/e6"
|
||||
#define FILE_DIR ".svn/pristine/e7"
|
||||
#define FILE_DIR ".svn/pristine/e8"
|
||||
#define FILE_DIR ".svn/pristine/e9"
|
||||
#define FILE_DIR ".svn/pristine/ea"
|
||||
#define FILE_DIR ".svn/pristine/eb"
|
||||
#define FILE_DIR ".svn/pristine/ec"
|
||||
#define FILE_DIR ".svn/pristine/ed"
|
||||
#define FILE_DIR ".svn/pristine/ee"
|
||||
#define FILE_DIR ".svn/pristine/ef"
|
||||
#define FILE_DIR ".svn/pristine/f0"
|
||||
#define FILE_DIR ".svn/pristine/f1"
|
||||
#define FILE_DIR ".svn/pristine/f2"
|
||||
#define FILE_DIR ".svn/pristine/f3"
|
||||
#define FILE_DIR ".svn/pristine/f4"
|
||||
#define FILE_DIR ".svn/pristine/f5"
|
||||
#define FILE_DIR ".svn/pristine/f6"
|
||||
#define FILE_DIR ".svn/pristine/f7"
|
||||
#define FILE_DIR ".svn/pristine/f8"
|
||||
#define FILE_DIR ".svn/pristine/f9"
|
||||
#define FILE_DIR ".svn/pristine/fa"
|
||||
#define FILE_DIR ".svn/pristine/fb"
|
||||
#define FILE_DIR ".svn/pristine/fc"
|
||||
#define FILE_DIR ".svn/pristine/fd"
|
||||
#define FILE_DIR ".svn/pristine/fe"
|
||||
#define FILE_DIR ".svn/pristine/ff"
|
||||
#define FILE_DIR "bot"
|
||||
#define FILE_DIR "bot/Marakov"
|
||||
#define FILE_DIR "code"
|
||||
#define FILE_DIR "code/__HELPERS"
|
||||
#define FILE_DIR "code/ATMOSPHERICS"
|
||||
@@ -450,16 +190,6 @@
|
||||
#define FILE_DIR "code/WorkInProgress/mapload"
|
||||
#define FILE_DIR "code/WorkInProgress/organs"
|
||||
#define FILE_DIR "code/WorkInProgress/virus2"
|
||||
#define FILE_DIR "config"
|
||||
#define FILE_DIR "config/names"
|
||||
#define FILE_DIR "data"
|
||||
#define FILE_DIR "data/logs"
|
||||
#define FILE_DIR "data/logs/2012"
|
||||
#define FILE_DIR "data/logs/2012/10-October"
|
||||
#define FILE_DIR "data/logs/2012/11-November"
|
||||
#define FILE_DIR "data/player_saves"
|
||||
#define FILE_DIR "data/player_saves/g"
|
||||
#define FILE_DIR "data/player_saves/g/giacomand"
|
||||
#define FILE_DIR "html"
|
||||
#define FILE_DIR "icons"
|
||||
#define FILE_DIR "icons/effects"
|
||||
@@ -474,7 +204,6 @@
|
||||
#define FILE_DIR "icons/obj/machines"
|
||||
#define FILE_DIR "icons/obj/pipes"
|
||||
#define FILE_DIR "icons/pda_icons"
|
||||
#define FILE_DIR "icons/PSD files"
|
||||
#define FILE_DIR "icons/spideros_icons"
|
||||
#define FILE_DIR "icons/Testing"
|
||||
#define FILE_DIR "icons/turf"
|
||||
@@ -482,8 +211,8 @@
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/backup"
|
||||
#define FILE_DIR "maps/RandomZLevels"
|
||||
#define FILE_DIR "music"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
@@ -497,18 +226,8 @@
|
||||
#define FILE_DIR "sound/violin"
|
||||
#define FILE_DIR "sound/voice"
|
||||
#define FILE_DIR "sound/weapons"
|
||||
#define FILE_DIR "SQL"
|
||||
#define FILE_DIR "tools"
|
||||
#define FILE_DIR "tools/Redirector"
|
||||
#define FILE_DIR "tools/Runtime Condenser"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/bin"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/bin/Debug"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj/x86"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj/x86/Debug"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties"
|
||||
// END_FILE_DIR
|
||||
|
||||
// BEGIN_PREFERENCES
|
||||
@@ -605,12 +324,10 @@
|
||||
#include "code\datums\diseases\advance\symptoms\cough.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\damage_converter.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\dizzy.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\hallucigen.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\headache.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\sneeze.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\symptoms.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\vomit.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\weight.dm"
|
||||
#include "code\datums\helper_datums\construction_datum.dm"
|
||||
#include "code\datums\helper_datums\events.dm"
|
||||
#include "code\datums\helper_datums\getrev.dm"
|
||||
@@ -644,7 +361,6 @@
|
||||
#include "code\defines\procs\captain_announce.dm"
|
||||
#include "code\defines\procs\command_alert.dm"
|
||||
#include "code\defines\procs\dbcore.dm"
|
||||
#include "code\defines\procs\forum_activation.dm"
|
||||
#include "code\defines\procs\statistics.dm"
|
||||
#include "code\FEA\FEA_airgroup.dm"
|
||||
#include "code\FEA\FEA_fire.dm"
|
||||
|
||||
Reference in New Issue
Block a user