Move the report commands into exp_reports

The create-report, get-reports and clear-reports commands now live in the
plugin's own module next to the functions they call, with their locale.
The permissions keep their exp_scenario.command names because the command
authority derives them from the command name.

The Discord report alert in exp_scenario is gone since exp_reports posts to
its own webhook. The shared add_player stub takes an options table with
connected and admin defaulting to true and false, replacing the copy in
the exp_reports test environment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-09-26 23:22:18 +00:00
1 parent e47f41d440
commit 9ddb7b362b
20 files changed
+95 -155

No files matched your search

@@ -97,40 +97,6 @@ if config.entity_protection then
end
end
--- Reports added and removed
if config.player_reports then
local Reports = require("modules/exp_reports")
--- @param event EventData.ExpReports.on_player_reported
events[Reports.on_player_reported] = function(event)
local player_name, by_player_name = get_player_name(event)
emit_event{
title = "Report",
description = "A player was reported",
color = Colors.yellow,
fields = {
{ name = "Player", inline = true, value = append_playtime(player_name) },
{ name = "By", inline = true, value = append_playtime(by_player_name) },
{ name = "Report Count", inline = true, value = tostring(event.report_count) },
{ name = "Reason", value = event.reason },
},
}
end
--- @param event EventData.ExpReports.on_reports_deleted
events[Reports.on_reports_deleted] = function(event)
local player_name, by_player_name = get_player_name(event)
emit_event{
title = "Reports Removed",
description = "A player has reports removed",
color = Colors.green,
fields = {
{ name = "Player", inline = true, value = append_playtime(player_name) },
{ name = "By", inline = true, value = append_playtime(by_player_name) },
{ name = "Report Count", inline = true, value = tostring(event.count) },
},
}
end
end
--- When a player is jailed or unjailed
if config.player_jail then
local Jail = require("modules/exp_scenario/control/jail")