Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Irssi;
- use Irssi::Irc;
- use vars qw($VERSION %IRSSI);
- require "/home/tup/tuper4/starters/announce-helper.pl";
- my $VERSION="1.3";
- my %IRSSI = (
- authors=> '',
- name=> 'btnauto',
- description=> 'btn Auto download script',
- license=> '',
- );
- my $botnick = "Barney";
- my $botchan = "#BTN-WhatAuto";
- my $botaddr = "[email protected]";
- 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 and $target eq $botchan)
- {
- if ($text =~ /^.*?\|.*?\|.*?\|.*?\|.*?\|.*?\|.*?\|(.*?)\|.*?\|.*?\|(.*?)\|.*?\|.*?\|(.*?)$/)
- {
- $category=$1;
- $release=$3;
- $idtup=$2;
- $category =~ s/^\s+|\s+$//g;
- $release =~ s/^\s+|\s+$//g;
- $idtup =~ s/^\s+|\s+$//g;
- if (length($category) > 1 && length($release) > 1 && length($idtup) > 1){
- my $resp1 = `/home/tup/tuper4/bin/tuper local_rls btn \"$idtup\" \"$category\" \"$release\" 2>&1`;
- my $resp=$c->send(\%command);
- undef $c if defined $c;
- }
- }
- }
- Irssi::signal_add("message public", "event_message");
Advertisement
Add Comment
Please, Sign In to add comment