Guest User

Untitled

a guest
May 24th, 2013
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1.  
  2.  
  3. use Irssi;
  4. use Irssi::Irc;
  5. use vars qw($VERSION %IRSSI);
  6.  
  7. require "/home/tup/tuper4/starters/announce-helper.pl";
  8.  
  9. my $VERSION="1.3";
  10. my %IRSSI = (
  11. authors=> '',
  12. name=> 'btnauto',
  13. description=> 'btn Auto download script',
  14. license=> '',
  15. );
  16.  
  17.  
  18. my $botnick = "Barney";
  19. my $botchan = "#BTN-WhatAuto";
  20. my $botaddr = "[email protected]";
  21.  
  22. sub event_message {
  23. my ($server, $text, $nick, $address, $target) = @_;
  24.  
  25. $text =~ s/\x03\d?\d?(,\d?\d?)?|\x02|\x1f|\x16|\x06|\x07|\x0f//g;
  26.  
  27. if($nick eq $botnick and $target eq $botchan)
  28. {
  29. if ($text =~ /^.*?\|.*?\|.*?\|.*?\|.*?\|.*?\|.*?\|(.*?)\|.*?\|.*?\|(.*?)\|.*?\|.*?\|(.*?)$/)
  30. {
  31. $category=$1;
  32. $release=$3;
  33. $idtup=$2;
  34. $category =~ s/^\s+|\s+$//g;
  35. $release =~ s/^\s+|\s+$//g;
  36. $idtup =~ s/^\s+|\s+$//g;
  37.  
  38. if (length($category) > 1 && length($release) > 1 && length($idtup) > 1){
  39. my $resp1 = `/home/tup/tuper4/bin/tuper local_rls btn \"$idtup\" \"$category\" \"$release\" 2>&1`;
  40. my $resp=$c->send(\%command);
  41. undef $c if defined $c;
  42.  
  43. }
  44.  
  45. }
  46.  
  47. }
  48.  
  49. Irssi::signal_add("message public", "event_message");
Advertisement
Add Comment
Please, Sign In to add comment