summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2018-03-07 02:22:58 +0100
committerailin-nemui <ailin-nemui@users.noreply.github.com>2018-03-07 02:23:02 +0100
commit0b057b4ff43cfc560f67fe8312830289534de7d5 (patch)
treefb4aeedf3ff37346f0ef09159d28bf4d2eb90f9e /scripts
parentad4324d24210f30646575b8bcbae8b50d2149224 (diff)
downloadirssi-0b057b4ff43cfc560f67fe8312830289534de7d5.zip
run syncdocs.sh and syncscripts.sh
Sync startup howto to fd1ed2227d529a7ee00d6206caa871ee40c08b69 Sync scriptassist to (2003020806) 211cd515ec87cf9a5d893e97894c2e4b58952f19
Diffstat (limited to 'scripts')
-rw-r--r--scripts/scriptassist.pl13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/scriptassist.pl b/scripts/scriptassist.pl
index 459d97f6..68708945 100644
--- a/scripts/scriptassist.pl
+++ b/scripts/scriptassist.pl
@@ -5,7 +5,7 @@
use strict;
-our $VERSION = '2003020804';
+our $VERSION = '2003020806';
our %IRSSI = (
authors => 'Stefan \'tommie\' Tomanek',
contact => 'stefan@pico.ruhr.de',
@@ -315,6 +315,7 @@ sub get_new {
my $xml = get_scripts();
foreach (sort {$xml->{$b}{last_modified} cmp $xml->{$a}{last_modified}} keys %$xml) {
my %entry = %{ $xml->{$_} };
+ next if $entry{HIDDEN};
$result->{$_} = \%entry;
$num--;
last unless $num;
@@ -390,6 +391,7 @@ sub search_scripts {
my %result;
foreach (sort keys %{$database}) {
my %entry = %{$database->{$_}};
+ next if $entry{HIDDEN};
my $string = $_." ";
$string .= $entry{description} if defined $entry{description};
if ($string =~ /$query/i) {
@@ -1051,7 +1053,7 @@ sub toggle_autorun {
my $dir = Irssi::get_irssi_dir()."/scripts/";
mkdir $dir."autorun/" unless (-e $dir."autorun/");
return unless (-e $dir.$plname);
- if (check_autorun($sname)) {
+ if (-e $dir."/autorun/".$plname) {
if (readlink($dir."/autorun/".$plname) eq "../".$plname) {
if (unlink($dir."/autorun/".$plname)) {
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";
}
} else {
- symlink("../".$plname, $dir."/autorun/".$plname);
- print CLIENTCRAP "%R>>%n Autorun of ".$sname." enabled";
+ if (symlink("../".$plname, $dir."/autorun/".$plname)) {
+ print CLIENTCRAP "%R>>%n Autorun of ".$sname." enabled";
+ } else {
+ print CLIENTCRAP "%R>>%n Unable to create autorun link";
+ }
}
}