mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Updated from scripts.irssi.org
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2951 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
77b3ab3c44
commit
69cafa1018
@ -8,7 +8,7 @@
|
|||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
use vars qw($VERSION %IRSSI);
|
use vars qw($VERSION %IRSSI);
|
||||||
$VERSION = '2002101202';
|
$VERSION = '2002101401';
|
||||||
%IRSSI = (
|
%IRSSI = (
|
||||||
authors => 'Stefan \'tommie\' Tomanek',
|
authors => 'Stefan \'tommie\' Tomanek',
|
||||||
contact => 'stefan@pico.ruhr.de',
|
contact => 'stefan@pico.ruhr.de',
|
||||||
@ -844,6 +844,7 @@ sub download_script ($$) {
|
|||||||
my $response = $ua->request($request);
|
my $response = $ua->request($request);
|
||||||
if ($response->is_success()) {
|
if ($response->is_success()) {
|
||||||
my $file = $response->content();
|
my $file = $response->content();
|
||||||
|
mkdir $dir.'/scripts/', 0750 unless (-e $dir.'/scripts/');
|
||||||
local *F;
|
local *F;
|
||||||
open(F, '>'.$dir.'/scripts/'.$script.'.pl.new');
|
open(F, '>'.$dir.'/scripts/'.$script.'.pl.new');
|
||||||
print F $file;
|
print F $file;
|
||||||
@ -856,7 +857,7 @@ sub download_script ($$) {
|
|||||||
if ($response2->is_success()) {
|
if ($response2->is_success()) {
|
||||||
local *S;
|
local *S;
|
||||||
my $sig_dir = $dir.'/scripts/signatures/';
|
my $sig_dir = $dir.'/scripts/signatures/';
|
||||||
mkdir $sig_dir unless (-e $sig_dir);
|
mkdir $sig_dir, 0750 unless (-e $sig_dir);
|
||||||
open(S, '>'.$sig_dir.$script.'.pl.asc');
|
open(S, '>'.$sig_dir.$script.'.pl.asc');
|
||||||
my $file2 = $response2->content();
|
my $file2 = $response2->content();
|
||||||
print S $file2;
|
print S $file2;
|
||||||
@ -891,7 +892,7 @@ sub download_script ($$) {
|
|||||||
}
|
}
|
||||||
if ($result{installed}) {
|
if ($result{installed}) {
|
||||||
my $old_dir = "$dir/scripts/old/";
|
my $old_dir = "$dir/scripts/old/";
|
||||||
mkdir $old_dir unless (-e $old_dir);
|
mkdir $old_dir, 0750 unless (-e $old_dir);
|
||||||
rename "$dir/scripts/$script.pl", "$old_dir/$script.pl.old" if -e "$dir/scripts/$script.pl";
|
rename "$dir/scripts/$script.pl", "$old_dir/$script.pl.old" if -e "$dir/scripts/$script.pl";
|
||||||
rename "$dir/scripts/$script.pl.new", "$dir/scripts/$script.pl";
|
rename "$dir/scripts/$script.pl.new", "$dir/scripts/$script.pl";
|
||||||
}
|
}
|
||||||
@ -921,7 +922,7 @@ sub print_check (%) {
|
|||||||
sub toggle_autorun ($) {
|
sub toggle_autorun ($) {
|
||||||
my ($script) = @_;
|
my ($script) = @_;
|
||||||
my $dir = Irssi::get_irssi_dir()."/scripts/";
|
my $dir = Irssi::get_irssi_dir()."/scripts/";
|
||||||
mkdir $dir."autorun/" unless (-e $dir."autorun/");
|
mkdir $dir."autorun/", 0750 unless (-e $dir."autorun/");
|
||||||
return unless (-e $dir.$script.".pl");
|
return unless (-e $dir.$script.".pl");
|
||||||
if (check_autorun($script)) {
|
if (check_autorun($script)) {
|
||||||
if (readlink($dir."/autorun/".$script.".pl") eq "../".$script.".pl") {
|
if (readlink($dir."/autorun/".$script.".pl") eq "../".$script.".pl") {
|
||||||
|
Loading…
Reference in New Issue
Block a user