more more fixes in report system
This commit is contained in:
@@ -85,6 +85,7 @@ namespace ReallifeGamemode.Server.Report
|
||||
String username = "N/A";
|
||||
String adminname = "N/A";
|
||||
ReportManage temp = null;
|
||||
bool userIsAdmin = false;
|
||||
|
||||
//Für Admin
|
||||
if (client.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
|
||||
@@ -99,34 +100,46 @@ namespace ReallifeGamemode.Server.Report
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!cont)
|
||||
Client user = null;
|
||||
if (cont)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Client user = ClientService.GetClientByNameOrId(username);
|
||||
user = ClientService.GetClientByNameOrId(username);
|
||||
|
||||
if (text.Equals("quit"))
|
||||
{
|
||||
ChatService.SendMessage(user, "~y~[REPORT] Chat vom Admin beendet");
|
||||
ChatService.SendMessage(client, "~y~[REPORT] Chat beendet");
|
||||
|
||||
for (int a = 0; a < listReports.Count; a++)
|
||||
{
|
||||
temp = listReports[a];
|
||||
if (temp.getAdmin().Equals(client.Name))
|
||||
{
|
||||
listReports.Remove(temp);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
else{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ChatService.SendMessage(client, "~y~[REPORT] " + client.Name + ": " + text);
|
||||
ChatService.SendMessage(user, "~y~[REPORT] " + client.Name + ": " + text);
|
||||
}
|
||||
}
|
||||
//Für User
|
||||
else
|
||||
{
|
||||
userIsAdmin = true;
|
||||
}
|
||||
|
||||
}
|
||||
//Für User
|
||||
if ((!client.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) || userIsAdmin)
|
||||
{
|
||||
cont = false;
|
||||
for (int a = 0; a < listReports.Count; a++)
|
||||
{
|
||||
temp = listReports[a];
|
||||
if (temp.getUser().Equals(client.Name))
|
||||
if (temp.getUser().Equals(client.Name) && !temp.getAdmin().Equals("N/A"))
|
||||
{
|
||||
cont = true;
|
||||
adminname = listReports[a].getAdmin();
|
||||
@@ -153,7 +166,7 @@ namespace ReallifeGamemode.Server.Report
|
||||
listReports.Add(ticket);
|
||||
}
|
||||
if (type == "Quick Report")
|
||||
ChatService.BroadcastAdmin("QR von " + user.Name + ": " + data, AdminLevel.ADMIN);
|
||||
ChatService.BroadcastAdmin("QR von " + user.Name + ": " + data, AdminLevel.SUPPORTER);
|
||||
}
|
||||
|
||||
[RemoteEvent("deleteReport")]
|
||||
@@ -167,7 +180,6 @@ namespace ReallifeGamemode.Server.Report
|
||||
{
|
||||
ReportManage temp = listReports[a];
|
||||
|
||||
ChatService.Broadcast("DEB: " + temp.getUser() + " + " + player.Name + " + " + user.Name);
|
||||
if (temp.getUser().Equals(player.Name))
|
||||
{
|
||||
ChatService.Broadcast("Ticket von " + player.Name + " gelöscht!");
|
||||
|
||||
Reference in New Issue
Block a user