mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Makes all global variables handled by the GLOB controller (#13152)
* Handlers converted, now to fix 3532 compile errors * 3532 compile fixes later, got runtimes on startup * Well the server loads now atleast * Take 2 * Oops
This commit is contained in:
@@ -24,22 +24,22 @@
|
||||
switch(href_list["action"])
|
||||
if("resetIDS")
|
||||
. = 1
|
||||
if(ntnet_global)
|
||||
ntnet_global.resetIDS()
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.resetIDS()
|
||||
return 1
|
||||
if("toggleIDS")
|
||||
. = 1
|
||||
if(ntnet_global)
|
||||
ntnet_global.toggleIDS()
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.toggleIDS()
|
||||
return 1
|
||||
if("toggleWireless")
|
||||
. = 1
|
||||
if(!ntnet_global)
|
||||
if(!GLOB.ntnet_global)
|
||||
return 1
|
||||
|
||||
// NTNet is disabled. Enabling can be done without user prompt
|
||||
if(ntnet_global.setting_disabled)
|
||||
ntnet_global.setting_disabled = 0
|
||||
if(GLOB.ntnet_global.setting_disabled)
|
||||
GLOB.ntnet_global.setting_disabled = 0
|
||||
return 1
|
||||
|
||||
// NTNet is enabled and user is about to shut it down. Let's ask them if they really want to do it, as wirelessly connected computers won't connect without NTNet being enabled (which may prevent people from turning it back on)
|
||||
@@ -48,43 +48,43 @@
|
||||
return 1
|
||||
var/response = alert(user, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
ntnet_global.setting_disabled = 1
|
||||
GLOB.ntnet_global.setting_disabled = 1
|
||||
return 1
|
||||
if("purgelogs")
|
||||
. = 1
|
||||
if(ntnet_global)
|
||||
ntnet_global.purge_logs()
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.purge_logs()
|
||||
if("updatemaxlogs")
|
||||
. = 1
|
||||
var/mob/user = usr
|
||||
var/logcount = text2num(input(user,"Enter amount of logs to keep in memory ([MIN_NTNET_LOGS]-[MAX_NTNET_LOGS]):"))
|
||||
if(ntnet_global)
|
||||
ntnet_global.update_max_log_count(logcount)
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.update_max_log_count(logcount)
|
||||
if("toggle_function")
|
||||
. = 1
|
||||
if(!ntnet_global)
|
||||
if(!GLOB.ntnet_global)
|
||||
return 1
|
||||
ntnet_global.toggle_function(text2num(href_list["id"]))
|
||||
GLOB.ntnet_global.toggle_function(text2num(href_list["id"]))
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/ui_data(mob/user)
|
||||
if(!ntnet_global)
|
||||
if(!GLOB.ntnet_global)
|
||||
return
|
||||
var/list/data = get_header_data()
|
||||
|
||||
data["ntnetstatus"] = ntnet_global.check_function()
|
||||
data["ntnetrelays"] = ntnet_global.relays.len
|
||||
data["idsstatus"] = ntnet_global.intrusion_detection_enabled
|
||||
data["idsalarm"] = ntnet_global.intrusion_detection_alarm
|
||||
data["ntnetstatus"] = GLOB.ntnet_global.check_function()
|
||||
data["ntnetrelays"] = GLOB.ntnet_global.relays.len
|
||||
data["idsstatus"] = GLOB.ntnet_global.intrusion_detection_enabled
|
||||
data["idsalarm"] = GLOB.ntnet_global.intrusion_detection_alarm
|
||||
|
||||
data["config_softwaredownload"] = ntnet_global.setting_softwaredownload
|
||||
data["config_peertopeer"] = ntnet_global.setting_peertopeer
|
||||
data["config_communication"] = ntnet_global.setting_communication
|
||||
data["config_systemcontrol"] = ntnet_global.setting_systemcontrol
|
||||
data["config_softwaredownload"] = GLOB.ntnet_global.setting_softwaredownload
|
||||
data["config_peertopeer"] = GLOB.ntnet_global.setting_peertopeer
|
||||
data["config_communication"] = GLOB.ntnet_global.setting_communication
|
||||
data["config_systemcontrol"] = GLOB.ntnet_global.setting_systemcontrol
|
||||
|
||||
data["ntnetlogs"] = list()
|
||||
|
||||
for(var/i in ntnet_global.logs)
|
||||
for(var/i in GLOB.ntnet_global.logs)
|
||||
data["ntnetlogs"] += list(list("entry" = i))
|
||||
data["ntnetmaxlogs"] = ntnet_global.setting_maxlogcount
|
||||
data["ntnetmaxlogs"] = GLOB.ntnet_global.setting_maxlogcount
|
||||
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user