diff --git a/config/_file_loader.lua b/config/_file_loader.lua index ab25db07..021530ff 100644 --- a/config/_file_loader.lua +++ b/config/_file_loader.lua @@ -44,6 +44,7 @@ return { 'modules.addons.chat-reply', 'modules.addons.tree-decon', 'modules.addons.afk-kick', + 'modules.addons.report-jail', --- Data 'modules.data.statistics', diff --git a/config/gui/player_list_actions.lua b/config/gui/player_list_actions.lua index 1464a1d3..411d2395 100644 --- a/config/gui/player_list_actions.lua +++ b/config/gui/player_list_actions.lua @@ -173,6 +173,7 @@ return { }, ['command/report'] = { auth=function(player,selected_player) + if player == selected_player then return false end if not Roles.player_allowed(player,'command/give-warning') then return not Roles.player_has_flag(selected_player,'report-immune') end diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html index b62dd959..f7f66160 100644 --- a/docs/addons/Advanced-Start.html +++ b/docs/addons/Advanced-Start.html @@ -58,6 +58,7 @@ + @@ -339,7 +340,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Popups.html b/docs/addons/Chat-Popups.html index 5861d4d0..74e5bec8 100644 --- a/docs/addons/Chat-Popups.html +++ b/docs/addons/Chat-Popups.html @@ -58,6 +58,7 @@ + @@ -368,7 +369,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Reply.html b/docs/addons/Chat-Reply.html index e2bf36a4..864f2951 100644 --- a/docs/addons/Chat-Reply.html +++ b/docs/addons/Chat-Reply.html @@ -58,6 +58,7 @@ + @@ -367,7 +368,7 @@ generated by LDoc diff --git a/docs/addons/Compilatron.html b/docs/addons/Compilatron.html index 69224680..72beaabd 100644 --- a/docs/addons/Compilatron.html +++ b/docs/addons/Compilatron.html @@ -59,6 +59,7 @@ + @@ -576,7 +577,7 @@ generated by LDoc diff --git a/docs/addons/Damage-Popups.html b/docs/addons/Damage-Popups.html index 6955befe..ca68d871 100644 --- a/docs/addons/Damage-Popups.html +++ b/docs/addons/Damage-Popups.html @@ -58,6 +58,7 @@ + @@ -368,7 +369,7 @@ generated by LDoc diff --git a/docs/addons/Death-Logger.html b/docs/addons/Death-Logger.html index 0677b4da..d6fd79af 100644 --- a/docs/addons/Death-Logger.html +++ b/docs/addons/Death-Logger.html @@ -58,6 +58,7 @@ + @@ -395,7 +396,7 @@ generated by LDoc diff --git a/docs/addons/Discord-Alerts.html b/docs/addons/Discord-Alerts.html index 3e6f1bb9..1727870e 100644 --- a/docs/addons/Discord-Alerts.html +++ b/docs/addons/Discord-Alerts.html @@ -58,6 +58,7 @@ + @@ -451,7 +452,7 @@ generated by LDoc diff --git a/docs/addons/Inventory-Clear.html b/docs/addons/Inventory-Clear.html index 734c51e9..8c0d96d3 100644 --- a/docs/addons/Inventory-Clear.html +++ b/docs/addons/Inventory-Clear.html @@ -58,6 +58,7 @@ + @@ -367,7 +368,7 @@ generated by LDoc diff --git a/docs/addons/Pollution-Grading.html b/docs/addons/Pollution-Grading.html index 8812ea83..7893b96a 100644 --- a/docs/addons/Pollution-Grading.html +++ b/docs/addons/Pollution-Grading.html @@ -58,6 +58,7 @@ + @@ -339,7 +340,7 @@ generated by LDoc diff --git a/docs/addons/Scorched-Earth.html b/docs/addons/Scorched-Earth.html index 8f660516..5959357d 100644 --- a/docs/addons/Scorched-Earth.html +++ b/docs/addons/Scorched-Earth.html @@ -58,6 +58,7 @@ + @@ -395,7 +396,7 @@ generated by LDoc diff --git a/docs/addons/Spawn-Area.html b/docs/addons/Spawn-Area.html index d251cbb4..60cdd160 100644 --- a/docs/addons/Spawn-Area.html +++ b/docs/addons/Spawn-Area.html @@ -58,6 +58,7 @@ + @@ -367,7 +368,7 @@ generated by LDoc diff --git a/docs/addons/Tree-Decon.html b/docs/addons/Tree-Decon.html index dcde4cfc..51bfc978 100644 --- a/docs/addons/Tree-Decon.html +++ b/docs/addons/Tree-Decon.html @@ -58,6 +58,7 @@ + @@ -367,7 +368,7 @@ generated by LDoc diff --git a/docs/addons/report-jail.html b/docs/addons/report-jail.html new file mode 100644 index 00000000..f6a3811c --- /dev/null +++ b/docs/addons/report-jail.html @@ -0,0 +1,404 @@ + + + + + + + + report-jail addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

report-jail addon

+

When a player is reported, the player is automatically jailed if the combined playtime of the reporters exceeds the reported player

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
utils.event
modules.control.jail
modules.control.reports
expcore.common
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.jail +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.reports +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/docs/commands/Admin-Chat.html b/docs/commands/Admin-Chat.html index 9bf03f9c..a4ab1de9 100644 --- a/docs/commands/Admin-Chat.html +++ b/docs/commands/Admin-Chat.html @@ -116,6 +116,7 @@ + @@ -407,7 +408,7 @@ generated by LDoc diff --git a/docs/commands/Cheat-Mode.html b/docs/commands/Cheat-Mode.html index 79e6ee70..75853159 100644 --- a/docs/commands/Cheat-Mode.html +++ b/docs/commands/Cheat-Mode.html @@ -116,6 +116,7 @@ + @@ -380,7 +381,7 @@ generated by LDoc diff --git a/docs/commands/Clear-Inventory.html b/docs/commands/Clear-Inventory.html index fba6417c..304ecde8 100644 --- a/docs/commands/Clear-Inventory.html +++ b/docs/commands/Clear-Inventory.html @@ -116,6 +116,7 @@ + @@ -407,7 +408,7 @@ generated by LDoc diff --git a/docs/commands/Connect.html b/docs/commands/Connect.html index eae14a23..310c4bf1 100644 --- a/docs/commands/Connect.html +++ b/docs/commands/Connect.html @@ -116,6 +116,7 @@ + @@ -610,7 +611,7 @@ generated by LDoc diff --git a/docs/commands/Debug.html b/docs/commands/Debug.html index 2b1bb784..44494919 100644 --- a/docs/commands/Debug.html +++ b/docs/commands/Debug.html @@ -116,6 +116,7 @@ + @@ -384,7 +385,7 @@ generated by LDoc diff --git a/docs/commands/Find.html b/docs/commands/Find.html index e4341044..b511b11e 100644 --- a/docs/commands/Find.html +++ b/docs/commands/Find.html @@ -116,6 +116,7 @@ + @@ -379,7 +380,7 @@ generated by LDoc diff --git a/docs/commands/Help.html b/docs/commands/Help.html index 6876336b..d88b626a 100644 --- a/docs/commands/Help.html +++ b/docs/commands/Help.html @@ -116,6 +116,7 @@ + @@ -423,7 +424,7 @@ generated by LDoc diff --git a/docs/commands/Home.html b/docs/commands/Home.html index 18886b70..92aa01c9 100644 --- a/docs/commands/Home.html +++ b/docs/commands/Home.html @@ -116,6 +116,7 @@ + @@ -477,7 +478,7 @@ generated by LDoc diff --git a/docs/commands/Interface.html b/docs/commands/Interface.html index 6ebfa2c2..33e44d9f 100644 --- a/docs/commands/Interface.html +++ b/docs/commands/Interface.html @@ -116,6 +116,7 @@ + @@ -407,7 +408,7 @@ generated by LDoc diff --git a/docs/commands/Jail.html b/docs/commands/Jail.html index a8963e20..b3fbf5d9 100644 --- a/docs/commands/Jail.html +++ b/docs/commands/Jail.html @@ -116,6 +116,7 @@ + @@ -506,7 +507,7 @@ generated by LDoc diff --git a/docs/commands/Kill.html b/docs/commands/Kill.html index b34f0fe7..104939e6 100644 --- a/docs/commands/Kill.html +++ b/docs/commands/Kill.html @@ -116,6 +116,7 @@ + @@ -408,7 +409,7 @@ generated by LDoc diff --git a/docs/commands/LastLocation.html b/docs/commands/LastLocation.html index 15b25e8d..794e8981 100644 --- a/docs/commands/LastLocation.html +++ b/docs/commands/LastLocation.html @@ -116,6 +116,7 @@ + @@ -407,7 +408,7 @@ generated by LDoc diff --git a/docs/commands/Me.html b/docs/commands/Me.html index 7bbe7210..f25b29b2 100644 --- a/docs/commands/Me.html +++ b/docs/commands/Me.html @@ -116,6 +116,7 @@ + @@ -379,7 +380,7 @@ generated by LDoc diff --git a/docs/commands/Rainbow.html b/docs/commands/Rainbow.html index 2dfc01be..e64ca24e 100644 --- a/docs/commands/Rainbow.html +++ b/docs/commands/Rainbow.html @@ -116,6 +116,7 @@ + @@ -407,7 +408,7 @@ generated by LDoc diff --git a/docs/commands/Repair.html b/docs/commands/Repair.html index b2778e55..f0c657de 100644 --- a/docs/commands/Repair.html +++ b/docs/commands/Repair.html @@ -115,6 +115,7 @@ + @@ -340,7 +341,7 @@ generated by LDoc diff --git a/docs/commands/Reports.html b/docs/commands/Reports.html index e5ae8f0b..ed7038dc 100644 --- a/docs/commands/Reports.html +++ b/docs/commands/Reports.html @@ -116,6 +116,7 @@ + @@ -604,7 +605,7 @@ generated by LDoc diff --git a/docs/commands/Roles.html b/docs/commands/Roles.html index 5db0a7fa..cdf9ddac 100644 --- a/docs/commands/Roles.html +++ b/docs/commands/Roles.html @@ -116,6 +116,7 @@ + @@ -576,7 +577,7 @@ generated by LDoc diff --git a/docs/commands/Spawn.html b/docs/commands/Spawn.html index a7299c52..66ab23b8 100644 --- a/docs/commands/Spawn.html +++ b/docs/commands/Spawn.html @@ -116,6 +116,7 @@ + @@ -408,7 +409,7 @@ generated by LDoc diff --git a/docs/commands/Teleport.html b/docs/commands/Teleport.html index 2af6baa2..dfb65927 100644 --- a/docs/commands/Teleport.html +++ b/docs/commands/Teleport.html @@ -116,6 +116,7 @@ + @@ -503,7 +504,7 @@ generated by LDoc diff --git a/docs/commands/Warnings.html b/docs/commands/Warnings.html index 404aa1ed..cf32fee0 100644 --- a/docs/commands/Warnings.html +++ b/docs/commands/Warnings.html @@ -116,6 +116,7 @@ + @@ -588,7 +589,7 @@ generated by LDoc diff --git a/docs/configs/Advanced-Start.html b/docs/configs/Advanced-Start.html index f7af78ae..45c2f1fe 100644 --- a/docs/configs/Advanced-Start.html +++ b/docs/configs/Advanced-Start.html @@ -126,6 +126,7 @@ + @@ -525,7 +526,7 @@ generated by LDoc diff --git a/docs/configs/Autofill.html b/docs/configs/Autofill.html index b38d938e..69244366 100644 --- a/docs/configs/Autofill.html +++ b/docs/configs/Autofill.html @@ -118,6 +118,7 @@ + @@ -256,7 +257,7 @@ generated by LDoc diff --git a/docs/configs/Bonuses.html b/docs/configs/Bonuses.html index e3d2d9d7..e26c06b1 100644 --- a/docs/configs/Bonuses.html +++ b/docs/configs/Bonuses.html @@ -118,6 +118,7 @@ + @@ -256,7 +257,7 @@ generated by LDoc diff --git a/docs/configs/Chat-Reply.html b/docs/configs/Chat-Reply.html index 7a094e75..763e0677 100644 --- a/docs/configs/Chat-Reply.html +++ b/docs/configs/Chat-Reply.html @@ -127,6 +127,7 @@ + @@ -504,7 +505,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Admin.html b/docs/configs/Commands-Auth-Admin.html index 6edcf8ee..1657b153 100644 --- a/docs/configs/Commands-Auth-Admin.html +++ b/docs/configs/Commands-Auth-Admin.html @@ -126,6 +126,7 @@ + @@ -313,7 +314,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Roles.html b/docs/configs/Commands-Auth-Roles.html index 840311bd..aff2ff67 100644 --- a/docs/configs/Commands-Auth-Roles.html +++ b/docs/configs/Commands-Auth-Roles.html @@ -126,6 +126,7 @@ + @@ -339,7 +340,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Runtime-Disable.html b/docs/configs/Commands-Auth-Runtime-Disable.html index 170ea66f..6c3d1bc2 100644 --- a/docs/configs/Commands-Auth-Runtime-Disable.html +++ b/docs/configs/Commands-Auth-Runtime-Disable.html @@ -127,6 +127,7 @@ + @@ -461,7 +462,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Color-Parse.html b/docs/configs/Commands-Color-Parse.html index 5513f936..7931b116 100644 --- a/docs/configs/Commands-Color-Parse.html +++ b/docs/configs/Commands-Color-Parse.html @@ -126,6 +126,7 @@ + @@ -339,7 +340,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse-Roles.html b/docs/configs/Commands-Parse-Roles.html index db5ad30d..c2b9ed56 100644 --- a/docs/configs/Commands-Parse-Roles.html +++ b/docs/configs/Commands-Parse-Roles.html @@ -126,6 +126,7 @@ + @@ -373,7 +374,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse.html b/docs/configs/Commands-Parse.html index 9a96e039..dda8f62a 100644 --- a/docs/configs/Commands-Parse.html +++ b/docs/configs/Commands-Parse.html @@ -126,6 +126,7 @@ + @@ -329,7 +330,7 @@ see ./expcore/commands.lua for more details

generated by LDoc diff --git a/docs/configs/Compilatron.html b/docs/configs/Compilatron.html index c0b03819..35971c09 100644 --- a/docs/configs/Compilatron.html +++ b/docs/configs/Compilatron.html @@ -126,6 +126,7 @@ + @@ -373,7 +374,7 @@ generated by LDoc diff --git a/docs/configs/Death-Logger.html b/docs/configs/Death-Logger.html index 88d08f8e..163cc1fa 100644 --- a/docs/configs/Death-Logger.html +++ b/docs/configs/Death-Logger.html @@ -126,6 +126,7 @@ + @@ -495,7 +496,7 @@ generated by LDoc diff --git a/docs/configs/Discord-Alerts.html b/docs/configs/Discord-Alerts.html index 78470816..e353b0d9 100644 --- a/docs/configs/Discord-Alerts.html +++ b/docs/configs/Discord-Alerts.html @@ -118,6 +118,7 @@ + @@ -256,7 +257,7 @@ generated by LDoc diff --git a/docs/configs/File-Loader.html b/docs/configs/File-Loader.html index 0466c354..6783eec4 100644 --- a/docs/configs/File-Loader.html +++ b/docs/configs/File-Loader.html @@ -118,6 +118,7 @@ + @@ -259,7 +260,7 @@ generated by LDoc diff --git a/docs/configs/Permission-Groups.html b/docs/configs/Permission-Groups.html index aac8ca69..a3d2c0bd 100644 --- a/docs/configs/Permission-Groups.html +++ b/docs/configs/Permission-Groups.html @@ -126,6 +126,7 @@ + @@ -314,7 +315,7 @@ generated by LDoc diff --git a/docs/configs/Player-List.html b/docs/configs/Player-List.html index 3ec3d496..d0659ab4 100644 --- a/docs/configs/Player-List.html +++ b/docs/configs/Player-List.html @@ -127,6 +127,7 @@ + @@ -713,7 +714,7 @@ generated by LDoc diff --git a/docs/configs/Pollution-Grading.html b/docs/configs/Pollution-Grading.html index eaee8194..426e5615 100644 --- a/docs/configs/Pollution-Grading.html +++ b/docs/configs/Pollution-Grading.html @@ -126,6 +126,7 @@ + @@ -403,7 +404,7 @@ generated by LDoc diff --git a/docs/configs/Popup-Messages.html b/docs/configs/Popup-Messages.html index f0aac964..e1e91396 100644 --- a/docs/configs/Popup-Messages.html +++ b/docs/configs/Popup-Messages.html @@ -126,6 +126,7 @@ + @@ -433,7 +434,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Colours.html b/docs/configs/Preset-Player-Colours.html index 23f1aea2..a06f7144 100644 --- a/docs/configs/Preset-Player-Colours.html +++ b/docs/configs/Preset-Player-Colours.html @@ -126,6 +126,7 @@ + @@ -343,7 +344,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Quickbar.html b/docs/configs/Preset-Player-Quickbar.html index a2054c12..c5e4c1d7 100644 --- a/docs/configs/Preset-Player-Quickbar.html +++ b/docs/configs/Preset-Player-Quickbar.html @@ -118,6 +118,7 @@ + @@ -256,7 +257,7 @@ generated by LDoc diff --git a/docs/configs/Repair.html b/docs/configs/Repair.html index 399c537e..eb513462 100644 --- a/docs/configs/Repair.html +++ b/docs/configs/Repair.html @@ -126,6 +126,7 @@ + @@ -433,7 +434,7 @@ generated by LDoc diff --git a/docs/configs/Rockets.html b/docs/configs/Rockets.html index 89039cd8..d51d23a4 100644 --- a/docs/configs/Rockets.html +++ b/docs/configs/Rockets.html @@ -126,6 +126,7 @@ + @@ -853,7 +854,7 @@ generated by LDoc diff --git a/docs/configs/Roles.html b/docs/configs/Roles.html index bc04132d..43b2ffe0 100644 --- a/docs/configs/Roles.html +++ b/docs/configs/Roles.html @@ -126,6 +126,7 @@ + @@ -339,7 +340,7 @@ generated by LDoc diff --git a/docs/configs/Science.html b/docs/configs/Science.html index dad68e6d..5a86421c 100644 --- a/docs/configs/Science.html +++ b/docs/configs/Science.html @@ -126,6 +126,7 @@ + @@ -373,7 +374,7 @@ generated by LDoc diff --git a/docs/configs/Scorched-Earth.html b/docs/configs/Scorched-Earth.html index aa6fd5c3..81fdfd50 100644 --- a/docs/configs/Scorched-Earth.html +++ b/docs/configs/Scorched-Earth.html @@ -126,6 +126,7 @@ + @@ -407,7 +408,7 @@ generated by LDoc diff --git a/docs/configs/Spawn-Area.html b/docs/configs/Spawn-Area.html index 76427713..1bc54cb0 100644 --- a/docs/configs/Spawn-Area.html +++ b/docs/configs/Spawn-Area.html @@ -126,6 +126,7 @@ + @@ -763,7 +764,7 @@ generated by LDoc diff --git a/docs/configs/Statistics.html b/docs/configs/Statistics.html index 70645968..f741bea8 100644 --- a/docs/configs/Statistics.html +++ b/docs/configs/Statistics.html @@ -126,6 +126,7 @@ + @@ -673,7 +674,7 @@ generated by LDoc diff --git a/docs/configs/Tasks.html b/docs/configs/Tasks.html index adb865b8..0163516c 100644 --- a/docs/configs/Tasks.html +++ b/docs/configs/Tasks.html @@ -126,6 +126,7 @@ + @@ -403,7 +404,7 @@ generated by LDoc diff --git a/docs/configs/Warnings.html b/docs/configs/Warnings.html index acd91678..f7d19156 100644 --- a/docs/configs/Warnings.html +++ b/docs/configs/Warnings.html @@ -126,6 +126,7 @@ + @@ -374,7 +375,7 @@ generated by LDoc diff --git a/docs/configs/Warps.html b/docs/configs/Warps.html index 5bacd8c8..47048f2e 100644 --- a/docs/configs/Warps.html +++ b/docs/configs/Warps.html @@ -126,6 +126,7 @@ + @@ -763,7 +764,7 @@ generated by LDoc diff --git a/docs/configs/inventory_clear.html b/docs/configs/inventory_clear.html index 9497b71d..2b2204d6 100644 --- a/docs/configs/inventory_clear.html +++ b/docs/configs/inventory_clear.html @@ -118,6 +118,7 @@ + @@ -256,7 +257,7 @@ generated by LDoc diff --git a/docs/control/Jail.html b/docs/control/Jail.html index b2f2420e..54ba2a0d 100644 --- a/docs/control/Jail.html +++ b/docs/control/Jail.html @@ -90,6 +90,7 @@ + @@ -794,7 +795,7 @@ generated by LDoc diff --git a/docs/control/Production.html b/docs/control/Production.html index cb71aa34..58bdc515 100644 --- a/docs/control/Production.html +++ b/docs/control/Production.html @@ -91,6 +91,7 @@ + @@ -1348,7 +1349,7 @@ generated by LDoc diff --git a/docs/control/Reports.html b/docs/control/Reports.html index debbe7b8..ad799b41 100644 --- a/docs/control/Reports.html +++ b/docs/control/Reports.html @@ -91,6 +91,7 @@ + @@ -1161,7 +1162,7 @@ generated by LDoc diff --git a/docs/control/Rockets.html b/docs/control/Rockets.html index fef9f127..9949b96c 100644 --- a/docs/control/Rockets.html +++ b/docs/control/Rockets.html @@ -90,6 +90,7 @@ + @@ -1003,7 +1004,7 @@ generated by LDoc diff --git a/docs/control/Tasks.html b/docs/control/Tasks.html index 838848d5..2eabebf0 100644 --- a/docs/control/Tasks.html +++ b/docs/control/Tasks.html @@ -90,6 +90,7 @@ + @@ -989,7 +990,7 @@ Tasks.update_task(task_id, 'We need more iron!', gam generated by LDoc diff --git a/docs/control/Warnings.html b/docs/control/Warnings.html index ec5efad8..4b7b141e 100644 --- a/docs/control/Warnings.html +++ b/docs/control/Warnings.html @@ -90,6 +90,7 @@ + @@ -1544,7 +1545,7 @@ generated by LDoc diff --git a/docs/control/Warps.html b/docs/control/Warps.html index a5a87d24..46929dd4 100644 --- a/docs/control/Warps.html +++ b/docs/control/Warps.html @@ -91,6 +91,7 @@ + @@ -1526,7 +1527,7 @@ Warps.make_warp_tag(warp_id) generated by LDoc diff --git a/docs/core/Async.html b/docs/core/Async.html index 93104ae7..ff038ac2 100644 --- a/docs/core/Async.html +++ b/docs/core/Async.html @@ -89,6 +89,7 @@ + @@ -617,7 +618,7 @@ Async.register(function(player, message) generated by LDoc diff --git a/docs/core/Commands.html b/docs/core/Commands.html index 6b1c6b75..0578e73f 100644 --- a/docs/core/Commands.html +++ b/docs/core/Commands.html @@ -95,6 +95,7 @@ + @@ -2432,7 +2433,7 @@ nb: use error(error_message) within your callback to trigger do not trigger dire generated by LDoc diff --git a/docs/core/Common.html b/docs/core/Common.html index f9323565..f659cf9d 100644 --- a/docs/core/Common.html +++ b/docs/core/Common.html @@ -92,6 +92,7 @@ + @@ -2771,7 +2772,7 @@ https://github.com/Refactorio/RedMew/blob/9184b2940f311d8c9c891e83429fc57ec7e0c4 generated by LDoc diff --git a/docs/core/Datastore.html b/docs/core/Datastore.html index 93d5f6b3..b574f4aa 100644 --- a/docs/core/Datastore.html +++ b/docs/core/Datastore.html @@ -94,6 +94,7 @@ + @@ -2968,7 +2969,7 @@ ExampleData:on_update(function(key, value) generated by LDoc diff --git a/docs/core/External.html b/docs/core/External.html index 327ee365..7d71a851 100644 --- a/docs/core/External.html +++ b/docs/core/External.html @@ -88,6 +88,7 @@ + @@ -752,7 +753,7 @@ generated by LDoc diff --git a/docs/core/Groups.html b/docs/core/Groups.html index 3abf51b5..dfd350fa 100644 --- a/docs/core/Groups.html +++ b/docs/core/Groups.html @@ -92,6 +92,7 @@ + @@ -1447,7 +1448,7 @@ generated by LDoc diff --git a/docs/core/Gui.html b/docs/core/Gui.html index 9746c3d9..7aaa61de 100644 --- a/docs/core/Gui.html +++ b/docs/core/Gui.html @@ -97,6 +97,7 @@ + @@ -4425,7 +4426,7 @@ Gui.left_toolbar_button('entity/inserter', generated by LDoc diff --git a/docs/core/PlayerData.html b/docs/core/PlayerData.html index 055161d8..70019853 100644 --- a/docs/core/PlayerData.html +++ b/docs/core/PlayerData.html @@ -89,6 +89,7 @@ + @@ -535,7 +536,7 @@ generated by LDoc diff --git a/docs/core/Roles.html b/docs/core/Roles.html index 39e0589e..2b04c7bb 100644 --- a/docs/core/Roles.html +++ b/docs/core/Roles.html @@ -96,6 +96,7 @@ + @@ -3395,7 +3396,7 @@ nb: this is one way, failing false after already gaining the role will not revok generated by LDoc diff --git a/docs/data/Alt-View.html b/docs/data/Alt-View.html index ee809c01..c231c94e 100644 --- a/docs/data/Alt-View.html +++ b/docs/data/Alt-View.html @@ -101,6 +101,7 @@ + @@ -339,7 +340,7 @@ generated by LDoc diff --git a/docs/data/Bonus.html b/docs/data/Bonus.html index 89c36a3d..8d90fd77 100644 --- a/docs/data/Bonus.html +++ b/docs/data/Bonus.html @@ -102,6 +102,7 @@ + @@ -491,7 +492,7 @@ generated by LDoc diff --git a/docs/data/Greetings.html b/docs/data/Greetings.html index 2917e505..4a4495bf 100644 --- a/docs/data/Greetings.html +++ b/docs/data/Greetings.html @@ -102,6 +102,7 @@ + @@ -434,7 +435,7 @@ generated by LDoc diff --git a/docs/data/Player-Colours.html b/docs/data/Player-Colours.html index baf38502..0a04403d 100644 --- a/docs/data/Player-Colours.html +++ b/docs/data/Player-Colours.html @@ -101,6 +101,7 @@ + @@ -395,7 +396,7 @@ generated by LDoc diff --git a/docs/data/Quickbar.html b/docs/data/Quickbar.html index 85624765..4facb875 100644 --- a/docs/data/Quickbar.html +++ b/docs/data/Quickbar.html @@ -102,6 +102,7 @@ + @@ -412,7 +413,7 @@ generated by LDoc diff --git a/docs/data/Tag.html b/docs/data/Tag.html index b342482d..f45fb6cc 100644 --- a/docs/data/Tag.html +++ b/docs/data/Tag.html @@ -102,6 +102,7 @@ + @@ -544,7 +545,7 @@ generated by LDoc diff --git a/docs/guis/Autofill.html b/docs/guis/Autofill.html index 8b77309f..029c5249 100644 --- a/docs/guis/Autofill.html +++ b/docs/guis/Autofill.html @@ -103,6 +103,7 @@ + @@ -596,7 +597,7 @@ generated by LDoc diff --git a/docs/guis/Player-List.html b/docs/guis/Player-List.html index b834cfa4..47f1870c 100644 --- a/docs/guis/Player-List.html +++ b/docs/guis/Player-List.html @@ -104,6 +104,7 @@ + @@ -710,7 +711,7 @@ generated by LDoc diff --git a/docs/guis/Readme.html b/docs/guis/Readme.html index 81845674..9509042b 100644 --- a/docs/guis/Readme.html +++ b/docs/guis/Readme.html @@ -106,6 +106,7 @@ + @@ -1002,7 +1003,7 @@ generated by LDoc diff --git a/docs/guis/Rocket-Info.html b/docs/guis/Rocket-Info.html index 3c863486..1d9f05e2 100644 --- a/docs/guis/Rocket-Info.html +++ b/docs/guis/Rocket-Info.html @@ -104,6 +104,7 @@ + @@ -710,7 +711,7 @@ generated by LDoc diff --git a/docs/guis/Science-Info.html b/docs/guis/Science-Info.html index 4d9c887e..728571cd 100644 --- a/docs/guis/Science-Info.html +++ b/docs/guis/Science-Info.html @@ -104,6 +104,7 @@ + @@ -589,7 +590,7 @@ generated by LDoc diff --git a/docs/guis/Task-List.html b/docs/guis/Task-List.html index 0907dccf..7280c095 100644 --- a/docs/guis/Task-List.html +++ b/docs/guis/Task-List.html @@ -104,6 +104,7 @@ + @@ -775,7 +776,7 @@ generated by LDoc diff --git a/docs/guis/Warps-List.html b/docs/guis/Warps-List.html index 9bb27b18..239cada4 100644 --- a/docs/guis/Warps-List.html +++ b/docs/guis/Warps-List.html @@ -105,6 +105,7 @@ + @@ -1079,7 +1080,7 @@ generated by LDoc diff --git a/docs/guis/server-ups.html b/docs/guis/server-ups.html index 5386875a..b082a184 100644 --- a/docs/guis/server-ups.html +++ b/docs/guis/server-ups.html @@ -105,6 +105,7 @@ + @@ -512,7 +513,7 @@ generated by LDoc diff --git a/docs/index.html b/docs/index.html index a97d766d..b4fb6e60 100644 --- a/docs/index.html +++ b/docs/index.html @@ -169,6 +169,10 @@ Makes polution look much nice of the map, ie not one big red mess + report-jail + When a player is reported, the player is automatically jailed if the combined playtime of the reporters exceeds the reported player + + Scorched-Earth When a player walks around the tiles under them will degrade over time, the same is true when entites are built @@ -568,7 +572,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/control.html b/docs/modules/control.html index 4bb056ec..24127bcf 100644 --- a/docs/modules/control.html +++ b/docs/modules/control.html @@ -103,6 +103,7 @@ + @@ -314,7 +315,7 @@ generated by LDoc diff --git a/docs/modules/modules.addons.station-auto-name.html b/docs/modules/modules.addons.station-auto-name.html index 60d03685..6d7f134f 100644 --- a/docs/modules/modules.addons.station-auto-name.html +++ b/docs/modules/modules.addons.station-auto-name.html @@ -103,6 +103,7 @@ + @@ -312,7 +313,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/overrides.debug.html b/docs/modules/overrides.debug.html index 89ef0142..460563a7 100644 --- a/docs/modules/overrides.debug.html +++ b/docs/modules/overrides.debug.html @@ -103,6 +103,7 @@ + @@ -673,7 +674,7 @@ generated by LDoc diff --git a/docs/modules/overrides.math.html b/docs/modules/overrides.math.html index b682543e..276f4010 100644 --- a/docs/modules/overrides.math.html +++ b/docs/modules/overrides.math.html @@ -103,6 +103,7 @@ + @@ -372,7 +373,7 @@ generated by LDoc diff --git a/docs/modules/overrides.table.html b/docs/modules/overrides.table.html index 965c6ce9..4a5dd48d 100644 --- a/docs/modules/overrides.table.html +++ b/docs/modules/overrides.table.html @@ -105,6 +105,7 @@ + @@ -2027,7 +2028,7 @@ generated by LDoc diff --git a/docs/modules/utils.event.html b/docs/modules/utils.event.html index 625cd0a4..ec1f10e7 100644 --- a/docs/modules/utils.event.html +++ b/docs/modules/utils.event.html @@ -104,6 +104,7 @@ + @@ -1311,7 +1312,7 @@ generated by LDoc diff --git a/docs/modules/utils.event_core.html b/docs/modules/utils.event_core.html index 3c24319c..cc5a8c6f 100644 --- a/docs/modules/utils.event_core.html +++ b/docs/modules/utils.event_core.html @@ -103,6 +103,7 @@ + @@ -453,7 +454,7 @@ generated by LDoc diff --git a/docs/modules/utils.task.html b/docs/modules/utils.task.html index a96d56bd..1b819912 100644 --- a/docs/modules/utils.task.html +++ b/docs/modules/utils.task.html @@ -104,6 +104,7 @@ + @@ -670,7 +671,7 @@ generated by LDoc diff --git a/docs/topics/LICENSE.html b/docs/topics/LICENSE.html index 89e758f0..7b05b500 100644 --- a/docs/topics/LICENSE.html +++ b/docs/topics/LICENSE.html @@ -89,6 +89,7 @@ + @@ -808,7 +809,7 @@ Public License instead of this License. But first, please read generated by LDoc diff --git a/docs/topics/README.md.html b/docs/topics/README.md.html index f2e7abc3..d723a3ec 100644 --- a/docs/topics/README.md.html +++ b/docs/topics/README.md.html @@ -89,6 +89,7 @@ + @@ -363,7 +364,7 @@ Please report these errors to [the issues page](issues). generated by LDoc diff --git a/locale/en/addons.cfg b/locale/en/addons.cfg index af26b91a..10e98500 100644 --- a/locale/en/addons.cfg +++ b/locale/en/addons.cfg @@ -78,4 +78,7 @@ get-beer-2= 🍻 Chears Mate 🍻 verify=Please return to our discord and type r!verify __1__ [afk-kick] -message=All players were kicked because everyone was AFK. \ No newline at end of file +message=All players were kicked because everyone was AFK. + +[report-jail] +jail=__1__ was jailed because they were reported too many times. diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg index dea7b935..3aea89ed 100644 --- a/locale/en/commands.cfg +++ b/locale/en/commands.cfg @@ -29,6 +29,7 @@ not-jailed=__1__ is not currently in jail. [expcom-report] player-immune=This player can not be reported. +self-report=You cannot report yourself. non-admin=__1__ was reported for __2__. admin=__1__ was reported by __2__ for __3__. already-reported=You can only report a player once, you can ask a moderator to clear this report. diff --git a/modules/addons/report-jail.lua b/modules/addons/report-jail.lua new file mode 100644 index 00000000..f9211993 --- /dev/null +++ b/modules/addons/report-jail.lua @@ -0,0 +1,25 @@ +--- When a player is reported, the player is automatically jailed if the combined playtime of the reporters exceeds the reported player +-- @addon report-jail + +local Event = require 'utils.event' ---@dep utils.event +local Jail = require 'modules.control.jail' ---@dep modules.control.jail +local Reports = require 'modules.control.reports' --- @dep modules.control.reports +local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common + +--- Returns the playtime of the reporter. Used when calculating the total playtime of all reporters +local function reporter_playtime(_, by_player_name, _) + local player = game.get_player(by_player_name) + if player == nil then return 0 end + return player.online_time +end + +--- Tests the combined playtime of all reporters against the reported player +Event.add(Reports.events.on_player_reported, function(event) + local player = game.get_player(event.player_index) + local total_playtime = Reports.count_reports(player, reporter_playtime) + if total_playtime < player.online_time*1.5 then return end + -- Combined playtime is greater than 150% of the reported's playtime + local player_name_color = format_chat_player_name(player) + Jail.jail_player(player, '', 'Reported by too many players, please wait for a moderator.') + game.print{'report-jail.jail', player_name_color} +end) \ No newline at end of file diff --git a/modules/commands/reports.lua b/modules/commands/reports.lua index 00aff1b2..6609189e 100644 --- a/modules/commands/reports.lua +++ b/modules/commands/reports.lua @@ -9,6 +9,15 @@ local Reports = require 'modules.control.reports' --- @dep modules.control.repor local format_chat_player_name = _C.format_chat_player_name--- @dep expcore.common require 'config.expcore.command_general_parse' +--- Print a message to all players who match the value of admin +local function print_to_players(admin, message) + for _, player in ipairs(game.connected_players) do + if player.admin == admin then + player.print(message) + end + end +end + --- Reports a player and notifies moderators -- @command report -- @tparam LuaPlayer player the player to report, some players are immune @@ -19,6 +28,8 @@ Commands.new_command('report', 'Reports a player and notifies moderators') if not input then return end if Roles.player_has_flag(input, 'report-immune') then return reject{'expcom-report.player-immune'} + elseif player == input then + return reject{'expcom-report.self-report'} else return input end @@ -30,8 +41,8 @@ end) local action_player_name_color = format_chat_player_name(action_player) local by_player_name_color = format_chat_player_name(player) if Reports.report_player(action_player, player.name, reason) then - game.print{'expcom-report.non-admin', action_player_name_color, reason} - Roles.print_to_roles_higher('Trainee', {'expcom-report.admin', action_player_name_color, by_player_name_color, reason}) + print_to_players(false, {'expcom-report.non-admin', action_player_name_color, reason}) + print_to_players(true, {'expcom-report.admin', action_player_name_color, by_player_name_color, reason}) else return Commands.error{'expcom-report.already-reported'} end diff --git a/modules/control/reports.lua b/modules/control/reports.lua index ea2a710f..62d3bea7 100644 --- a/modules/control/reports.lua +++ b/modules/control/reports.lua @@ -132,7 +132,7 @@ function Reports.report_player(player, by_player_name, reason) if not player then return end local player_name = player.name - reason = reason or 'Non given.' + if reason == nil or not reason:find("/S") then reason = 'No reason given' end local reports = user_reports[player_name] if not reports then diff --git a/modules/gui/player-list.lua b/modules/gui/player-list.lua index f0923073..8d273a5f 100644 --- a/modules/gui/player-list.lua +++ b/modules/gui/player-list.lua @@ -72,9 +72,10 @@ Gui.element{ } :style(Gui.sprite_style(30, -1, { left_margin = -2, right_margin = -1 })) :on_click(function(player, element) - local reason = element.parent.entry.text or 'Non Given' + local reason = element.parent.entry.text local action_name = SelectedAction:get(player) local reason_callback = config.buttons[action_name].reason_callback + if reason == nil or not reason:find("/S") then reason = 'no reason given' end reason_callback(player, reason) SelectedPlayer:remove(player) SelectedAction:remove(player)