From e0094ae642a6b1214bafd45fb4b09322737af2aa Mon Sep 17 00:00:00 2001 From: Zidonuke Date: Thu, 22 Dec 2011 17:46:55 -0500 Subject: [PATCH] Chat format is configurable now. --- TShockAPI/ConfigFile.cs | 3 +++ TShockAPI/TShock.cs | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 6d690655..35dd0ca6 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -182,6 +182,9 @@ namespace TShockAPI [Description("Disables snow ball projectiles from spawning")] //Change this to stop the tile from spawning public bool DisableSnowBalls = false; + + [Description("Change ingame chat format, {0} = Group Prefix, {1} = Player Name, {2} = Group Suffix, {3} = Chat Message")] + public string ChatFormat = "{0}{1}{2} {3}"; public static ConfigFile Read(string path) { diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index cd9ca0a3..67613d7b 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -560,9 +560,7 @@ namespace TShockAPI } else { - TShock.Utils.Broadcast("{0}{1}{2}: {3}".SFormat(tsplr.Group.Prefix, tsplr.Name, tsplr.Group.Suffix, text), - tsplr.Group.R, tsplr.Group.G, - tsplr.Group.B); + TShock.Utils.Broadcast(String.Format(TShock.Config.ChatFormat, tsplr.Group.Prefix, tsplr.Name, tsplr.Group.Suffix, text), tsplr.Group.R, tsplr.Group.G, tsplr.Group.B); e.Handled = true; } }