Added /broadcast and /bc
Admin chat color and prefix are now optional
This commit is contained in:
parent
d62068eacf
commit
a66d016fcb
4 changed files with 21 additions and 1 deletions
|
|
@ -146,6 +146,8 @@ namespace TShockAPI
|
|||
ChatCommands.Add(new Command("displaylogs", "logs", Rules));
|
||||
ChatCommands.Add(new Command("user", "manageusers", ManageUsers));
|
||||
ChatCommands.Add(new Command("login", "", AttemptLogin));
|
||||
ChatCommands.Add(new Command("broadcast", "cfg", Broadcast));
|
||||
ChatCommands.Add(new Command("bc", "cfg", Broadcast));
|
||||
if (ConfigurationManager.DistributationAgent != "terraria-online")
|
||||
{
|
||||
ChatCommands.Add(new Command("kill", "kill", Kill));
|
||||
|
|
@ -516,6 +518,19 @@ namespace TShockAPI
|
|||
|
||||
#region Server Maintenence Commands
|
||||
|
||||
private static void Broadcast(CommandArgs args)
|
||||
{
|
||||
string message = "";
|
||||
|
||||
for (int i = 0; i < args.Parameters.Count; i++)
|
||||
{
|
||||
message += args.Parameters[i];
|
||||
}
|
||||
|
||||
Tools.Broadcast("(Server Broadcast) " + message, Color.Red);
|
||||
return;
|
||||
}
|
||||
|
||||
private static void Off(CommandArgs args)
|
||||
{
|
||||
Tools.ForceKickAll("Server shutting down!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue