Add chatplus.send_message_to_sender()
This commit is contained in:
parent
960ee92607
commit
1a033ecbca
1 changed files with 6 additions and 2 deletions
|
@ -189,7 +189,7 @@ function chatplus.send(from, msg)
|
||||||
if msg:sub(1, 1) == "/" then
|
if msg:sub(1, 1) == "/" then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
if not minetest.check_player_privs(from, {shout = true}) then
|
if not minetest.check_player_privs(from, {shout = true}) then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
@ -220,12 +220,16 @@ function chatplus.send(from, msg)
|
||||||
minetest.chat_send_player(to, "<" .. from .. "> " .. msg)
|
minetest.chat_send_player(to, "<" .. from .. "> " .. msg)
|
||||||
end
|
end
|
||||||
elseif minetest.features.no_chat_message_prediction then
|
elseif minetest.features.no_chat_message_prediction then
|
||||||
minetest.chat_send_player(from, "<" .. from .. "> " .. msg)
|
chatplus.send_message_to_sender(from, msg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function chatplus.send_message_to_sender(from, msg)
|
||||||
|
minetest.chat_send_player(from, "<" .. from .. "> " .. msg)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Minetest callbacks
|
-- Minetest callbacks
|
||||||
minetest.register_on_chat_message(function(...)
|
minetest.register_on_chat_message(function(...)
|
||||||
|
|
Loading…
Reference in a new issue