Skip to content

Commit

Permalink
dont print empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
bgkillas committed Dec 5, 2024
1 parent dbc38e5 commit 43cc26c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion quant.ew/files/system/text/text.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ local enabled = false
rpc.opts_everywhere()
rpc.opts_reliable()
function rpc.text(msg)
if not ModSettingGet("quant.ew.notext") then
local non_white = false
for i = 1, #msg do
if string.sub(msg, i, i) ~= " " then
non_white = true
break
end
end
if not ModSettingGet("quant.ew.notext") and non_white then
GamePrint(ctx.rpc_player_data.name .. ": " ..msg)
end
end
Expand Down

0 comments on commit 43cc26c

Please sign in to comment.