Added AdminChatPrefix configuration option.

Added AdminChatRGB configuration option.
Tweaked how broadcast works, now clamps RGB values to prevent overflows.
Added a new permission, "adminchat," that defines who is affected by the AdminChatPrefix and the new AdminChatRGB (which is a rgb color spectrum for the chat color of admin's text).
Closes #72
This commit is contained in:
Shank 2011-06-14 02:56:04 -06:00
parent 49ca8fcd1a
commit 6411e71cee
4 changed files with 25 additions and 1 deletions

View file

@ -600,6 +600,13 @@ namespace TShockAPI
return;
}
if (players[ply].group.HasPermission("adminchat") && !text.StartsWith("/"))
{
Tools.Broadcast(ConfigurationManager.adminChatPrefix + "<" + Main.player[ply].name + "> " + text, ConfigurationManager.adminChatRGB);
e.Handled = true;
return;
}
int x = (int)Main.player[ply].position.X;
int y = (int)Main.player[ply].position.Y;