Software Freedom Law Center

root/trunk/antimatter/tim/Bot-BasicBot-Pluggable/bin/bot-basicbot-pluggable

Revision 53, 1.0 kB (checked in by bkuhn, 10 months ago)
  • Added SFLC's internally developed tim bot released under AGPLv3
Line 
1 #!/usr/bin/perl
2
3 =head1 NAME
4
5 bot-basicbot-pluggable.pl - A standard Bot::BasicBot::Pluggable script
6
7 =head1 DESCRIPTION
8
9 A standard Bot::BasicBot::Pluggable interface. You can /query the bot to
10 load in more modules. Change the admin password ASAP -
11 See perldoc L<Bot::BasicBot::Pluggable::Auth> for details of this.
12
13 =head1 USAGE
14
15   bot-basicbot-pluggable.pl --nick MyBot --server irc.perl.org
16
17 =head2 SEE ALSO
18
19 Bot::BasicBot::Pluggable
20
21 =cut
22
23 use warnings;
24 use strict;
25 use Bot::BasicBot::Pluggable;
26 use Getopt::Long;
27
28 my ($nick, $server);
29
30 my $result = GetOptions(
31   "nick=s" => \$nick,
32   "server=s" => \$server,
33 );
34
35 unless ($result and $nick and $server) {
36   die "Usage: $0 --nick <nick> --server <server>\n";
37 }
38
39 my $bot = Bot::BasicBot::Pluggable->new(
40   channels => [ ],
41   server => $server,
42   nick => $nick,
43   charset => "utf8",
44 );
45
46 # nice to load this one explicitly
47 $bot->load("Auth");
48
49 # Loader lets you tell the bot to load other modules.
50 $bot->load("Loader");
51
52 $bot->run();
53
Note: See TracBrowser for help on using the browser.

SFLC Main Page

[frdm] Support SFLC