V3 DMAPI patch, fix Discord mentions

This commit is contained in:
Jordan Brown
2020-08-29 12:46:45 -04:00
parent ebe8b84a95
commit 4a38e7f1eb
6 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<TgsConfigVersion>2.1.0</TgsConfigVersion>
<TgsApiVersion>7.3.1</TgsApiVersion>
<TgsClientVersion>8.3.1</TgsClientVersion>
<TgsDmapiVersion>5.2.4</TgsDmapiVersion>
<TgsDmapiVersion>5.2.5</TgsDmapiVersion>
<TgsControlPanelVersion>0.4.0</TgsControlPanelVersion>
<TgsHostWatchdogVersion>1.1.0</TgsHostWatchdogVersion>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
// tgstation-server DMAPI
#define TGS_DMAPI_VERSION "5.2.4"
#define TGS_DMAPI_VERSION "5.2.5"
// All functions and datums outside this document are subject to change with any version and should not be relied on.
+1 -1
View File
@@ -39,7 +39,7 @@
var/warned_custom_commands = FALSE
/datum/tgs_api/v3210/ApiVersion()
return new /datum/tgs_version("3.2.1.0")
return new /datum/tgs_version("3.2.1.1")
/datum/tgs_api/v3210/proc/trim_left(text)
for (var/i = 1 to length(text))
+6
View File
@@ -42,5 +42,11 @@
var/datum/tgs_chat_command/stc = new command_type
var/datum/tgs_chat_user/user = new
user.friendly_name = sender
// Discord hack, fix the mention if it's only numbers (fuck you IRC trolls)
var/regex/discord_id_regex = regex(@"[0-9]+")
if(discord_id_regex.Find(sender))
sender = "<@[sender]>"
user.mention = sender
return stc.Run(user, params) || TRUE
+1 -1
View File
@@ -18,7 +18,7 @@
var/initialized = FALSE
/datum/tgs_api/v5/ApiVersion()
return new /datum/tgs_version("5.2.4")
return new /datum/tgs_version("5.2.5")
/datum/tgs_api/v5/OnWorldNew(minimum_required_security_level)
server_port = world.params[DMAPI5_PARAM_SERVER_PORT]
@@ -33,7 +33,7 @@ namespace Tgstation.Server.Host.Components.Interop
/// <summary>
/// The DMAPI <see cref="Version"/> being used.
/// </summary>
public static readonly Version Version = new Version(5, 2, 4);
public static readonly Version Version = new Version(5, 2, 5);
/// <summary>
/// <see cref="JsonSerializerSettings"/> for use when communicating with the DMAPI.