1

use system() instead of backticks where applicable

This commit is contained in:
eleksir
2016-10-08 20:17:37 +03:00
parent 1167d619e9
commit e61d4737d6
2 changed files with 4 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ if (-f "/bin/wget") {
}
my $script_name = "Image URL Auto Grabber and Downloader, wget flavour";
HexChat::register($script_name, '0.8.1', 'Automatically grabs and downloads image URLs via wget', \&freehooks);
HexChat::register($script_name, '0.8.2', 'Automatically grabs and downloads image URLs via wget', \&freehooks);
HexChat::print("$script_name loaded\n");
my @hooks;
@@ -80,7 +80,7 @@ sub dlfunc(@) {
my $file = shift;
$url = urlencode($url);
`$wgetpath --no-check-certificate -q -T 20 -O '$file' -o /dev/null '$url'`;
system($wgetpath, '--no-check-certificate', '-q', '-T', '20', '-O', $file, '-o', '/dev/null', $url);
if ($file =~ /(png|jpe?g|gif)$/i){
my $im = Image::Magick->new();

View File

@@ -23,7 +23,7 @@ my $help = 'Usage:
/notify show - shows whitelists and their statuses
';
register($script_name, '0.7', 'Sends *nix desktop notifications', \&freehooks);
register($script_name, '0.7.1', 'Sends *nix desktop notifications', \&freehooks);
HexChat::print("$script_name loaded\n");
my @hooks;
@@ -106,7 +106,7 @@ sub hookfn {
sub notify(@) {
my($topic, $text) = @_;
`notify-send -u normal -t 12000 -a hexchat "$topic" -i hexchat "$text"`;
system("notify-send", "-u", "normal", "-t", "12000", "-a", "hexchat", $topic, "-i", "hexchat", $text);
$active = 0;
}