Adjustments for discordmt
This commit is contained in:
parent
64806a32d7
commit
f0bbb9c7d1
2 changed files with 6 additions and 12 deletions
|
@ -303,16 +303,8 @@ if minetest.global_exists("irc") then
|
|||
end
|
||||
end
|
||||
|
||||
local handler
|
||||
handler = function(name, message)
|
||||
minetest.register_on_chat_message(function(name, message)
|
||||
if ctf.player(name).team then
|
||||
for i = 1, #minetest.registered_on_chat_messages do
|
||||
local func = minetest.registered_on_chat_messages[i]
|
||||
if func ~= handler and func(name, message) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
if not minetest.check_player_privs(name, {shout = true}) then
|
||||
minetest.chat_send_player(name, "-!- You don't have permission to shout.")
|
||||
return true
|
||||
|
@ -324,8 +316,7 @@ handler = function(name, message)
|
|||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
table.insert(minetest.registered_on_chat_messages, 1, handler)
|
||||
end)
|
||||
|
||||
minetest.registered_chatcommands["me"].func = function(name, param)
|
||||
me_func(name, param)
|
||||
|
|
|
@ -87,7 +87,10 @@ end
|
|||
function random_messages.display_message(message_number)
|
||||
local msg = random_messages.messages[message_number] or message_number
|
||||
if msg then
|
||||
minetest.chat_send_all(minetest.colorize("#808080", msg))
|
||||
for i, player in ipairs(minetest.get_connected_players()) do
|
||||
local name = player:get_player_name()
|
||||
minetest.chat_send_player(name, minetest.colorize("#808080", msg))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue