mirror of
https://github.com/minetest-mods/irc.git
synced 2024-12-28 09:40:17 +01:00
Send only first chat line.
This commit is contained in:
parent
10f32b77b0
commit
5604fa5582
@ -26,6 +26,10 @@ minetest.register_on_chat_message(function(name, message)
|
|||||||
or (not minetest.check_player_privs(name, {shout=true})) then
|
or (not minetest.check_player_privs(name, {shout=true})) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local nl = message:find("\n", 1, true)
|
||||||
|
if nl then
|
||||||
|
message = message:sub(1, nl - 1)
|
||||||
|
end
|
||||||
mt_irc:queueMsg(mt_irc.msgs.playerMessage(
|
mt_irc:queueMsg(mt_irc.msgs.playerMessage(
|
||||||
mt_irc.config.channel, name, message))
|
mt_irc.config.channel, name, message))
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user