|
@@ -1,6 +1,6 @@
|
|
|
-- INTERACTIONS.LUA (CLI)
|
|
|
|
|
|
--- User interaction functions for Modular Politics
|
|
|
+-- User interaction functions for Modpol
|
|
|
-- Called by modpol.lua
|
|
|
|
|
|
modpol.interactions = {}
|
|
@@ -49,7 +49,7 @@ function modpol.interactions.dashboard(user)
|
|
|
print('All users: ' .. table.concat(all_users, ', '))
|
|
|
print()
|
|
|
|
|
|
- print("Commands: (O)rg, (U)ser, Enter to close")
|
|
|
+ print("Commands: (O)rg, (U)ser, (R)eset, Enter to close")
|
|
|
|
|
|
local sel = io.read()
|
|
|
|
|
@@ -76,10 +76,22 @@ function modpol.interactions.dashboard(user)
|
|
|
modpol.interactions.dashboard(user)
|
|
|
end
|
|
|
)
|
|
|
+
|
|
|
+ elseif sel == "" then
|
|
|
+ return
|
|
|
+
|
|
|
else
|
|
|
print("User name not found")
|
|
|
modpol.interactions.dashboard(user)
|
|
|
end
|
|
|
+ elseif sel == "R" or sel == "r" then
|
|
|
+ modpol.instance.members = {}
|
|
|
+ modpol.orgs.reset()
|
|
|
+ print("Orgs and users reset")
|
|
|
+ modpol.interactions.dashboard(user)
|
|
|
+ else
|
|
|
+ print("Invalid input, try again")
|
|
|
+ modpol.interactions.dashboard(user)
|
|
|
end
|
|
|
end
|
|
|
|