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)