aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2012-08-02 21:42:00 +0200
committerFlorian Zeitz <florob@babelmonkeys.de>2012-08-02 21:42:00 +0200
commitddb2f794f7ea3b05a88f8cea6a2d7d17b12d1205 (patch)
tree9ac74878a5972405905f5df1997902e33c38003c /plugins
parenta3815829fcb92288d1ba9c377ef5a886ba88f547 (diff)
downloadprosody-ddb2f794f7ea3b05a88f8cea6a2d7d17b12d1205.tar.gz
prosody-ddb2f794f7ea3b05a88f8cea6a2d7d17b12d1205.zip
mod_admin_adhoc, mod_announce: Explicitly specify possible actions for ad-hoc commands
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_admin_adhoc.lua24
-rw-r--r--plugins/mod_announce.lua2
2 files changed, 13 insertions, 13 deletions
diff --git a/plugins/mod_admin_adhoc.lua b/plugins/mod_admin_adhoc.lua
index 50493abe..a6cf78cf 100644
--- a/plugins/mod_admin_adhoc.lua
+++ b/plugins/mod_admin_adhoc.lua
@@ -75,7 +75,7 @@ function add_user_command_handler(self, data, state)
return { status = "completed", error = { message = "Invalid data.\nPassword mismatch, or empty username" } };
end
else
- return { status = "executing", form = add_user_layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = add_user_layout }, "executing";
end
end
@@ -107,7 +107,7 @@ function change_user_password_command_handler(self, data, state)
return { status = "completed", error = { message = "User does not exist" } };
end
else
- return { status = "executing", form = change_user_password_layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = change_user_password_layout }, "executing";
end
end
@@ -155,7 +155,7 @@ function delete_user_command_handler(self, data, state)
(#failed ~= 0 and
"The following accounts could not be deleted:\n"..t_concat(failed, "\n") or "") };
else
- return { status = "executing", form = delete_user_layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = delete_user_layout }, "executing";
end
end
@@ -205,7 +205,7 @@ function end_user_session_handler(self, data, state)
(#failed ~= 0 and
"The following accounts could not be disconnected:\n"..t_concat(failed, "\n") or "") };
else
- return { status = "executing", form = end_user_session_layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = end_user_session_layout }, "executing";
end
end
@@ -254,7 +254,7 @@ function get_user_password_handler(self, data, state)
end
return { status = "completed", result = { layout = get_user_password_result_layout, values = {accountjid = accountjid, password = password} } };
else
- return { status = "executing", form = get_user_password_layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = get_user_password_layout }, "executing";
end
end
@@ -312,7 +312,7 @@ function get_user_roster_handler(self, data, state)
result:add_child(query);
return { status = "completed", other = result };
else
- return { status = "executing", form = get_user_roster_layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = get_user_roster_layout }, "executing";
end
end
@@ -365,7 +365,7 @@ function get_user_stats_handler(self, data, state)
return { status = "completed", result = {layout = get_user_stats_result_layout, values = {ipaddresses = IPs, rostersize = tostring(rostersize),
onlineresources = resources}} };
else
- return { status = "executing", form = get_user_stats_layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = get_user_stats_layout }, "executing";
end
end
@@ -425,7 +425,7 @@ function get_online_users_command_handler(self, data, state)
end
return { status = "completed", result = {layout = get_online_users_result_layout, values = {onlineuserjids=t_concat(users, "\n")}} };
else
- return { status = "executing", form = get_online_users_layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = get_online_users_layout }, "executing";
end
end
@@ -469,7 +469,7 @@ function load_module_handler(self, data, state)
'". Error was: "'..tostring(err or "<unspecified>")..'"' } };
end
else
- return { status = "executing", form = layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = layout }, "executing";
end
end
@@ -503,7 +503,7 @@ function reload_modules_handler(self, data, state)
return { status = "completed", info = info };
else
local modules = array.collect(keys(hosts[data.to].modules)):sort();
- return { status = "executing", form = { layout = layout; values = { modules = modules } } }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = { layout = layout; values = { modules = modules } } }, "executing";
end
end
@@ -567,7 +567,7 @@ function shut_down_service_handler(self, data, state)
return { status = "completed", info = "Server is about to shut down" };
else
- return { status = "executing", form = shut_down_service_layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = shut_down_service_layout }, "executing";
end
end
@@ -601,7 +601,7 @@ function unload_modules_handler(self, data, state)
return { status = "completed", info = info };
else
local modules = array.collect(keys(hosts[data.to].modules)):sort();
- return { status = "executing", form = { layout = layout; values = { modules = modules } } }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = { layout = layout; values = { modules = modules } } }, "executing";
end
end
diff --git a/plugins/mod_announce.lua b/plugins/mod_announce.lua
index 0cfd284c..0872bd21 100644
--- a/plugins/mod_announce.lua
+++ b/plugins/mod_announce.lua
@@ -88,7 +88,7 @@ function announce_handler(self, data, state)
module:log("info", "Announcement sent to %d online users", count);
return { status = "completed", info = ("Announcement sent to %d online users"):format(count) };
else
- return { status = "executing", form = announce_layout }, "executing";
+ return { status = "executing", actions = {"next", "complete", default = "complete"}, form = announce_layout }, "executing";
end
return true;