Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] clean up server location config #3093

Open
wants to merge 1 commit into
base: dev-sierra
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions code/controllers/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
/// server name (for world name / status)
var/static/server_name = "Space Station 13"

/// generate numeric suffix based on server port
var/static/server_suffix = FALSE

/// for topic status requests
var/static/game_version = "Baystation12"

Expand Down Expand Up @@ -201,9 +198,7 @@

var/static/debugparanoid = FALSE

var/static/serverurl

var/static/server
var/static/server_address

var/static/banappeals

Expand Down Expand Up @@ -633,14 +628,12 @@
respawn_menu_delay = respawn_menu_delay > 0 ? respawn_menu_delay : 0
if ("server_name")
server_name = value
if ("serversuffix")
server_suffix = TRUE
if ("hostedby")
hostedby = value
if ("serverurl")
serverurl = value
if ("server")
server = value
if ("server_address")
server_address = value
if (copytext(server_address, 1, 9) != "byond://")
server_address = "byond://[server_address]"
if ("banappeals")
banappeals = value
if ("wiki_url")
Expand Down
15 changes: 7 additions & 8 deletions code/game/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,13 @@ GLOBAL_VAR_INIT(world_topic_last, world.timeofday)

Master.Shutdown()

var/datum/chatOutput/co
for(var/client/C in GLOB.clients)
co = C.chatOutput
if(co)
co.ehjax_send(data = "roundrestart")
if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
for(var/client/C in GLOB.clients)
send_link(C, "byond://[config.server]")
var/datum/chatOutput/chat_output
for (var/client/client in GLOB.clients)
chat_output = client.chatOutput
if (chat_output)
chat_output.ehjax_send(data = "roundrestart")
if (config.server_address)
send_link(client, config.server_address)

// [SIERRA-ADD] - RUST_G - Past this point, no logging procs can be used, at risk of data loss.
rustg_log_close_all()
Expand Down
10 changes: 3 additions & 7 deletions code/modules/ext_scripts/irc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@
export2irc(params)

/proc/get_world_url()
. = "byond://"
if(config.serverurl)
. += config.serverurl
else if(config.server)
. += config.server
else
. += "[world.address]:[world.port]"
if (config.server_address)
return config.server_address
return "byond://[world.address]:[world.port]"

/proc/send_to_admin_discord(type, message)
if(config.admin_discord && config.excom_address)
Expand Down
8 changes: 2 additions & 6 deletions config/example/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,8 @@ GUEST_BAN
## Uncomment to 1 to jobban, leave commented out to allow these positions for everyone (but see GUEST_JOBBAN above and regular jobbans)
# USEWHITELIST

## set a server location for world reboot. Don't include the byond://, just give the address and port.
#SERVER server.net:port

## set a server URL for the IRC bot to use; like SERVER, don't include the byond://
## Unlike SERVER, this one shouldn't break auto-reconnect
#SERVERURL server.net:port
## Set a server location for world rejoins. May be either "address:port" or "byond://address:port".
#SERVER_ADDRESS server.address:port

## Wiki address
## Where your server's documentation lives
Expand Down
Loading