Changeset

1103:b78b1524eb79

Merge with 0.4
author Matthew Wild <mwild1@gmail.com>
date Sun, 03 May 2009 17:24:57 +0100
parents 1100:05d209ef9661 (current diff) 1102:c81df501fd38 (diff)
children 1112:e8a00a2ea910
files
diffstat 2 files changed, 18 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/core/loggingmanager.lua	Sun May 03 01:11:21 2009 +0100
+++ b/core/loggingmanager.lua	Sun May 03 17:24:57 2009 +0100
@@ -86,6 +86,9 @@
 			add_rule(sink_config);
 			sink_config.filename = nil;
 		end
+	elseif type(logging_config) == "string" and logging_config:match("^%*(.+)") == sink_type then
+		-- Log all levels (debug+) to this sink
+		add_rule({ levels = { min = "debug" }, to = sink_type });
 	end
 end
 
--- a/prosodyctl	Sun May 03 01:11:21 2009 +0100
+++ b/prosodyctl	Sun May 03 17:24:57 2009 +0100
@@ -319,10 +319,12 @@
 function commands.register(arg)
 	local user, host, password = unpack(arg);
 	if (not (user and host)) or arg[1] == "--help" then
-		if not user and user ~= "--help" then
-			show_message [[No username specified]]
-		elseif not host then
-			show_message [[Please specify which host you want to register the user on]];
+		if user ~= "--help" then
+			if not user then
+				show_message [[No username specified]]
+			elseif not host then
+				show_message [[Please specify which host you want to register the user on]];
+			end
 		end
 		show_usage("register USER HOST [PASSWORD]", "Register a user on the server, with the given password");
 		return 1;
@@ -346,12 +348,14 @@
 function commands.unregister(arg)
 	local user, host = unpack(arg);
 	if (not (user and host)) or arg[1] == "--help" then
-		if not user then
-			show_message [[No username specified]]
-		elseif not host then
-			show_message [[Please specify which host you want to unregister the user from]];
+		if user ~= "--help" then
+			if not user then
+				show_message [[No username specified]]
+			elseif not host then
+				show_message [[Please specify which host you want to unregister the user from]];
+			end
 		end
-		show_usage("register USER HOST [PASSWORD]", "Permanently remove a user account from the server");
+		show_usage("unregister USER HOST [PASSWORD]", "Permanently remove a user account from the server");
 		return 1;
 	end
 
@@ -378,6 +382,7 @@
 	print("");
 	print("Where COMMAND may be one of:\n");
 
+	local hidden_commands = require "util.set".new{ "register", "unregister" };
 	local commands_order = { "adduser", "passwd", "deluser" };
 
 	local done = {};
@@ -392,7 +397,7 @@
 	end
 
 	for command_name, command in pairs(commands) do
-		if not done[command_name] then
+		if not done[command_name] and not hidden_commands:contains(command_name) then
 			command{ "--help" };
 			print""
 			done[command_name] = true;