forked from PsychoticNinja/irssi
run syncscripts.sh
This commit is contained in:
parent
d50fe73c4e
commit
0f978ce28e
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
our $VERSION = '2003020804';
|
our $VERSION = '2003020806';
|
||||||
our %IRSSI = (
|
our %IRSSI = (
|
||||||
authors => 'Stefan \'tommie\' Tomanek',
|
authors => 'Stefan \'tommie\' Tomanek',
|
||||||
contact => 'stefan@pico.ruhr.de',
|
contact => 'stefan@pico.ruhr.de',
|
||||||
@ -315,6 +315,7 @@ sub get_new {
|
|||||||
my $xml = get_scripts();
|
my $xml = get_scripts();
|
||||||
foreach (sort {$xml->{$b}{last_modified} cmp $xml->{$a}{last_modified}} keys %$xml) {
|
foreach (sort {$xml->{$b}{last_modified} cmp $xml->{$a}{last_modified}} keys %$xml) {
|
||||||
my %entry = %{ $xml->{$_} };
|
my %entry = %{ $xml->{$_} };
|
||||||
|
next if $entry{HIDDEN};
|
||||||
$result->{$_} = \%entry;
|
$result->{$_} = \%entry;
|
||||||
$num--;
|
$num--;
|
||||||
last unless $num;
|
last unless $num;
|
||||||
@ -390,6 +391,7 @@ sub search_scripts {
|
|||||||
my %result;
|
my %result;
|
||||||
foreach (sort keys %{$database}) {
|
foreach (sort keys %{$database}) {
|
||||||
my %entry = %{$database->{$_}};
|
my %entry = %{$database->{$_}};
|
||||||
|
next if $entry{HIDDEN};
|
||||||
my $string = $_." ";
|
my $string = $_." ";
|
||||||
$string .= $entry{description} if defined $entry{description};
|
$string .= $entry{description} if defined $entry{description};
|
||||||
if ($string =~ /$query/i) {
|
if ($string =~ /$query/i) {
|
||||||
@ -1051,7 +1053,7 @@ sub toggle_autorun {
|
|||||||
my $dir = Irssi::get_irssi_dir()."/scripts/";
|
my $dir = Irssi::get_irssi_dir()."/scripts/";
|
||||||
mkdir $dir."autorun/" unless (-e $dir."autorun/");
|
mkdir $dir."autorun/" unless (-e $dir."autorun/");
|
||||||
return unless (-e $dir.$plname);
|
return unless (-e $dir.$plname);
|
||||||
if (check_autorun($sname)) {
|
if (-e $dir."/autorun/".$plname) {
|
||||||
if (readlink($dir."/autorun/".$plname) eq "../".$plname) {
|
if (readlink($dir."/autorun/".$plname) eq "../".$plname) {
|
||||||
if (unlink($dir."/autorun/".$plname)) {
|
if (unlink($dir."/autorun/".$plname)) {
|
||||||
print CLIENTCRAP "%R>>%n Autorun of ".$sname." disabled";
|
print CLIENTCRAP "%R>>%n Autorun of ".$sname." disabled";
|
||||||
@ -1062,8 +1064,11 @@ sub toggle_autorun {
|
|||||||
print CLIENTCRAP "%R>>%n ".$dir."/autorun/".$plname." is not a correct link";
|
print CLIENTCRAP "%R>>%n ".$dir."/autorun/".$plname." is not a correct link";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
symlink("../".$plname, $dir."/autorun/".$plname);
|
if (symlink("../".$plname, $dir."/autorun/".$plname)) {
|
||||||
print CLIENTCRAP "%R>>%n Autorun of ".$sname." enabled";
|
print CLIENTCRAP "%R>>%n Autorun of ".$sname." enabled";
|
||||||
|
} else {
|
||||||
|
print CLIENTCRAP "%R>>%n Unable to create autorun link";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user