Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- package WTPABot;
- use base 'Bot::BasicBot';
- use Net::Twitter;
- my $t = Net::Twitter->new(
- traits => [qw/API::REST/],
- username => "theparty",
- password => "password"
- );
- sub topic {
- my $self = shift;
- my $msg = shift;
- if ( $msg->{topic} ne "" ) {
- $t->update( $msg->{topic} );
- print STDERR "TOPIC: " . $msg->{topic} . "\n";
- }
- }
- package main;
- my $bot = WTPABot->new(
- server => "irc.easymac.org",
- channels => ["#really"],
- nick => "wtpa",
- username => "wtpa",
- name => "Party Time"
- );
- $bot->run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement