[Command("report", GreedyArg = true)]
public static void CMD_report(Player player, string message)
{
try
{
if (message.Length > 150)
{
Notify.Send(player, NotifyType.Error, NotifyPosition.BottomCenter, $"Слишком длинное сообщение", 3000);
return;
}
if (Main.Accounts[player].VipLvl == 0 && player.HasData("NEXT_REPORT"))
{
DateTime nextReport = player.GetData<DateTime>("NEXT_REPORT");
if (DateTime.Now < nextReport)
{
Notify.Send(player, NotifyType.Error, NotifyPosition.BottomCenter, $"Попробуйте отправить жалобу через некоторое время", 3000);
return;
}
}
if (player.HasData("MUTE_TIMER"))
{
Notify.Send(player, NotifyType.Error, NotifyPosition.BottomCenter, "Нельзя отправлять репорт во время Mute, дождитесь его окончания", 3000);
return;
}
ReportSys.AddReport(player, message);
}
catch (Exception e) { Log.Write("EXCEPTION AT \"CMD\":\n" + e.ToString(), nLog.Type.Error); }
}