Fumo Functionality

pull/6/head
Astoria Floyd 3 years ago
parent f02f0ebb6f
commit cf8afc47ff
Signed by: astoriaFloyd
GPG Key ID: 952169244EC0D808

@ -118,6 +118,37 @@ function tools.tableMerge(t1, t2)
return t1
end
--Work on this later, simplify fumo command, less hardcoding, please.
function tools.massDetection(folder, filetype)
local command = "find "..folder.." | grep -i "..filetype.." | grep -n "..filetype
local result = io.popen(command)
return(result)
end
function tools.fumoLines()
os.execute("/bin/bash fumoLines.sh")
local file = io.open("./fumoFile", "r")
local fumoFile = file:read()
file:close()
return(fumoFile)
end
function tools.fumoList()
local lineList = tools.fumoLines()
local fumoList = {}
os.execute("/bin/bash fumoList.sh")
local file = io.open("./fumoFile", "r")
for i = lineList,1,-1
do
local number = i
fumoList[number]=file:read()
end
file:close()
print(fumoList[1])
return(fumoList)
end
--Message detection logic. If string.find detects both the desired string, and the key, starting at position 1, do the thing.
--Now deprecated
function tools.messageDectection(message, search)

@ -9,12 +9,14 @@ local commands = { -- Define commands its a table that will contain our commands
message.channel:send("Experimental mode works!")
end
};
--[[
[prefix..'fumo'] = { -- To be implemented later..
exec = function (message)
local fumoLines = tools.fumoLines()
local fumoList = tools.fumoList()
end
};
]]
}
function experimentalCommands.initialize()

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

@ -0,0 +1 @@
echo "$(cp fumo/* /var/www/html/fumo)"

@ -0,0 +1,3 @@
fumoFileText=$(find fumo | grep -i .gif)
fumoFileNumbers=$(wc -l <<< "$fumoFileText")
echo "$fumoFileNumbers" > "fumoFile"

@ -0,0 +1,2 @@
fumoFileText=$(find fumo | grep -i .gif)
echo "$fumoFileText" > "fumoFile"
Loading…
Cancel
Save