Removed DistributationAgent
This commit is contained in:
parent
63623bd971
commit
5ea032cf79
1 changed files with 29 additions and 33 deletions
|
|
@ -174,14 +174,11 @@ namespace TShockAPI
|
||||||
ChatCommands.Add(new Command("whisper", Reply, "reply", "r"));
|
ChatCommands.Add(new Command("whisper", Reply, "reply", "r"));
|
||||||
ChatCommands.Add(new Command("annoy", Annoy, "annoy"));
|
ChatCommands.Add(new Command("annoy", Annoy, "annoy"));
|
||||||
ChatCommands.Add(new Command("cfg", ConvertWaR, "convert"));
|
ChatCommands.Add(new Command("cfg", ConvertWaR, "convert"));
|
||||||
if (TShock.Config.DistributationAgent != "terraria-online")
|
ChatCommands.Add(new Command("kill", Kill, "kill"));
|
||||||
{
|
ChatCommands.Add(new Command("butcher", Butcher, "butcher"));
|
||||||
ChatCommands.Add(new Command("kill", Kill, "kill"));
|
ChatCommands.Add(new Command("item", Item, "item", "i"));
|
||||||
ChatCommands.Add(new Command("butcher", Butcher, "butcher"));
|
ChatCommands.Add(new Command("item", Give, "give"));
|
||||||
ChatCommands.Add(new Command("item", Item, "item", "i"));
|
ChatCommands.Add(new Command("heal", Heal, "heal"));
|
||||||
ChatCommands.Add(new Command("item", Give, "give"));
|
|
||||||
ChatCommands.Add(new Command("heal", Heal, "heal"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool HandleCommand(TSPlayer player, string text)
|
public static bool HandleCommand(TSPlayer player, string text)
|
||||||
|
|
@ -1839,39 +1836,38 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
case "remove":
|
case "remove":
|
||||||
if (args.Parameters.Count > 2)
|
if (args.Parameters.Count > 2)
|
||||||
{
|
{
|
||||||
string playerName = args.Parameters[1];
|
string playerName = args.Parameters[1];
|
||||||
string regionName = "";
|
string regionName = "";
|
||||||
User playerID;
|
|
||||||
|
|
||||||
for (int i = 2; i < args.Parameters.Count; i++)
|
for (int i = 2; i < args.Parameters.Count; i++)
|
||||||
|
{
|
||||||
|
if (regionName == "")
|
||||||
{
|
{
|
||||||
if (regionName == "")
|
regionName = args.Parameters[2];
|
||||||
{
|
|
||||||
regionName = args.Parameters[2];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
regionName = regionName + " " + args.Parameters[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((playerID = TShock.Users.GetUserByName(playerName)) != null)
|
|
||||||
{
|
|
||||||
if (TShock.Regions.RemoveUser(regionName, playerName))
|
|
||||||
{
|
|
||||||
args.Player.SendMessage("Removed user " + playerName + " from " + regionName, Color.Yellow);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
args.Player.SendMessage("Region " + regionName + " not found", Color.Red);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
args.Player.SendMessage("Player " + playerName + " not found", Color.Red);
|
regionName = regionName + " " + args.Parameters[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (TShock.Users.GetUserByName(playerName) != null)
|
||||||
|
{
|
||||||
|
if (TShock.Regions.RemoveUser(regionName, playerName))
|
||||||
|
{
|
||||||
|
args.Player.SendMessage("Removed user " + playerName + " from " + regionName, Color.Yellow);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
args.Player.SendMessage("Region " + regionName + " not found", Color.Red);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
args.Player.SendMessage("Invalid syntax! Proper syntax: /region allow [name] [region]", Color.Red);
|
{
|
||||||
break;
|
args.Player.SendMessage("Player " + playerName + " not found", Color.Red);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
args.Player.SendMessage("Invalid syntax! Proper syntax: /region allow [name] [region]", Color.Red);
|
||||||
|
break;
|
||||||
case "list":
|
case "list":
|
||||||
{
|
{
|
||||||
//How many regions per page
|
//How many regions per page
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue