Merge pull request #17069 from MrStonedOne/XKeyscore

Automatic Proxy Detection
This commit is contained in:
oranges
2016-06-19 01:17:59 +12:00
committed by GitHub
11 changed files with 231 additions and 3 deletions
+1
View File
@@ -45,6 +45,7 @@
// Used by html_interface module.
var/hi_last_pos
var/ip_intel = "Disabled"
//datum that controls the displaying and hiding of tooltips
var/datum/tooltip/tooltips
+11
View File
@@ -210,6 +210,8 @@ var/next_external_rsc = 0
sync_client_with_db()
check_ip_intel()
send_resources()
if(!void)
@@ -322,6 +324,15 @@ var/next_external_rsc = 0
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');")
query_accesslog.Execute()
/client/proc/check_ip_intel()
set waitfor = 0 //we sleep when getting the intel, no need to hold up the client connection while we sleep
if (config.ipintel_email)
var/datum/ipintel/res = get_ip_intel(address)
if (res.intel >= config.ipintel_rating_bad)
message_admins("<span class='adminnotice'>Proxy Detection: [key_name_admin(src)] IP intel rated [res.intel*100]% likely to be a Proxy/VPN.</span>")
ip_intel = res.intel
/client/proc/add_verbs_from_config()
if(config.see_own_notes)
verbs += /client/proc/self_notes