Last active
May 23, 2017 08:08
-
-
Save thatfunkymunki/1515389 to your computer and use it in GitHub Desktop.
trolldb irssi script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/perl | |
use strict; | |
use Irssi; | |
use LWP::UserAgent; | |
use vars qw($VERSION %IRSSI); | |
$VERSION= '1.0'; | |
%IRSSI = ( | |
authors => 'munki', | |
contact => 'thatfunkymunki@gmail.com', | |
name => 'trolldb', | |
description => 'trolls people from trolldb', | |
license => 'BSD', | |
url => 'none', | |
changed => '08-22-2011 0325' | |
); | |
sub query { | |
my ($data, $server, $witem) = @_; | |
my $ua = LWP::UserAgent->new; | |
$ua->agent("irssi/0.1"); | |
my $request = HTTP::Request->new(GET => "http://rolloffle.churchburning.org/troll_me_text.php"); | |
my $result = $ua->request($request); | |
my $content = $result->content; | |
$witem->command("SAY $content"); | |
} | |
Irssi::command_bind ( trolldb => \&query ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment