mirror of
https://github.com/minetest-mods/irc.git
synced 2024-12-27 09:10:21 +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
|
||||
return
|
||||
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.config.channel, name, message))
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user