mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-19 20:22:38 +01:00
Updates Part Eleven
This commit is contained in:
@@ -11,6 +11,7 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
var/list/chat_channels = list()
|
||||
var/list/fileservers = list()
|
||||
var/list/email_accounts = list() // I guess we won't have more than 999 email accounts active at once in single round, so this will do until Servers are implemented someday.
|
||||
var/list/banned_nids = list()
|
||||
// Amount of logs the system tries to keep in memory. Keep below 999 to prevent byond from acting weirdly.
|
||||
// High values make displaying logs much laggier.
|
||||
var/setting_maxlogcount = 100
|
||||
@@ -60,6 +61,16 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
else
|
||||
break
|
||||
|
||||
/datum/ntnet/proc/check_banned(var/NID)
|
||||
if(!relays || !relays.len)
|
||||
return FALSE
|
||||
|
||||
for(var/obj/machinery/ntnet_relay/R in relays)
|
||||
if(R.operable())
|
||||
return (NID in banned_nids)
|
||||
|
||||
return FALSE
|
||||
|
||||
// Checks whether NTNet operates. If parameter is passed checks whether specific function is enabled.
|
||||
/datum/ntnet/proc/check_function(var/specific_action = 0)
|
||||
if(!relays || !relays.len) // No relays found. NTNet is down
|
||||
|
||||
@@ -81,10 +81,16 @@
|
||||
dos_failure = 0
|
||||
update_icon()
|
||||
ntnet_global.add_log("Quantum relay manually restarted from overload recovery mode to normal operation mode.")
|
||||
return 1
|
||||
else if(href_list["toggle"])
|
||||
enabled = !enabled
|
||||
ntnet_global.add_log("Quantum relay manually [enabled ? "enabled" : "disabled"].")
|
||||
update_icon()
|
||||
return 1
|
||||
else if(href_list["purge"])
|
||||
ntnet_global.banned_nids.Cut()
|
||||
ntnet_global.add_log("Manual override: Network blacklist cleared.")
|
||||
return 1
|
||||
|
||||
/obj/machinery/ntnet_relay/New()
|
||||
uid = gl_uid
|
||||
|
||||
Reference in New Issue
Block a user