Fix a load of issues, add luacheck and travis
This commit is contained in:
parent
c21b192f82
commit
7bd82dca86
28 changed files with 144 additions and 107 deletions
|
@ -138,9 +138,9 @@ end
|
|||
minetest.after(30*60, cp_tick)
|
||||
|
||||
function chatplus.poke(name,player)
|
||||
local function check(name,value)
|
||||
if not chatplus.players[name][value] then
|
||||
chatplus.players[name][value] = {}
|
||||
local function check(name2, value)
|
||||
if not chatplus.players[name2][value] then
|
||||
chatplus.players[name2][value] = {}
|
||||
end
|
||||
end
|
||||
if not chatplus.players[name] then
|
||||
|
|
|
@ -93,13 +93,13 @@ minetest.registered_chatcommands["msg"].func = function(name, param)
|
|||
if not sendto then
|
||||
return false, "Invalid usage, see /help msg."
|
||||
end
|
||||
if not core.get_player_by_name(sendto) then
|
||||
if not minetest.get_player_by_name(sendto) then
|
||||
return false, "The player " .. sendto
|
||||
.. " is not online."
|
||||
end
|
||||
core.log("action", "PM from " .. name .. " to " .. sendto
|
||||
minetest.log("action", "PM from " .. name .. " to " .. sendto
|
||||
.. ": " .. message)
|
||||
core.chat_send_player(sendto, minetest.colorize("#00FF55",
|
||||
minetest.chat_send_player(sendto, minetest.colorize("#00FF55",
|
||||
"PM from " .. name .. ": " .. message))
|
||||
return true, "Message sent."
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue