mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 15:07:03 +01:00
Add TGS_EVENT_INSTANCE_RENAMED to DMAPI
This commit is contained in:
+4
-3
@@ -1,6 +1,6 @@
|
||||
//tgstation-server DMAPI
|
||||
|
||||
#define TGS_DMAPI_VERSION "5.0.0"
|
||||
#define TGS_DMAPI_VERSION "5.1.0"
|
||||
|
||||
//All functions and datums outside this document are subject to change with any version and should not be relied on
|
||||
|
||||
@@ -52,8 +52,9 @@
|
||||
|
||||
//EVENT CODES
|
||||
|
||||
#define TGS_EVENT_PORT_SWAP -2 //before a port change is about to happen, extra parameter is new port
|
||||
#define TGS_EVENT_REBOOT_MODE_CHANGE -1 //before a reboot mode change, extras parameters are the current and new reboot mode enums
|
||||
#define TGS_EVENT_REBOOT_MODE_CHANGE -1 //Before a reboot mode change, extras parameters are the current and new reboot mode enums
|
||||
#define TGS_EVENT_PORT_SWAP -2 //Before a port change is about to happen, extra parameters is new port
|
||||
#define TGS_EVENT_INSTANCE_RENAMED -3 //Before the instance is renamed, extra prameter is the new name
|
||||
|
||||
//See the descriptions for the parameters of these codes here: https://github.com/tgstation/tgstation-server/blob/master/src/Tgstation.Server.Host/Components/EventType.cs
|
||||
#define TGS_EVENT_REPO_RESET_ORIGIN 0
|
||||
|
||||
@@ -178,6 +178,9 @@
|
||||
if(!istext(new_instance_name))
|
||||
return TopicResponse("Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_INSTANCE_NAME]!")
|
||||
|
||||
if(event_handler != null)
|
||||
event_handler.HandleEvent(TGS_EVENT_INSTANCE_RENAMED, new_instance_name)
|
||||
|
||||
instance_name = new_instance_name
|
||||
return TopicResponse()
|
||||
if(DMAPI5_TOPIC_COMMAND_CHAT_CHANNELS_UPDATE)
|
||||
|
||||
Reference in New Issue
Block a user