Turned 'menu' command into 'dashboard'
This commit is contained in:
parent
8feae2d57e
commit
74ecba940a
@ -4,15 +4,20 @@
|
|||||||
-- Called by modpol.lua
|
-- Called by modpol.lua
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Function: modpol.menu(user)
|
-- Function: modpol.dashboard(user)
|
||||||
-- Params: user (string)
|
-- Params: user (string)
|
||||||
-- Q: Should this return a menu of commands relevant to the specific user?
|
-- Q: Should this return a menu of commands relevant to the specific user?
|
||||||
-- Output: Displays a menu of commands to the user
|
-- Output: Displays a menu of commands to the user
|
||||||
-- TKTK currently just prints all of modpol---needs major improvement
|
-- TKTK currently just prints all of modpol---needs major improvement
|
||||||
modpol.menu = function(user)
|
modpol.dashboard = function(user)
|
||||||
local output = "Command list:\n"
|
local output = ""
|
||||||
|
-- Org status
|
||||||
|
output = output .. "Orgs:\n" .. modpol.list_orgs()
|
||||||
|
-- Process status (ongoing processes)
|
||||||
|
-- Command list (should be redone to be org-specific)
|
||||||
|
output = output .. "Command list:\n"
|
||||||
for key,value in pairs(modpol) do
|
for key,value in pairs(modpol) do
|
||||||
output = output .. "- modpol." .. key .. "\n"
|
output = output .. "modpol." .. key .. " "
|
||||||
end
|
end
|
||||||
print(output)
|
print(output)
|
||||||
end
|
end
|
||||||
|
@ -15,13 +15,13 @@ regchat = function(name, command_table)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- /menu
|
-- /dashboard
|
||||||
-- Presents a menu of options to users
|
-- Presents a menu of options to users
|
||||||
regchat(
|
regchat(
|
||||||
"menu", {
|
"dashboard", {
|
||||||
privs = {},
|
privs = {},
|
||||||
func = function(user)
|
func = function(user)
|
||||||
local result = modpol.menu(user)
|
local result = modpol.dashboard(user)
|
||||||
return true, result
|
return true, result
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Function: modpol.menu(user)
|
-- Function: modpol.dashboard(user)
|
||||||
-- Params: user (string)
|
-- Params: user (string)
|
||||||
-- Q: Should this return a menu of commands relevant to the specific user?
|
-- Q: Should this return a menu of commands relevant to the specific user?
|
||||||
-- Output: Displays a menu of commands to the user
|
-- Output: Displays a menu of commands to the user
|
||||||
-- TKTK currently a manually curated list---needs major improvement
|
-- TKTK currently a manually curated list---needs major improvement
|
||||||
modpol.menu = function(user)
|
modpol.dashboard = function(user)
|
||||||
local output = "Command list:"
|
local output = "Command list:"
|
||||||
for key,value in pairs(command_list) do
|
for key,value in pairs(command_list) do
|
||||||
output = output .. "/" .. value .. " "
|
output = output .. "/" .. value .. " "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user