Changeset 345 for trollforge


Ignore:
Timestamp:
05/27/10 19:20:09 (3 years ago)
Author:
pynchon
Message:

added support for another pb and renamed script

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trollforge/pynchon/pastebin.pl

    r344 r345  
    33# cmdline tool to make the lisp pastebin bot flood freenode chans 
    44# 
    5 # usage: lispbp.pl channel username message 
    6  
     5# usage: 
    76use warnings; 
    87use strict; 
     
    1413my $f = WWW::Mechanize::FormFiller->new(); 
    1514 
     15 
     16if ($#ARGV < 4) { 
     17        print "usage lispbp.pl 1|2 channel username message" 
     18} 
     19 
     20my $pb = shift @ARGV; 
    1621my $chan = shift @ARGV; 
    1722my $user = shift @ARGV; 
    1823my $title = join(' ', @ARGV); 
    1924 
    20 $m->get("http://paste.lisp.org/new/lisp"); 
    2125 
    22 $m->submit_form(form_number => 1, fields => { 
    23                 channel => $chan, 
    24                 username => $user, 
    25                 title => $title, 
    26                 captcha => "lisp", 
    27                 text => "lol" } ); 
     26my $tdb = WWW::Mechanize->new(); 
     27$tdb->get("http://rolloffle.churchburning.org/troll_me.php"); 
     28my $paste = $tdb->content( format => 'text' ); 
     29 
     30if ($pb eq "1") { 
     31        print "using http://paste.lisp.org/new/lisp\n"; 
     32        $m->get("http://paste.lisp.org/new/lisp"); 
     33        $m->submit_form(form_number => 1, fields => { 
     34                        channel => $chan, 
     35                        username => $user, 
     36                        title => $title, 
     37                        captcha => "lisp", 
     38                        text => $paste } ); 
     39} 
     40 
     41if ($pb eq "2") { 
     42        print "using http://erxz.com/pb/html\n"; 
     43        $m->get("http://erxz.com/pb/html"); 
     44        $m->submit_form(form_number => 1, fields => { 
     45                        channel => $chan, 
     46                        nick => $user, 
     47                        summary => $title, 
     48                        paste => $paste } ); 
     49} 
Note: See TracChangeset for help on using the changeset viewer.