28 lines
753 B
Lua
28 lines
753 B
Lua
--register command aliases:
|
|
--introduce some short names for commands you use often
|
|
axi_shortcut=function(name, from)
|
|
if minetest.chatcommands[from] then
|
|
minetest.register_chatcommand(name, minetest.chatcommands[from])
|
|
end
|
|
end
|
|
minetest.after(0,function()
|
|
axi_shortcut("tp", "teleport")
|
|
axi_shortcut("chk", "rollback_check")
|
|
axi_shortcut("day", "time 4700")
|
|
end
|
|
)
|
|
|
|
minetest.register_chatcommand("?", {
|
|
params = "<players>",
|
|
description = "Get ip and accounts names",
|
|
privs = {ban=true},
|
|
func = function(name, param)
|
|
if not param then
|
|
minetest.chat_send_player(name, "Player " .. param .. " was not found")
|
|
return
|
|
end
|
|
ipnames.command_whois(name,param)
|
|
return
|
|
end
|
|
})
|