1

fix coding style

This commit is contained in:
eleksir
2017-12-11 16:10:33 +03:00
parent 51b905cb70
commit d8a1e41eb2
5 changed files with 25 additions and 25 deletions

View File

@@ -71,7 +71,7 @@ sub cdlfunc($) {
$fname =~ s/[^\w!., -#]/_/g; $fname =~ s/[^\w!., -#]/_/g;
$savepath = $savepath . "/" . $fname . ".$extension"; $savepath = $savepath . "/" . $fname . ".$extension";
if ( (lc($url) =~ /\.(gif|jpeg|png|webm|mp4)$/) and ($1 eq $extension) ){ if ( (lc($url) =~ /\.(gif|jpe?g|png|webm|mp4)$/) and ($1 eq $extension) ) {
$savepath = $ENV{'HOME'} . "/imgsave/" . $fname; $savepath = $ENV{'HOME'} . "/imgsave/" . $fname;
} }

View File

@@ -284,6 +284,7 @@ sub dl_cmd {
} else { } else {
HexChat::print($msg); HexChat::print($msg);
} }
undef $cmd; undef $entity; undef $value; undef $msg; undef $cmd; undef $entity; undef $value; undef $msg;
return HexChat::EAT_ALL; return HexChat::EAT_ALL;
} }

View File

@@ -81,7 +81,6 @@ sub hookfn {
} }
undef $nicklist; undef $nicklist;
my @words = split(/\s+/, $text); my @words = split(/\s+/, $text);
foreach (@words) { foreach (@words) {
@@ -151,7 +150,7 @@ sub dlfunc($) {
mkdir ($savepath) unless (-d $savepath); mkdir ($savepath) unless (-d $savepath);
if ( (lc($url) =~ /\.(gif|jpeg|png|webm|mp4)$/) and ($1 eq $extension) ){ if ( (lc($url) =~ /\.(gif|jpe?g|png|webm|mp4)$/) and ($1 eq $extension) ) {
$savepath = $savepath . "/" . s/[^\w!., -#\:\?]/_/gr; $savepath = $savepath . "/" . s/[^\w!., -#\:\?]/_/gr;
} else { } else {
$savepath = $savepath . "/" . s/[^\w!., -#]\:\?/_/gr . ".$extension"; $savepath = $savepath . "/" . s/[^\w!., -#]\:\?/_/gr . ".$extension";
@@ -391,6 +390,7 @@ sub dl_cmd {
} else { } else {
HexChat::print($msg); HexChat::print($msg);
} }
undef $cmd; undef $entity; undef $value; undef $msg; undef $cmd; undef $entity; undef $value; undef $msg;
return HexChat::EAT_ALL; return HexChat::EAT_ALL;
} }

View File

@@ -78,7 +78,6 @@ sub hookfn {
} }
undef $nicklist; undef $nicklist;
my @words = split(/\s+/, $text); my @words = split(/\s+/, $text);
foreach (@words) { foreach (@words) {