public override void Help(Player p) { p.Message("%T/Patrol"); ItemPerms except = CommandExtraPerms.Find(name, 1); p.Message("%HTeleports you to a random player. {0} %Hare not patrolled", except.Describe()); p.Message("%HPlayers patrolled within the last 15 seconds are ignored"); }
void HandleAdd(Player p, string[] args) { if (args.Length != 2) { p.Message("You need to provide a reason for the report."); return; } string target = PlayerDB.MatchNames(p, args[0]); if (target == null) { return; } List <string> reports = new List <string>(); if (File.Exists("extra/reported/" + target + ".txt")) { reports = Utils.ReadAllLinesList("extra/reported/" + target + ".txt"); } ItemPerms checkPerms = CommandExtraPerms.Find(name, 1); if (reports.Count >= 5) { p.Message("{0} %Walready has 5 reports! Please wait until an {1} %Whas reviewed these reports first!", p.FormatNick(target), checkPerms.Describe()); return; } string reason = args[1]; reason = ModActionCmd.ExpandReason(p, reason); if (reason == null) { return; } reports.Add(reason + " - Reported by " + p.name + " at " + DateTime.Now); File.WriteAllLines("extra/reported/" + target + ".txt", reports.ToArray()); p.Message("&aReport sent! It should be viewed when a {0} &ais online", checkPerms.Describe()); string opsMsg = "λNICK %Smade a report, view it with %T/Report check " + target; Chat.MessageFrom(ChatScope.Perms, p, opsMsg, checkPerms, null, true); }
void HandleAdd(Player p, string[] args) { if (args.Length != 2) { p.Message("You need to provide a reason for the report."); return; } string target = PlayerDB.MatchNames(p, args[0]); if (target == null) { return; } string nick = p.FormatNick(target); List <string> reports = new List <string>(); if (HasReports(target)) { reports = Utils.ReadAllLinesList(ReportPath(target)); } ItemPerms checkPerms = CommandExtraPerms.Find(name, 1); if (reports.Count >= 5) { p.Message("{0} &Walready has 5 reports! Please wait until an {1} &Whas reviewed these reports first!", nick, CommandExtraPerms.Find(name, 1).Describe()); return; } string reason = ModActionCmd.ExpandReason(p, args[1]); if (reason == null) { return; } reports.Add(reason + " - Reported by " + p.name + " at " + DateTime.Now); File.WriteAllLines(ReportPath(target), reports.ToArray()); p.Message("&aReport sent! It should be viewed when a {0} &ais online", checkPerms.Describe()); string opsMsg = "λNICK &Sreported " + nick + "&S. Reason: " + reason; Chat.MessageFrom(ChatScope.Perms, p, opsMsg, checkPerms, null, true); string allMsg = "Use &T/Report check " + target + " &Sto see all of their reports"; Chat.MessageFrom(ChatScope.Perms, p, allMsg, checkPerms, null, true); }