Compare commits

..

1 Commits

Author SHA1 Message Date
d1f844ef21 IRC messages in french
Some checks failed
Check & Release / lint (push) Has been cancelled
2025-10-15 01:59:09 +02:00
3 changed files with 15 additions and 15 deletions

View File

@ -5,7 +5,7 @@
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)
local name = player:get_player_name() local name = player:get_player_name()
if irc.connected and irc.config.send_join_part then if irc.connected and irc.config.send_join_part then
irc.say("*** "..name.." joined the game") irc.say("*** "..name.." a rejoint le jeu")
end end
end) end)
@ -13,7 +13,7 @@ end)
minetest.register_on_leaveplayer(function(player, timed_out) minetest.register_on_leaveplayer(function(player, timed_out)
local name = player:get_player_name() local name = player:get_player_name()
if irc.connected and irc.config.send_join_part then if irc.connected and irc.config.send_join_part then
irc.say("*** "..name.." left the game".. irc.say("*** "..name.." a quitté le jeu"..
(timed_out and " (Timed out)" or "")) (timed_out and " (Timed out)" or ""))
end end
end) end)

View File

@ -117,11 +117,11 @@ function irc.hooks.channelChat(msg)
local foundchat, _, chatnick, chatmessage = local foundchat, _, chatnick, chatmessage =
text:find("^<([^>]+)> (.*)$") text:find("^<([^>]+)> (.*)$")
local foundjoin, _, joinnick = local foundjoin, _, joinnick =
text:find("^%*%*%* ([^%s]+) joined the game$") text:find("^%*%*%* ([^%s]+) a rejoint le serveur$")
local foundleave, _, leavenick = local foundleave, _, leavenick =
text:find("^%*%*%* ([^%s]+) left the game$") text:find("^%*%*%* ([^%s]+) est parti$")
local foundtimedout, _, timedoutnick = local foundtimedout, _, timedoutnick =
text:find("^%*%*%* ([^%s]+) left the game %(Timed out%)$") text:find("^%*%*%* ([^%s]+) est parti %(Timed out%)$")
local foundaction, _, actionnick, actionmessage = local foundaction, _, actionnick, actionmessage =
text:find("^%* ([^%s]+) (.*)$") text:find("^%* ([^%s]+) (.*)$")
@ -131,13 +131,13 @@ function irc.hooks.channelChat(msg)
irc.sendLocal(("<%s@%s> %s") irc.sendLocal(("<%s@%s> %s")
:format(chatnick, msg.user.nick, chatmessage)) :format(chatnick, msg.user.nick, chatmessage))
elseif foundjoin then elseif foundjoin then
irc.sendLocal(("*** %s joined %s") irc.sendLocal(("*** %s nous a rejoint %s")
:format(joinnick, msg.user.nick)) :format(joinnick, msg.user.nick))
elseif foundleave then elseif foundleave then
irc.sendLocal(("*** %s left %s") irc.sendLocal(("*** %s est parti %s")
:format(leavenick, msg.user.nick)) :format(leavenick, msg.user.nick))
elseif foundtimedout then elseif foundtimedout then
irc.sendLocal(("*** %s left %s (Timed out)") irc.sendLocal(("*** %s est parti %s (Timed out)")
:format(timedoutnick, msg.user.nick)) :format(timedoutnick, msg.user.nick))
elseif foundaction then elseif foundaction then
irc.sendLocal(("* %s@%s %s") irc.sendLocal(("* %s@%s %s")
@ -161,10 +161,10 @@ end
function irc.hooks.kick(channel, target, prefix, reason) function irc.hooks.kick(channel, target, prefix, reason)
if target == irc.conn.nick then if target == irc.conn.nick then
minetest.chat_send_all("IRC: kicked from "..channel.." by "..prefix.nick..".") minetest.chat_send_all("IRC: kické du "..channel.." par "..prefix.nick..".")
irc.disconnect("Kicked") irc.disconnect("Kicked")
else else
irc.sendLocal(("-!- %s was kicked from %s by %s [%s]") irc.sendLocal(("-!- %s a été kické %s par %s [%s]")
:format(target, channel, prefix.nick, reason)) :format(target, channel, prefix.nick, reason))
end end
end end
@ -193,26 +193,26 @@ end
function irc.hooks.nick(user, newNick) function irc.hooks.nick(user, newNick)
irc.sendLocal(("-!- %s is now known as %s") irc.sendLocal(("-!- %s maintenant connu sous le nom %s")
:format(user.nick, newNick)) :format(user.nick, newNick))
end end
function irc.hooks.join(user, channel) function irc.hooks.join(user, channel)
irc.sendLocal(("-!- %s joined %s") irc.sendLocal(("-!- %s nous a rejoint %s")
:format(user.nick, channel)) :format(user.nick, channel))
end end
function irc.hooks.part(user, channel, reason) function irc.hooks.part(user, channel, reason)
reason = reason or "" reason = reason or ""
irc.sendLocal(("-!- %s has left %s [%s]") irc.sendLocal(("-!- %s est parti %s [%s]")
:format(user.nick, channel, reason)) :format(user.nick, channel, reason))
end end
function irc.hooks.quit(user, reason) function irc.hooks.quit(user, reason)
irc.sendLocal(("-!- %s has quit [%s]") irc.sendLocal(("-!- %s a quit [%s]")
:format(user.nick, reason)) :format(user.nick, reason))
end end

View File

@ -13,5 +13,5 @@ function irc.sendLocal(message)
end end
function irc.playerMessage(name, message) function irc.playerMessage(name, message)
return ("<%s> %s"):format(name, message) return ("[*] %s: %s"):format(name, message)
end end