Finish new prefix and suffix system for groups.
Removed admin chat stuff and will now use prefix/suffix's
This commit is contained in:
parent
8cf298ad85
commit
33d304a4fa
4 changed files with 8 additions and 21 deletions
|
|
@ -55,10 +55,10 @@ namespace TShockAPI
|
|||
public int TileThreshold = 120;
|
||||
[Description("#.#.#. = Red/Blue/Green - RGB Colors for the Admin Chat Color. Max value: 255")]
|
||||
public float[] SuperAdminChatRGB = { 255, 0, 0 };
|
||||
[Description("The Chat Prefix before an admin speaks. eg. *The prefix was set to \"(Admin) \", so.. (Admin) : Hi! Note: If you put a space after the prefix, it will look like this: (Admin) <TerrariaDude): Hi!")]
|
||||
public string AdminChatPrefix = "(Admin) ";
|
||||
[Description("")]
|
||||
public bool AdminChatEnabled = true;
|
||||
[Description("Super admin group chat prefix")]
|
||||
public string SuperAdminChatPrefix = "(Admin) ";
|
||||
[Description("Super admin group chat suffix")]
|
||||
public string SuperAdminChatSuffix = "";
|
||||
[Description("Backup frequency in minutes. So, a value of 60 = 60 minutes. Backups are stored in the \\tshock\\backups folder.")]
|
||||
public int BackupInterval;
|
||||
[Description("How long backups are kept in minutes. 2880 = 2 days.")]
|
||||
|
|
@ -132,9 +132,6 @@ namespace TShockAPI
|
|||
[Description("Buffers up the packets and sends them out at the end of each frame")]
|
||||
public bool BufferPackets = true;
|
||||
|
||||
[Description("Display the users group when they chat.")]
|
||||
public bool ChatDisplayGroup = false;
|
||||
|
||||
[Description("String that is used when kicking people when the server is full.")]
|
||||
public string ServerFullReason = "Server is full";
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,9 @@ namespace TShockAPI
|
|||
R = (byte)TShock.Config.SuperAdminChatRGB[0];
|
||||
G = (byte)TShock.Config.SuperAdminChatRGB[1];
|
||||
B = (byte)TShock.Config.SuperAdminChatRGB[2];
|
||||
Prefix = TShock.Config.SuperAdminChatPrefix;
|
||||
Suffix = TShock.Config.SuperAdminChatSuffix;
|
||||
|
||||
}
|
||||
|
||||
public override bool HasPermission(string permission)
|
||||
|
|
|
|||
|
|
@ -38,9 +38,6 @@ namespace TShockAPI
|
|||
[Description("Specific log messages are sent to users with this permission")]
|
||||
public static readonly string logs;
|
||||
|
||||
[Description("User gets the admin prefix/color in chat")]
|
||||
public static readonly string adminchat;
|
||||
|
||||
[Todo]
|
||||
[Description("Not currently working")]
|
||||
public static readonly string reservedslot;
|
||||
|
|
|
|||
|
|
@ -546,15 +546,6 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (tsplr.Group.HasPermission(Permissions.adminchat) && !text.StartsWith("/") && Config.AdminChatEnabled)
|
||||
{
|
||||
TShock.Utils.Broadcast(Config.AdminChatPrefix + "<" + tsplr.Name + "> " + text,
|
||||
tsplr.Group.R, tsplr.Group.G,
|
||||
tsplr.Group.B);
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (text.StartsWith("/"))
|
||||
{
|
||||
try
|
||||
|
|
@ -569,10 +560,9 @@ namespace TShockAPI
|
|||
}
|
||||
else
|
||||
{
|
||||
TShock.Utils.Broadcast("{2}<{0}> {1}".SFormat(tsplr.Name, text, Config.ChatDisplayGroup ? "[{0}] ".SFormat(tsplr.Group.Name) : ""),
|
||||
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);
|
||||
//Log.Info(string.Format("{0} said: {1}", tsplr.Name, text));
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue