Browse Source

lua: host: do not use deprecated module function

pull/138/head
Marvin Scholz 5 years ago
committed by Hugo Beauzée-Luyssen
parent
commit
4109a34d64
  1. 3
      share/lua/intf/cli.lua
  2. 14
      share/lua/intf/modules/host.lua

3
share/lua/intf/cli.lua

@ -58,6 +58,8 @@ description=
]============================================================================]
local common = require("common")
local host = require("host")
skip = common.skip
skip2 = function(foo) return skip(skip(foo)) end
setarg = common.setarg
@ -796,7 +798,6 @@ function on_write( client )
end
--[[ Setup host ]]
require("host")
h = host.host()
h.status_callbacks[host.status.password] = on_password

14
share/lua/intf/modules/host.lua

@ -23,7 +23,7 @@
--[==========================================================================[
Example use:
require "host"
local host = require "host"
h = host.host()
-- Bypass any authentication
@ -61,8 +61,6 @@ Example use:
For complete examples see existing VLC Lua interface modules (ie cli.lua)
--]==========================================================================]
module("host",package.seeall)
status = { init = 0, read = 1, write = 2, password = 3 }
client_type = { net = 1, stdio = 2, fifo = 3, telnet = 4 }
@ -365,3 +363,13 @@ function host()
})
return h
end
local hostfuncs = {
host = host,
status = status,
client_type = client_type,
is_flag_set = is_flag_set,
}
_G.host = hostfuncs
return hostfuncs

Loading…
Cancel
Save