Correção de erro de código errado
parent
7a5559257d
commit
db73603ad8
10
README.md
10
README.md
|
@ -3,15 +3,13 @@
|
|||
[![Baixar](https://img.shields.io/badge/Baixar-v1.0.0-green.svg)](https://github.com/BrunoMine/multichat/archive/v1.0.0.zip)
|
||||
[![Projeto](https://img.shields.io/badge/Git-Projeto-green.svg)](https://github.com/BrunoMine/multichat)
|
||||
[![!Bower](https://img.shields.io/badge/Bower-Projeto-green.svg)](https://minetest-bower.herokuapp.com/mods/multichat)
|
||||
[![!Fórum](https://img.shields.io/badge/Forum-Projeto-green.svg)](http://forum.minetestbrasil.com/t111-mod-bate-papo-melhorado-multichatv1-0-0#762)
|
||||
[![Licença](https://img.shields.io/badge/Licença-LGPL_v3.0-blue.svg)](https://github.com/BrunoMine/multichat/blob/master/LICENSE)
|
||||
|
||||
## Descrição
|
||||
Adiciona funcionalidades ao bate-papo
|
||||
* Prefixos para administradores e moderadores
|
||||
* Definir conversas privadas
|
||||
* Desligar bate-papo
|
||||
* Sons para notificar falas e chamadas
|
||||
Adiciona funcionalidades ao chat
|
||||
* Prefixos para administradores e moderadores?
|
||||
* Grupo privado?
|
||||
* Ignorar jogadores no chat ?
|
||||
|
||||
## Recursos do projeto
|
||||
|
||||
|
|
42
init.lua
42
init.lua
|
@ -8,21 +8,41 @@
|
|||
|
||||
]]
|
||||
|
||||
minetest.register_privilege("chat_moderador", "Usar char como moderador")
|
||||
minetest.register_privilege("chat_admin", "Usar char como administrador")
|
||||
|
||||
-- Variavel global
|
||||
multichat = {}
|
||||
|
||||
-- Emitir som de aviso
|
||||
local som_avisar = function(name)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
minetest.sound_play("multichat_aviso", {
|
||||
object = player,
|
||||
gain = 0.5,
|
||||
max_hear_distance = 1,
|
||||
loop = false,
|
||||
})
|
||||
-- Notificador de Inicializador
|
||||
local notificar = function(msg)
|
||||
if minetest.setting_get("log_mods") then
|
||||
minetest.debug("[MULTICHAT]"..msg)
|
||||
end
|
||||
end
|
||||
|
||||
-- Verificar compatibilidades de versão
|
||||
-- Versão do servidor
|
||||
if minetest.get_version().string and string.find(minetest.get_version().string, "0.4.15") then
|
||||
minetest.log("error", "[MULTICHAT] Versao imcompativel (use 0.4.16 ou superior)")
|
||||
end
|
||||
-- Versão do cliente
|
||||
if minetest.setting_get("strict_protocol_version_checking") ~= "true" then
|
||||
minetest.log("error", "[MULTICHAT] Incompativel com clientes inferiores a 0.4.16 (defina strict_protocol_version_checking para evitar erros)")
|
||||
end
|
||||
|
||||
|
||||
-- Modpath
|
||||
local modpath = minetest.get_modpath("multichat")
|
||||
|
||||
-- Carregar scripts
|
||||
notificar("Carregando...")
|
||||
dofile(modpath.."/lib/memor/init.lua")
|
||||
|
||||
-- Variavel temporaria de jogadores online
|
||||
multichat.online = memor.online()
|
||||
|
||||
dofile(modpath.."/chat.lua")
|
||||
dofile(modpath.."/menu.lua")
|
||||
dofile(modpath.."/msg.lua")
|
||||
dofile(modpath.."/me.lua")
|
||||
dofile(modpath.."/comandos.lua")
|
||||
notificar("OK!")
|
||||
|
|
Loading…
Reference in New Issue