Merge pull request #8829 from Allfd/listed

Migrate listing controls to byond
This commit is contained in:
tigercat2000
2018-04-02 14:58:50 -07:00
committed by GitHub
2 changed files with 18 additions and 2 deletions
+1
View File
@@ -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.
+17 -2
View File
@@ -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)