Add files via upload
This commit is contained in:
parent
c8fa0643b1
commit
85b76cec6d
6
locale/atl_server_news.de.tr
Normal file
6
locale/atl_server_news.de.tr
Normal file
@ -0,0 +1,6 @@
|
||||
# textdomain:atl_server_news
|
||||
|
||||
-!- Player does not exist=-!- Spieler existiert nicht.
|
||||
-!- You don't have permission to open this (missing privileges: server)=-!- Sie haben keine Berechtigung, dies zu öffnen (fehlende Berechtigungen: server).
|
||||
-!- Server news updated successfully.=-!- Server-News erfolgreich aktualisiert.
|
||||
-!- There are new features on the server! Type /news to read them.=-!- Es gibt neue Funktionen auf dem Server! Geben Sie /news ein, um sie zu
|
6
locale/atl_server_news.en.tr
Normal file
6
locale/atl_server_news.en.tr
Normal file
@ -0,0 +1,6 @@
|
||||
# textdomain:atl_server_news
|
||||
|
||||
-!- Player does not exist=
|
||||
-!- You don't have permission to open this (missing privileges: server)=
|
||||
-!- Server news updated successfully.=
|
||||
-!- There are new features on the server! Type /news to read them.=
|
6
locale/atl_server_news.es.tr
Normal file
6
locale/atl_server_news.es.tr
Normal file
@ -0,0 +1,6 @@
|
||||
# textdomain:atl_server_news
|
||||
|
||||
-!- Player does not exist=-!- El jugador no existe.
|
||||
-!- You don't have permission to open this (missing privileges: server)=-!- No tienes permiso para abrir esto (privilegios faltantes: server).
|
||||
-!- Server news updated successfully.=-!- Noticias del servidor actualizadas con éxito.
|
||||
-!- There are new features on the server! Type /news to read them.=-!- ¡Hay nuevas características en el servidor! Escribe /news para leerlas.
|
6
locale/atl_server_news.fr.tr
Normal file
6
locale/atl_server_news.fr.tr
Normal file
@ -0,0 +1,6 @@
|
||||
# textdomain:atl_server_news
|
||||
|
||||
-!- Player does not exist=-!- Le joueur n'existe pas.
|
||||
-!- You don't have permission to open this (missing privileges: server)=-!- Vous n'avez pas la permission d'ouvrir ceci (privilèges manquants : server).
|
||||
-!- Server news updated successfully.=-!- Nouvelles du serveur mises à jour avec succès.
|
||||
-!- There are new features on the server! Type /news to read them.=-!- Il y a de nouvelles fonctionnalités sur le serveur ! Tapez /news pour les lire.
|
6
locale/atl_server_news.it.tr
Normal file
6
locale/atl_server_news.it.tr
Normal file
@ -0,0 +1,6 @@
|
||||
# textdomain:atl_server_news
|
||||
|
||||
-!- Player does not exist=-!- Il giocatore non esiste.
|
||||
-!- You don't have permission to open this (missing privileges: server)=-!- Non hai il permesso di aprire questo (privilegi mancanti: server).
|
||||
-!- Server news updated successfully.=-!- Notizie del server aggiornate con successo.
|
||||
-!- There are new features on the server! Type /news to read them.=-!- Ci sono nuove funzionalità sul server! Digita /news per leggerle.
|
6
locale/atl_server_news.ru.tr
Normal file
6
locale/atl_server_news.ru.tr
Normal file
@ -0,0 +1,6 @@
|
||||
# textdomain:atl_server_news
|
||||
|
||||
-!- Player does not exist=-!- Игрок не существует.
|
||||
-!- You don't have permission to open this (missing privileges: server)=-!- У вас нет разрешения на открытие этого (отсутствующие привилегии: сервер).
|
||||
-!- Server news updated successfully.=-!- Новости сервера успешно обновлены.
|
||||
-!- There are new features on the server! Type /news to read them.=-!- На сервере появились новые функции! Введите /news, чтобы прочитать их.
|
@ -1,3 +1,5 @@
|
||||
local S = minetest.get_translator("atl_server_news")
|
||||
|
||||
function atl_server_news.ensure_news_file_exists()
|
||||
if atl_server_news.mod_storage:get_string("news_content") == "" then
|
||||
atl_server_news.mod_storage:set_string("news_content", "")
|
||||
@ -29,7 +31,7 @@ function atl_server_news.set_news_read(player_name)
|
||||
end
|
||||
|
||||
function atl_server_news.send_news_notification(player_name)
|
||||
minetest.chat_send_player(player_name, "-!- There are new features on the server! Type /news to read them.")
|
||||
minetest.chat_send_player(player_name, S("-!- There are new features on the server! Type /news to read them."))
|
||||
end
|
||||
|
||||
function atl_server_news.notify_new_news(player_name)
|
||||
|
@ -1,10 +1,12 @@
|
||||
local S = minetest.get_translator("atl_server_news")
|
||||
|
||||
minetest.register_chatcommand("news", {
|
||||
description = "Show server news",
|
||||
privs = {shout = true},
|
||||
func = function(name)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
if not player then
|
||||
return false, "-!- Player does not exist"
|
||||
return false, S("-!- Player does not exist")
|
||||
end
|
||||
atl_server_news.show_news_form(name)
|
||||
if not atl_server_news.has_read_news(name) then
|
||||
|
@ -1,14 +1,16 @@
|
||||
local S = minetest.get_translator("atl_server_news")
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if fields.save then
|
||||
atl_server_news.save_news(fields.news_content)
|
||||
minetest.chat_send_player(player:get_player_name(), "-!- Server news updated successfully.")
|
||||
minetest.chat_send_player(player:get_player_name(), S("-!- Server news updated successfully."))
|
||||
end
|
||||
if fields.tabs == "2" then
|
||||
if minetest.check_player_privs(player, {server = true}) then
|
||||
atl_server_news.show_edit_news_form(player:get_player_name())
|
||||
else
|
||||
atl_server_news.show_news_form(player:get_player_name())
|
||||
minetest.chat_send_player(player:get_player_name(), "-!- You don't have permission to open this (missing privileges: server)")
|
||||
minetest.chat_send_player(player:get_player_name(), S("-!- You don't have permission to open this (missing privileges: server)"))
|
||||
end
|
||||
end
|
||||
if fields.tabs == "1" and minetest.check_player_privs(player, {server = true}) then
|
||||
|
Loading…
x
Reference in New Issue
Block a user