more advanced features in report system

This commit is contained in:
2019-09-03 18:22:24 +02:00
parent 72f3c97556
commit 22fb8f1d6e
2 changed files with 16 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ namespace ReallifeGamemode.Server.Report
{ {
ReportManage temp = listReports[a]; ReportManage temp = listReports[a];
if (!temp.getAdmin().Equals("N/A")) if (!temp.isAssigned())
{ {
listPlayers.Add(temp.getUser()); listPlayers.Add(temp.getUser());
listTicketnames.Add(temp.getReporttext()); listTicketnames.Add(temp.getReporttext());
@@ -167,6 +167,17 @@ namespace ReallifeGamemode.Server.Report
{ {
if (type == "Ticket Report") if (type == "Ticket Report")
{ {
ReportManage temp = null;
for (int a = 0; a < listReports.Count; a++)
{
temp = listReports[a];
if (temp.getUser().Equals(user.Name))
{
ChatService.SendMessage(user, "Du hast bereits ein Ticket erstellt");
return;
}
}
ChatService.BroadcastDutyAdmin("Eingehendes Ticket von " + user.Name + ": " + data + " (Benutze /showtickets)"); ChatService.BroadcastDutyAdmin("Eingehendes Ticket von " + user.Name + ": " + data + " (Benutze /showtickets)");
ReportManage ticket = new ReportManage(user.Name, data); ReportManage ticket = new ReportManage(user.Name, data);
listReports.Add(ticket); listReports.Add(ticket);

View File

@@ -29,6 +29,10 @@ namespace ReallifeGamemode.Server.Report
{ {
return this.admin; return this.admin;
} }
public bool isAssigned()
{
return this.assigned;
}
public String getUser() public String getUser()
{ {