some fixed in report system
This commit is contained in:
@@ -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)
|
public void CmdUserRc(Client client, String text)
|
||||||
{
|
{
|
||||||
bool cont = false;
|
bool cont = false;
|
||||||
String username = client.Name;
|
String username = "N/A";
|
||||||
String adminname = "N/A";
|
String adminname = "N/A";
|
||||||
ReportManage temp = null;
|
ReportManage temp = null;
|
||||||
|
|
||||||
//Für Admin
|
//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++)
|
for (int a = 0; a < listReports.Count; a++)
|
||||||
{
|
{
|
||||||
@@ -95,9 +95,15 @@ namespace ReallifeGamemode.Server.Report
|
|||||||
if (temp.getAdmin().Equals(client.Name))
|
if (temp.getAdmin().Equals(client.Name))
|
||||||
{
|
{
|
||||||
username = listReports[a].getUser();
|
username = listReports[a].getUser();
|
||||||
|
cont = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!cont)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Client user = ClientService.GetClientByNameOrId(username);
|
Client user = ClientService.GetClientByNameOrId(username);
|
||||||
|
|
||||||
if (text.Equals("quit"))
|
if (text.Equals("quit"))
|
||||||
@@ -109,13 +115,14 @@ namespace ReallifeGamemode.Server.Report
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
ChatService.SendMessage(client, "~y~" + username + " (REPORT): " + text);
|
ChatService.SendMessage(client, "~y~(REPORT) " + client.Name + ": " + text);
|
||||||
ChatService.SendMessage(user, "~y~" + username + " (REPORT): " + text);
|
ChatService.SendMessage(user, "~y~(REPORT) " + username + ": " + text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Für User
|
//Für User
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cont = false;
|
||||||
for (int a = 0; a < listReports.Count; a++)
|
for (int a = 0; a < listReports.Count; a++)
|
||||||
{
|
{
|
||||||
temp = listReports[a];
|
temp = listReports[a];
|
||||||
|
|||||||
Reference in New Issue
Block a user