ip intel mk2 (#82683)

Do not merge this without coordinating with your server's host.

## About The Pull Request

Slightly refactors the way we handle IP intel.
You can still use the old data stored in the database.
Adds the ability to automatically reject connections determined by
config flags.

## Why It's Good For The Game

We used to have IP intel to check for VPNs, although it was disabled due
to being bad and unhelpful.
This refactor should make it much more manageable for hosts and admins.

## HOSTS BEWARE
This adds a new SQL table `ipintel_whitelist`
Look at the schema!

## Changelog

🆑
admin: The return of IPIntel
/🆑

---------

Co-authored-by: MrStonedOne <kyleshome@gmail.com>
Co-authored-by: oranges <email@oranges.net.nz>
This commit is contained in:
Zephyr
2024-04-26 14:52:54 +12:00
committed by GitHub
co-authored by MrStonedOne oranges
parent a300ec3f7b
commit cbcf5a7108
11 changed files with 379 additions and 176 deletions
+1 -10
View File
@@ -541,7 +541,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
initialize_menus()
loot_panel = new(src)
view_size = new(src, getScreenSize(prefs.read_preference(/datum/preference/toggle/widescreen)))
view_size.resetFormat()
view_size.setZoomMode()
@@ -828,15 +828,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
qdel(query_get_notes)
create_message("note", key, system_ckey, message, null, null, 0, 0, null, 0, 0)
/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_GET(string/ipintel_email))
var/datum/ipintel/res = get_ip_intel(address)
if (res.intel >= CONFIG_GET(number/ipintel_rating_bad))
message_admins(span_adminnotice("Proxy Detection: [key_name_admin(src)] IP intel rated [res.intel*100]% likely to be a Proxy/VPN."))
ip_intel = res.intel
/client/Click(atom/object, atom/location, control, params)
if(click_intercept_time)
if(click_intercept_time >= world.time)