Install and setup IRSSI to announce locally to tuper.

Install screen and irssi:

apt-get install screen
apt-get install irssi

Start irssi:

screen -S irssi irssi

Set network and autoconnect to channel:

/network add -autosendcmd "/^join #CHANNELNAME1;/^join #CHANNELNAME2;wait 5000;/^script load /home/tup/tuper4/ftp1.pl" -nick WHATEV -user WHATEV -realname WHATEV networkname

/server add -network networkname -auto 94.23.147.134 -p 59595 -ssl
write /save to save config
and /quit to quit

Edit /home/tup/.irssi/config so that port and pass are correct.

    address = "IP_HERE";
    chatnet = "NETWORK_NAME";
    port = "PORT_HERE";
    password = "password";
    use_ssl = "yes";
    ssl_verify = "no";
    autoconnect = "yes";

Restart irssi to make the changes take effect.

screen -S irssi irssi

(Usage: switch windows with alt+1, alt+2)

Now you have to create the file ftp1.pl in /tuper4

use Irssi;
use Irssi::Irc;
use vars qw($VERSION %IRSSI);
 
my $VERSION="3.0";
 
my %IRSSI = (
    authors=> '',
    name=> 'FTP auto',
    description=> 'FTP Auto download announcement script',
    license=> '',
);
 
# Change the nick
my $botnick = "Angel";
 
sub event_message {
    my ($server, $text, $nick, $address, $target) = @_;
    $text =~ s/\x03\d?\d?(,\d?\d?)?|\x02|\x1f|\x16|\x06|\x07|\x0f//g;
 
    if( $nick eq $botnick ){
 
        # Change this regexp
        my $match = qr/DONE: -(.*?)- (.*?) with (\d*)/i;
        if ($text =~ $match)
        {
            my $type = $1;
            my $release = $2;
 
            print "Name: $release; Category: $type";
 
            # Change this path as necessary
            system "/home/tup/tuper4/bin/tuper", ("local_rls", "ftp1", "0", $type, $release, "ftp");
        }
    }
}
Irssi::signal_add("message public", "event_message");

https://bugs.janhouse.lv/projects/tuper/wiki/Announcing_releases

Edit /home/tup/tuper4/ftp1.pl so that regex etc is correct to the announcements. Check logstream for output.

If Fish is needed: http://www.flashdance.cx/fish-irssi-fast-install.html /setkey #Channelname key

irssi.txt · Last modified: 2014/10/24 05:39 by dent
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki