diff --git a/modules/control/reports.lua b/modules/control/reports.lua index ea2a710f..354c8235 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 = 'Non 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)