prosodyctl
changeset 1501 330b8437ac35
parent 1500 56d05ba00169
child 1523 841d61be198f
equal deleted inserted replaced
1500:56d05ba00169 1501:330b8437ac35
   156 local function read_password()
   156 local function read_password()
   157 	local password;
   157 	local password;
   158 	while true do
   158 	while true do
   159 		io.write("Enter new password: ");
   159 		io.write("Enter new password: ");
   160 		password = getpass();
   160 		password = getpass();
       
   161 		if not password then
       
   162 			show_message("No password - cancelled");
       
   163 			return;
       
   164 		end
   161 		io.write("Retype new password: ");
   165 		io.write("Retype new password: ");
   162 		if getpass() ~= password then
   166 		if getpass() ~= password then
   163 			if not show_yesno [=[Passwords did not match, try again? [Y/n]]=] then
   167 			if not show_yesno [=[Passwords did not match, try again? [Y/n]]=] then
   164 				return;
   168 				return;
   165 			end
   169 			end