mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-03-03 14:53:01 +02:00
Add server print on admin_prints (#430)
* Add server print on admin_prints
This commit is contained in:
parent
9ede998686
commit
8fb9ae35d7
@ -32,9 +32,11 @@ Module.print_admins = function(msg, source)
|
|||||||
source_name = 'Server'
|
source_name = 'Server'
|
||||||
chat_color = {r = 255, g = 255, b = 255}
|
chat_color = {r = 255, g = 255, b = 255}
|
||||||
end
|
end
|
||||||
|
local formatted_msg = string.format('%s(ADMIN) %s: %s', prefix, source_name, msg) -- to the server
|
||||||
|
print(formatted_msg)
|
||||||
for _, p in pairs(game.connected_players) do
|
for _, p in pairs(game.connected_players) do
|
||||||
if p.admin then
|
if p.admin then
|
||||||
p.print(string.format('%s(ADMIN) %s: %s', prefix, source_name, msg), chat_color)
|
p.print(formatted_msg, chat_color)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user