aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfripost-adduser4
-rwxr-xr-xfripost-newalias2
-rwxr-xr-xlib/Fripost/Prompt.pm2
3 files changed, 4 insertions, 4 deletions
diff --git a/fripost-adduser b/fripost-adduser
index 5153a18..c8bfc84 100755
--- a/fripost-adduser
+++ b/fripost-adduser
@@ -59,7 +59,7 @@ my $user;
say "Name: $user->{name}";
say "Password: (hidden)";
- ask_if_ok_or_abort();
+ confirm_or_abort();
}
die "User already exists"
@@ -93,7 +93,7 @@ say "Sent welcome message: ";
say $msg->as_string;
#say decode_qp($msg->as_string);
-ask_if_ok_or_abort("Send email with login information? ");
+confirm_or_abort("Send email with login information? ");
prompt_email("Where should the email be sent? ");
diff --git a/fripost-newalias b/fripost-newalias
index 162f787..cf7f563 100755
--- a/fripost-newalias
+++ b/fripost-newalias
@@ -71,7 +71,7 @@ if (@addr == 0) {
exit 1;
}
say "dest adress: " . (join " ", @addr);
-ask_if_ok_or_abort();
+confirm_or_abort();
## Insert alias into database
for my $addr (@addr) {
diff --git a/lib/Fripost/Prompt.pm b/lib/Fripost/Prompt.pm
index 4b11a19..ac40411 100755
--- a/lib/Fripost/Prompt.pm
+++ b/lib/Fripost/Prompt.pm
@@ -20,7 +20,7 @@ use String::MkPasswd qw/mkpasswd/;
our @EXPORT = qw(prompt_password prompt_username);
-sub ask_if_ok_or_abort {
+sub confirm_or_abort {
my ($msg) = @_;
$msg //= "Is this OK? [no will abort] ";
my $confirmed = prompt $msg, -ynt;