diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index 385cbcb8d446..eb1b0540fb54 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -491,8 +491,6 @@ This maintains a list of ip addresses that are able to bypass topic filtering. /datum/config_entry/flag/respawn -/datum/config_entry/flag/ToRban - /datum/config_entry/flag/ooc_country_flags /datum/config_entry/flag/record_rounds diff --git a/code/game/world.dm b/code/game/world.dm index f68263412715..627e245bc4c1 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -87,10 +87,6 @@ GLOBAL_LIST_INIT(reboot_sfx, file2list("config/reboot_sfx.txt")) GLOB.obfs_x = rand(-500, 500) //A number between -100 and 100 GLOB.obfs_y = rand(-500, 500) //A number between -100 and 100 - spawn(3000) //so we aren't adding to the round-start lag - if(CONFIG_GET(flag/ToRban)) - ToRban_autoupdate() - // If the server's configured for local testing, get everything set up ASAP. // Shamelessly stolen from the test manager's host_tests() proc if(testing_locally) diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 94f40629fc6a..4a7307b247a5 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -17,6 +17,7 @@ message_admins("Failed Login: [key] - Guests not allowed") return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.") + // wait for database to be ready WAIT_DB_READY if(GLOB.admin_datums[ckey] && (GLOB.admin_datums[ckey].rights & R_MOD)) return ..() @@ -26,13 +27,6 @@ var/datum/entity/player/P = get_player_from_key(ckey) - //check if the IP address is a known TOR node - if(CONFIG_GET(flag/ToRban) && ToRban_isbanned(address)) - log_access("Failed Login: [src] - Banned: ToR") - message_admins("Failed Login: [src] - Banned: ToR") - return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [CONFIG_GET(string/banappeals)]") - - // wait for database to be ready . = P.check_ban(computer_id, address) if(.) diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm deleted file mode 100644 index 549353facfb8..000000000000 --- a/code/modules/admin/ToRban.dm +++ /dev/null @@ -1,88 +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(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_misc("Downloading updated ToR data...") - var/http[] = world.Export("https://check.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 - F["last_update"] << world.realtime - log_misc("ToR data updated!") - if(usr) to_chat(usr, "ToRban updated.") - return - log_misc("ToR data update aborted: no data.") - return - -/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find")) - set name = "ToR Ban Settings" - set category = "Server" - if(!admin_holder) return - switch(task) - if("update") - ToRban_update() - if("toggle") - if(config) - if(CONFIG_GET(flag/ToRban)) - CONFIG_SET(flag/ToRban, FALSE) - message_admins("ToR banning disabled.") - else - CONFIG_SET(flag/ToRban, TRUE) - 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 += "