File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -559,6 +559,12 @@ sub update_time {
559559 sub login_dialog {
560560 my ($self ) = @_ ;
561561
562+ if ($self ->{username} && $self ->{password}) {
563+ ($login , $password ) = ($self ->{username}, $self ->{password});
564+ $self ->send_login;
565+ return;
566+ }
567+
562568 my $dialog = $self ->{mw}->Dialog(
563569 -title => 'Login',
564570 -default_button => 'Login',
Original file line number Diff line number Diff line change @@ -36,9 +36,11 @@ BEGIN {
3636 my $home = $ENV {HOME } || $ENV {USERPROFILE } || $ENV {HOMEPATH };
3737 foreach my $rcf (grep { -s }
3838 " $home /pm-cb.rc" , " $home /.pm-cbrc" , " $home /.config/pm-cb" ) {
39- (stat $rcf )[2] & 022 and next ;
39+ my $mode = (stat $rcf )[2];
40+ $mode & 022 and next ;
4041 open my $fh , " <" , $rcf or next ;
4142 while (<$fh >) {
43+ $mode & 044 && m / password/ i and next ;
4244 s /\s *#.*$// ;
4345 my ($k , $v ) = (m / ^\s *([-\w ]+)\s *[:=] \s *(.*\S )/ ) or next ;
4446 $conf { lc $k
@@ -56,6 +58,7 @@ BEGIN {
5658 =~ s { ^(?:no|false)$} { 0} ir
5759 =~ s { ^(?:yes|true)$} { 1} ir ;
5860 }
61+
5962 }
6063 exists $conf {show_time } and $conf {no_time } = !delete $conf {show_time };
6164 $conf {font_name } =~ m /\s / and $conf {font_name } = " {" .$conf {font_name }." }" ;
You can’t perform that action at this time.
0 commit comments