diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index f4f2f72b16b..756ce6f8527 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -61,7 +61,6 @@ var/usewhitelist = 0 var/mods_are_mentors = 0 var/load_jobs_from_txt = 0 - var/ToRban = 0 var/automute_on = 0 //enables automuting/spam prevention var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access. var/round_abandon_penalty_period = 30 MINUTES // Time from round start during which ghosting out is penalized @@ -578,9 +577,6 @@ if("humans_need_surnames") humans_need_surnames = 1 - if("tor_ban") - ToRban = 1 - if("automute_on") automute_on = 1 diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index c7f2baac4ef..d9ceba62830 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -36,17 +36,6 @@ world/IsBanned(key, address, computer_id, type, check_ipintel = TRUE) // message_admins("Failed Login: [key] - Guests not allowed") return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a BYOND account.") - //check if the IP address is a known Tor node - if(config.ToRban && ToRban_isbanned(address)) - log_adminwarn("Failed Login: [key] [computer_id] [address] - Banned: Tor") - message_admins("Failed Login: [key] - Banned: Tor") - //ban their computer_id and ckey for posterity - AddBan(ckey(key), computer_id, "Use of Tor", "Automated Ban", 0, 0) - var/mistakemessage = "" - if(config.banappeals) - mistakemessage = "\nIf you believe this is a mistake, please request help at [config.banappeals]." - return list("reason"="using Tor", "desc"="\nReason: The network you are using to connect has been banned.[mistakemessage]") - //check if the IP address is a known proxy/vpn, and the user is not whitelisted if(check_ipintel && config.ipintel_email && config.ipintel_whitelist && ipintel_is_banned(key, address)) log_adminwarn("Failed Login: [key] [computer_id] [address] - Proxy/VPN") diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm deleted file mode 100644 index b486f168503..00000000000 --- a/code/modules/admin/ToRban.dm +++ /dev/null @@ -1,89 +0,0 @@ -//By Carnwennan -//fetches an external list and processes it into a list of ip addresses. -//It then stores the processed list into a savefile for later use -#define TORFILE "data/ToR_ban.bdb" -#define TOR_UPDATE_INTERVAL 216000 //~6 hours - -/proc/ToRban_isbanned(var/ip_address) - var/savefile/F = new(TORFILE) - if(F) - if( ip_address in F.dir ) - return 1 - return 0 - -/proc/ToRban_autoupdate() - var/savefile/F = new(TORFILE) - if(F) - var/last_update - F["last_update"] >> last_update - if((last_update + TOR_UPDATE_INTERVAL) < world.realtime) //we haven't updated for a while - ToRban_update() - return - -/proc/ToRban_update() - spawn(0) - log_world("Downloading updated ToR data...") - var/http[] = world.Export("http://exitlist.torproject.org/exit-addresses") - - var/list/rawlist = file2list(http["CONTENT"]) - if(rawlist.len) - fdel(TORFILE) - var/savefile/F = new(TORFILE) - for( var/line in rawlist ) - if(!line) continue - if( copytext(line,1,12) == "ExitAddress" ) - var/cleaned = copytext(line,13,length(line)-19) - if(!cleaned) continue - F[cleaned] << 1 - to_chat(F["last_update"], world.realtime) - log_world("ToR data updated!") - if(usr) - to_chat(usr, "ToRban updated.") - return 1 - log_world("ToR data update aborted: no data.") - return 0 - -/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find")) - set name = "ToRban" - set category = "Server" - if(!holder) return - switch(task) - if("update") - ToRban_update() - if("toggle") - if(config) - if(config.ToRban) - config.ToRban = 0 - message_admins("ToR banning disabled.") - else - config.ToRban = 1 - message_admins("ToR banning enabled.") - if("show") - var/savefile/F = new(TORFILE) - var/dat - if( length(F.dir) ) - for( var/i=1, i<=length(F.dir), i++ ) - dat += "#[i] [F.dir[i]]" - dat = "[dat]
" - else - dat = "No addresses in list." - src << browse(dat,"window=ToRban_show") - if("remove") - var/savefile/F = new(TORFILE) - var/choice = input(src,"Please select an IP address to remove from the ToR banlist:","Remove ToR ban",null) as null|anything in F.dir - if(choice) - F.dir.Remove(choice) - to_chat(src, "Address removed") - if("remove all") - to_chat(src, "[TORFILE] was [fdel(TORFILE)?"":"not "]removed.") - if("find") - var/input = input(src,"Please input an IP address to search for:","Find ToR ban",null) as null|text - if(input) - if(ToRban_isbanned(input)) - to_chat(src, "Address is a known ToR address") - else - to_chat(src, "Address is not a known ToR address") - return - -#undef TORFILE -#undef TOR_UPDATE_INTERVAL diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index f892d015da2..f310a4502fa 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -125,7 +125,6 @@ GLOBAL_LIST_INIT(admin_verbs_spawn, list( /client/proc/admin_deserialize )) GLOBAL_LIST_INIT(admin_verbs_server, list( - /client/proc/ToRban, /client/proc/Set_Holiday, /datum/admins/proc/startnow, /datum/admins/proc/restart, diff --git a/config/example/config.txt b/config/example/config.txt index 5934ea733b5..3a56570a03d 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -277,9 +277,6 @@ TICKLAG 0.5 ## Whether the server will talk to other processes through socket_talk SOCKET_TALK 0 -## Uncomment this to ban use of ToR -#TOR_BAN - ## Comment this out to disable automuting #AUTOMUTE_ON diff --git a/paradise.dme b/paradise.dme index 70c17c96107..b59a1d75541 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1197,7 +1197,6 @@ #include "code\modules\admin\sql_notes.dm" #include "code\modules\admin\stickyban.dm" #include "code\modules\admin\topic.dm" -#include "code\modules\admin\ToRban.dm" #include "code\modules\admin\watchlist.dm" #include "code\modules\admin\DB ban\functions.dm" #include "code\modules\admin\permissionverbs\permissionedit.dm"