Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case "tag":
- lock (ticketlist.Tickets)
- {
- try
- {
- string[] officialtags = File.ReadAllText(tagpath).Split('\n');
- for (int i = 0; i < officialtags.Length; i++)
- {
- officialtags[i] = officialtags[i].Trim().ToLower();
- }
- if (!((IList<string>)officialtags).Contains(args.Parameters[1].Trim().ToLower()))
- {
- args.Player.SendMessage("Tag does not exist.", Color.Red);
- return;
- }
- for (int i = 0; i < ticketlist.Tickets.Count; i++)
- {
- if (ticketlist.Tickets[i].getTag().Trim().ToLower() == args.Parameters[1].Trim().ToLower())
- {
- ticketlist.Tickets.RemoveAt(i);
- }
- }
- }
- catch (Exception e)
- {
- args.Player.SendMessage("Error, could not clear tickets, check log for more info.", Color.Red);
- Log.Error(e.Message);
- }
- finally { args.Player.SendMessage("All tickets with the tag \"" + args.Parameters[1] + "\" cleared.", bluebase); }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement