TG sync Sunday (#201)

* stage one

* datums and shit

* game stuff

* modules

* tgstation.dme

* tools

* these things for icons

* compiling fixes

* merge spree on TG

* other updates

* updated maps with deepfryers

* My helpers were not helping
This commit is contained in:
Poojawa
2017-02-06 00:36:56 -06:00
committed by GitHub
parent aeeca195c7
commit 73b6b33f79
279 changed files with 3548 additions and 2585 deletions

View File

@@ -69,18 +69,6 @@
src << "<span class='danger'>Your previous action was ignored because you've done too many in a second</span>"
return
//Logs all hrefs
if(config && config.log_hrefs && href_logfile)
href_logfile << "<small>[time2text(world.timeofday,"hh:mm")] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
// Admin PM
if(href_list["priv_msg"])
if (href_list["ahelp_reply"])
cmd_ahelp_reply(href_list["priv_msg"])
return
cmd_admin_pm(href_list["priv_msg"],null)
return
if(href_list["mentor_msg"])
if(config.mentors_mobname_only)
var/mob/M = locate(href_list["mentor_msg"])
@@ -93,6 +81,14 @@
if(config && config.log_hrefs && href_logfile)
href_logfile << "<small>[time2text(world.timeofday,"hh:mm")] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
// Admin PM
if(href_list["priv_msg"])
if (href_list["ahelp_reply"])
cmd_ahelp_reply(href_list["priv_msg"])
return
cmd_admin_pm(href_list["priv_msg"],null)
return
switch(href_list["_src_"])
if("holder")
hsrc = holder
@@ -257,7 +253,7 @@ var/next_external_rsc = 0
if(holder)
add_admin_verbs()
admin_memo_output("Show")
src << get_message_output("memo")
adminGreet()
if((global.comms_key == "default_pwd" || length(global.comms_key) <= 6) && global.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms.
src << "<span class='danger'>The server's API key is either too short or is the default value! Consider changing it immediately!</span>"
@@ -294,7 +290,7 @@ var/next_external_rsc = 0
findJoinDate()
sync_client_with_db(tdata)
get_message_output("watchlist entry", ckey)
check_ip_intel()
send_resources()
@@ -318,7 +314,7 @@ var/next_external_rsc = 0
if(config && config.autoconvert_notes)
convert_notes_sql(ckey)
src << get_message_output("message", ckey)
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
src << "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>"
@@ -399,12 +395,6 @@ var/next_external_rsc = 0
if (check_randomizer(connectiontopic))
return
var/watchreason = check_watchlist(sql_ckey)
if(watchreason)
current_watchlist[sql_ckey] = watchreason
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(src)] is on the watchlist and has just connected - Reason: [watchreason]</font>")
// send2irc_adminless_only("Watchlist", "[key_name(src)] is on the watchlist and has just connected - Reason: [watchreason]")
var/sql_ip = sanitizeSQL(src.address)
var/sql_computerid = sanitizeSQL(src.computer_id)
var/sql_admin_rank = sanitizeSQL(admin_rank)
@@ -499,24 +489,24 @@ var/next_external_rsc = 0
var/const/adminckey = "CID-Error"
var/sql_ckey = sanitizeSQL(ckey)
//check to see if we noted them in the last day.
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT id FROM [format_table_name("notes")] WHERE ckey = '[sql_ckey]' AND adminckey = '[adminckey]' AND timestamp + INTERVAL 1 DAY < NOW()")
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT id FROM [format_table_name("messages")] WHERE type = 'note' AND targetckey = '[sql_ckey]' AND adminckey = '[adminckey]' AND timestamp + INTERVAL 1 DAY < NOW()")
if(!query_get_notes.Execute())
var/err = query_get_notes.ErrorMsg()
log_game("SQL ERROR obtaining id from notes table. Error : \[[err]\]\n")
log_game("SQL ERROR obtaining id from messages table. Error : \[[err]\]\n")
return
if (query_get_notes.NextRow())
return
//regardless of above, make sure their last note is not from us, as no point in repeating the same note over and over.
query_get_notes = dbcon.NewQuery("SELECT adminckey FROM [format_table_name("notes")] WHERE ckey = '[sql_ckey]' ORDER BY timestamp DESC LIMIT 1")
query_get_notes = dbcon.NewQuery("SELECT adminckey FROM [format_table_name("messages")] WHERE targetckey = '[sql_ckey]' ORDER BY timestamp DESC LIMIT 1")
if(!query_get_notes.Execute())
var/err = query_get_notes.ErrorMsg()
log_game("SQL ERROR obtaining id from notes table. Error : \[[err]\]\n")
log_game("SQL ERROR obtaining adminckey from notes table. Error : \[[err]\]\n")
return
if (query_get_notes.NextRow())
if (query_get_notes.item[1] == adminckey)
return
add_note(ckey, "Detected as using a cid randomizer.", null, adminckey, 0, null, 0)
create_message("note", sql_ckey, adminckey, "Detected as using a cid randomizer.", null, null, 0, 0)
/client/proc/check_ip_intel()
@@ -584,3 +574,9 @@ var/next_external_rsc = 0
return FALSE
if ("key")
return FALSE
/client/proc/change_view(new_size)
if (isnull(new_size))
CRASH("change_view called without argument.")
view = new_size