From e919c223504adb475794f30173d05fecff7c7bf2 Mon Sep 17 00:00:00 2001 From: Alffd Date: Sat, 31 Mar 2018 16:55:37 -0400 Subject: [PATCH 1/3] Migrate listing controls to byond. Inspired by a MSO post. --- code/hub.dm | 1 + code/world.dm | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/code/hub.dm b/code/hub.dm index 0dfc4359ca3..d54b49e1011 100644 --- a/code/hub.dm +++ b/code/hub.dm @@ -3,6 +3,7 @@ hub = "Exadv1.spacestation13" hub_password = "kMZy3U5jJHSiBQjr" name = "Space Station 13" + /var/hub_password_base = "kMZy3U5jJHSiBQjr" /* This is for any host that would like their server to appear on the main SS13 hub. To use it, simply replace the password above, with the password found below, and it should work. If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13 we can help you there. diff --git a/code/world.dm b/code/world.dm index df7fc20437c..a3771cb6ac3 100644 --- a/code/world.dm +++ b/code/world.dm @@ -60,8 +60,8 @@ var/global/list/map_transition_config = MAP_TRANSITION_CONFIG map_name = "[using_map.name]" else map_name = "Unknown" - - + + if(config && config.server_name) name = "[config.server_name]: [station_name()]" else @@ -117,6 +117,9 @@ var/world_topic_spam_protect_time = world.timeofday s["host"] = host ? host : null s["players"] = list() s["stationtime"] = worldtime2text() + s["listed"] = "Public" + if(!hub_password) + s["listed"] = "Invisible" var/player_count = 0 var/admin_count = 0 @@ -269,6 +272,18 @@ var/world_topic_spam_protect_time = world.timeofday return "Logs set to current date" + else if("setlist" in input) + if(!key_valid) + return keySpamProtect(addr) + if(input["req"] == "public") + hub_password = hub_password_base + update_status() + return "Set listed status to public." + else + hub_password = "" + update_status() + return "Set listed status to invisible." + /proc/keySpamProtect(var/addr) if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50) spawn(50) From b22b9e53fdf1c1dabd1cf59bd95d655964bc88be Mon Sep 17 00:00:00 2001 From: Alffd Date: Sun, 1 Apr 2018 22:58:24 -0400 Subject: [PATCH 2/3] Remove the / --- code/hub.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/hub.dm b/code/hub.dm index d54b49e1011..df98f92b2ac 100644 --- a/code/hub.dm +++ b/code/hub.dm @@ -3,7 +3,7 @@ hub = "Exadv1.spacestation13" hub_password = "kMZy3U5jJHSiBQjr" name = "Space Station 13" - /var/hub_password_base = "kMZy3U5jJHSiBQjr" + var/hub_password_base = "kMZy3U5jJHSiBQjr" /* This is for any host that would like their server to appear on the main SS13 hub. To use it, simply replace the password above, with the password found below, and it should work. If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13 we can help you there. From e7a198d5cfde559cdbb1324d9894fc0437fdc83b Mon Sep 17 00:00:00 2001 From: Alffd Date: Mon, 2 Apr 2018 01:05:10 -0400 Subject: [PATCH 3/3] Revert "Remove the /" This reverts commit b22b9e53fdf1c1dabd1cf59bd95d655964bc88be. --- code/hub.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/hub.dm b/code/hub.dm index df98f92b2ac..d54b49e1011 100644 --- a/code/hub.dm +++ b/code/hub.dm @@ -3,7 +3,7 @@ hub = "Exadv1.spacestation13" hub_password = "kMZy3U5jJHSiBQjr" name = "Space Station 13" - var/hub_password_base = "kMZy3U5jJHSiBQjr" + /var/hub_password_base = "kMZy3U5jJHSiBQjr" /* This is for any host that would like their server to appear on the main SS13 hub. To use it, simply replace the password above, with the password found below, and it should work. If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13 we can help you there.