fix coding style
This commit is contained in:
@@ -71,7 +71,7 @@ sub cdlfunc($) {
|
||||
$fname =~ s/[^\w!., -#]/_/g;
|
||||
$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;
|
||||
}
|
||||
|
||||
|
||||
@@ -284,6 +284,7 @@ sub dl_cmd {
|
||||
} else {
|
||||
HexChat::print($msg);
|
||||
}
|
||||
|
||||
undef $cmd; undef $entity; undef $value; undef $msg;
|
||||
return HexChat::EAT_ALL;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,6 @@ sub hookfn {
|
||||
}
|
||||
|
||||
undef $nicklist;
|
||||
|
||||
my @words = split(/\s+/, $text);
|
||||
|
||||
foreach (@words) {
|
||||
@@ -151,7 +150,7 @@ sub dlfunc($) {
|
||||
|
||||
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;
|
||||
} else {
|
||||
$savepath = $savepath . "/" . s/[^\w!., -#]\:\?/_/gr . ".$extension";
|
||||
@@ -391,6 +390,7 @@ sub dl_cmd {
|
||||
} else {
|
||||
HexChat::print($msg);
|
||||
}
|
||||
|
||||
undef $cmd; undef $entity; undef $value; undef $msg;
|
||||
return HexChat::EAT_ALL;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,6 @@ sub hookfn {
|
||||
}
|
||||
|
||||
undef $nicklist;
|
||||
|
||||
my @words = split(/\s+/, $text);
|
||||
|
||||
foreach (@words) {
|
||||
|
||||
Reference in New Issue
Block a user