some fixed in report system

This commit is contained in:
2019-09-03 17:23:40 +02:00
parent c6b367b308
commit 888536b0bc

View File

@@ -78,16 +78,16 @@ namespace ReallifeGamemode.Server.Report
}
}
[Command("rc", "~m~Benutzung: ~s~/rc text")]
[Command("rc", "~m~Benutzung: ~s~/rc text", GreedyArg = true)]
public void CmdUserRc(Client client, String text)
{
bool cont = false;
String username = client.Name;
String username = "N/A";
String adminname = "N/A";
ReportManage temp = null;
//Für Admin
if (client.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
if (client.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
{
for (int a = 0; a < listReports.Count; a++)
{
@@ -95,9 +95,15 @@ namespace ReallifeGamemode.Server.Report
if (temp.getAdmin().Equals(client.Name))
{
username = listReports[a].getUser();
cont = true;
break;
}
}
if (!cont)
{
return;
}
Client user = ClientService.GetClientByNameOrId(username);
if (text.Equals("quit"))
@@ -109,13 +115,14 @@ namespace ReallifeGamemode.Server.Report
return;
}
else{
ChatService.SendMessage(client, "~y~" + username + " (REPORT): " + text);
ChatService.SendMessage(user, "~y~" + username + " (REPORT): " + text);
ChatService.SendMessage(client, "~y~(REPORT) " + client.Name + ": " + text);
ChatService.SendMessage(user, "~y~(REPORT) " + username + ": " + text);
}
}
//Für User
else
{
cont = false;
for (int a = 0; a < listReports.Count; a++)
{
temp = listReports[a];