Ignore --tor flag if it is disabled
This commit is contained in:
parent
a2c8f92c50
commit
9d3844bed5
1 changed files with 9 additions and 10 deletions
|
@ -16,8 +16,6 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with lainsafe. If not, see <https://www.gnu.org/licenses/>.
|
# along with lainsafe. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
use LWP::UserAgent;
|
use LWP::UserAgent;
|
||||||
my $ua = LWP::UserAgent->new;
|
my $ua = LWP::UserAgent->new;
|
||||||
|
@ -72,7 +70,7 @@ sub help
|
||||||
print "USAGE: lainsafecli [--tor] [--server] FILE\n\n";
|
print "USAGE: lainsafecli [--tor] [--server] FILE\n\n";
|
||||||
print "if --server not given, $DEFAULT_SERVER is used.\n";
|
print "if --server not given, $DEFAULT_SERVER is used.\n";
|
||||||
print "--tor is available\n" if $tor_enabled;
|
print "--tor is available\n" if $tor_enabled;
|
||||||
print "--tor is unavailable\n" unless $tor_enabled;
|
print "--tor is unavailable, flag is ignored\n" unless $tor_enabled;
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +89,8 @@ GetOptions ("server=s" => \$DEFAULT_SERVER,
|
||||||
);
|
);
|
||||||
|
|
||||||
&help if $help || not defined $ARGV[0];
|
&help if $help || not defined $ARGV[0];
|
||||||
&enable_tor if $tor;
|
&enable_tor if $tor and $tor_enabled;
|
||||||
|
|
||||||
|
|
||||||
# check if file is given
|
# check if file is given
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue