SSinstancing (I need to test this with 2 machines)

This commit is contained in:
AffectedArc07
2021-08-17 14:05:46 +01:00
parent 583dffcad4
commit e19a83f9be
9 changed files with 186 additions and 26 deletions
+2 -1
View File
@@ -67,7 +67,8 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
/client/proc/toggle_mentor_chat,
/client/proc/toggle_advanced_interaction, /*toggle admin ability to interact with not only machines, but also atoms such as buttons and doors*/
/client/proc/list_ssds_afks,
/client/proc/ccbdb_lookup_ckey
/client/proc/ccbdb_lookup_ckey,
/client/proc/view_instances
))
GLOBAL_LIST_INIT(admin_verbs_ban, list(
/client/proc/ban_panel,
@@ -0,0 +1,22 @@
/client/proc/view_instances()
set name = "View Server Instances"
set desc = "View the running server instances"
set category = "Server"
if(!check_rights(R_ADMIN))
return
to_chat(usr, "<b>Server instances info</b>")
for(var/datum/peer_server/PS in GLOB.configuration.instancing.peers)
// We havnt even been discovered, so we cant even be online
if(!PS.discovered)
to_chat(usr, "#[PS.server_port] (Undiscovered) - <font color='red'><b>OFFLINE</b></font>")
continue
// We exist but arent online at the moment
if(!PS.online)
to_chat(usr, "ID [PS.server_id] - <font color='red'><b>OFFLINE</b></font>")
continue
// If we are here, we are online, so we can do a rich report
to_chat(usr, "ID [PS.server_id] - <font color='green'><b>ONLINE</b></font> (Players: [PS.playercount])")