Load only ".lua" plugin files
This commit is contained in:
parent
8c6c781f85
commit
198f700f86
@ -197,7 +197,8 @@ plugins = {}
|
|||||||
function load_plugins()
|
function load_plugins()
|
||||||
plugins = {}
|
plugins = {}
|
||||||
for k, v in pairs(scandir("plugins")) do
|
for k, v in pairs(scandir("plugins")) do
|
||||||
if not (v:sub(0, 1) == ".") then
|
-- Load only lua files
|
||||||
|
if (v:match(".lua$")) then
|
||||||
print("Loading plugin", v)
|
print("Loading plugin", v)
|
||||||
t = loadfile("plugins/" .. v)()
|
t = loadfile("plugins/" .. v)()
|
||||||
table.insert(plugins, t)
|
table.insert(plugins, t)
|
||||||
|
Reference in New Issue
Block a user