mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 23:53:47 +01:00
crazylemon comments
This commit is contained in:
@@ -574,9 +574,10 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
|
||||
usr << browse(output,"window=lookupbans;size=900x700")
|
||||
|
||||
/proc/flag_account_for_forum_sync(var/ckey)
|
||||
/proc/flag_account_for_forum_sync(ckey)
|
||||
if(!dbcon)
|
||||
return
|
||||
var/sql = "UPDATE [format_table_name("player")] SET fupdate = 1 WHERE ckey = '[ckey]'"
|
||||
var/skey = sanitizeSQL(ckey)
|
||||
var/sql = "UPDATE [format_table_name("player")] SET fupdate = 1 WHERE ckey = '[skey]'"
|
||||
var/DBQuery/adm_query = dbcon.NewQuery(sql)
|
||||
adm_query.Execute()
|
||||
|
||||
@@ -15,14 +15,15 @@
|
||||
if(intel < 0)
|
||||
return
|
||||
if(intel <= config.ipintel_rating_bad)
|
||||
if(world.realtime < cacherealtime + (config.ipintel_save_good * 60 * 60 * 10))
|
||||
if(world.realtime < cacherealtime + (config.ipintel_save_good * HOURS))
|
||||
return TRUE
|
||||
else
|
||||
if(world.realtime < cacherealtime + (config.ipintel_save_bad * 60 * 60 * 10))
|
||||
if(world.realtime < cacherealtime + (config.ipintel_save_bad * HOURS))
|
||||
return TRUE
|
||||
|
||||
/proc/get_ip_intel(ip, bypasscache = FALSE, updatecache = TRUE)
|
||||
var/datum/ipintel/res = new()
|
||||
ip = sanitizeSQL(ip)
|
||||
res.ip = ip
|
||||
. = res
|
||||
if(!ip || !config.ipintel_email || !SSipintel.enabled)
|
||||
@@ -123,7 +124,7 @@
|
||||
if(retryed)
|
||||
SSipintel.errors++
|
||||
error += " Could not check [ip]. Disabling IPINTEL for [SSipintel.errors] minute[( SSipintel.errors == 1 ? "" : "s" )]"
|
||||
SSipintel.throttle = world.timeofday + (10 * 120 * SSipintel.errors)
|
||||
SSipintel.throttle = world.timeofday + (2 * SSipintel.errors * MINUTES)
|
||||
else
|
||||
error += " Attempting retry on [ip]."
|
||||
log_ipintel(error)
|
||||
@@ -155,6 +156,9 @@
|
||||
if(!valid_hours)
|
||||
log_debug("ipintel_badip_check reports misconfigured ipintel_save_bad directive")
|
||||
return FALSE
|
||||
ipintel = sanitizeSQL(ipintel)
|
||||
target_ip = sanitizeSQL(target_ip)
|
||||
valid_hours = sanitizeSQL(valid_hours)
|
||||
var/check_sql = {"SELECT * FROM [format_table_name("ipintel")] WHERE ip = INET_ATON('[target_ip]') AND intel >= [rating_bad] AND (date + INTERVAL [valid_hours] HOUR) > NOW()"}
|
||||
var/DBQuery/query_get_ip_intel = dbcon.NewQuery(check_sql)
|
||||
if(!query_get_ip_intel.Execute())
|
||||
@@ -202,7 +206,7 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/proc/vpn_whitelist_panel(var/target_ckey as text)
|
||||
/proc/vpn_whitelist_panel(target_ckey as text)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(!target_ckey)
|
||||
|
||||
Reference in New Issue
Block a user