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

Automatic TGS DMAPI Update #1

Open
wants to merge 1 commit into
base: master
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
2 changes: 1 addition & 1 deletion code/__DEFINES/tgs.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tgstation-server DMAPI

#define TGS_DMAPI_VERSION "6.0.2"
#define TGS_DMAPI_VERSION "6.0.3"

// All functions and datums outside this document are subject to change with any version and should not be relied on.

Expand Down
8 changes: 4 additions & 4 deletions code/modules/tgs/v3210/api.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
comms_key = world.params[SERVICE_WORLD_PARAM]
instance_name = world.params[SERVICE_INSTANCE_PARAM]
if(!instance_name)
instance_name = "TG Station Server" //maybe just upgraded
instance_name = "TG Station Server" //maybe just upgraded

var/list/logs = file2list(".git/logs/HEAD")
if(logs.len)
Expand Down Expand Up @@ -92,14 +92,14 @@
if(skip_compat_check && !fexists(SERVICE_INTERFACE_DLL))
TGS_ERROR_LOG("Service parameter present but no interface DLL detected. This is symptomatic of running a service less than version 3.1! Please upgrade.")
return
call(SERVICE_INTERFACE_DLL, SERVICE_INTERFACE_FUNCTION)(instance_name, command) //trust no retval
call(SERVICE_INTERFACE_DLL, SERVICE_INTERFACE_FUNCTION)(instance_name, command) //trust no retval
return TRUE

/datum/tgs_api/v3210/OnTopic(T)
var/list/params = params2list(T)
var/their_sCK = params[SERVICE_CMD_PARAM_KEY]
if(!their_sCK)
return FALSE //continue world/Topic
return FALSE //continue world/Topic

if(their_sCK != comms_key)
return "Invalid comms key!";
Expand Down Expand Up @@ -176,7 +176,7 @@
return ri

/datum/tgs_api/v3210/EndProcess()
sleep(world.tick_lag) //flush the buffers
sleep(world.tick_lag) //flush the buffers
ExportService(SERVICE_REQUEST_KILL_PROCESS)

/datum/tgs_api/v3210/ChatChannelInfo()
Expand Down
6 changes: 3 additions & 3 deletions code/modules/tgs/v4/api.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
var/list/params = params2list(T)
var/their_sCK = params[TGS4_INTEROP_ACCESS_IDENTIFIER]
if(!their_sCK)
return FALSE //continue world/Topic
return FALSE //continue world/Topic

if(their_sCK != access_identifier)
return "Invalid comms key!";
Expand Down Expand Up @@ -192,7 +192,7 @@

//request a new port
export_lock = FALSE
var/list/new_port_json = Export(TGS4_COMM_NEW_PORT, list(TGS4_PARAMETER_DATA = "[world.port]"), TRUE) //stringify this on purpose
var/list/new_port_json = Export(TGS4_COMM_NEW_PORT, list(TGS4_PARAMETER_DATA = "[world.port]"), TRUE) //stringify this on purpose

if(!new_port_json)
TGS_ERROR_LOG("No new port response from server![TGS4_PORT_CRITFAIL_MESSAGE]")
Expand Down Expand Up @@ -235,7 +235,7 @@

var/port = result[TGS4_PARAMETER_DATA]
if(!isnum(port))
return //this is valid, server may just want use to reboot
return //this is valid, server may just want use to reboot

if(port == 0)
//to byond 0 means any port and "none" means close vOv
Expand Down
4 changes: 2 additions & 2 deletions code/modules/tgs/v5/api.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

if(!initialized)
TGS_WARNING_LOG("Missed topic due to not being initialized: [T]")
return TRUE // too early to handle, but it's still our responsibility
return TRUE // too early to handle, but it's still our responsibility

var/their_sCK = topic_parameters[DMAPI5_PARAMETER_ACCESS_IDENTIFIER]
if(their_sCK != access_identifier)
Expand Down Expand Up @@ -273,7 +273,7 @@

var/port = result[DMAPI5_BRIDGE_RESPONSE_NEW_PORT]
if(!isnum(port))
return //this is valid, server may just want use to reboot
return //this is valid, server may just want use to reboot

if(port == 0)
//to byond 0 means any port and "none" means close vOv
Expand Down