IRC::Bot - Channel Maintenance IRC bot.
#!/usr/bin/perl -w use strict; use IRC::Bot; # Initialize new object my $bot = IRC::Bot->new( Debug => 0, Nick => 'MyBot', Server => 'irc.myserver.com', Password => 'myircpassword', Port => '6667', Username => 'MyBot', Ircname => 'MyBot', Admin => 'admin', Apass => 'iamgod', Channels => [ '#mychan', '#test' ], LogPath => '/home/myhome/bot/log/', NSPass => 'nickservpass' ); # Daemonize process $bot->daemon(); # Run the bot $bot->run(); __END__
A complete bot, similar to eggdrop using POE::Component::IRC. Allows access to all channel user management modes. Provides !seen and !quote functions, a complete help system, logging, dcc chat interface, and it runs as a daemon process. IRC::Bot utilizes Cache::FileCache for seen and quote functions, and also for session handling.
new() Initializes the object, takes bunches of parameters to make things work, see SYNOPSIS for usage.
Debug Tells P::C::I to output the messaging between client/server. Outputs to error.log.
Nick The nick you want your bot to go by.
Server The server you want to connect the bot to.
Password ~Optional~ Sets the password for a password protected server.
Port Port to connect on server.
Username Username for display in /whois .
Ircname Also for /whois display.
Admin Admin name for bot access.
Apass Password for admin access.
Channels List of channels to join, takes as many as you want to fit.
LogPath ~Optional~ The absolute path of where to open log files. If set to 'null', nothing is logged, and error.log will be put in your $ENV{'HOME'} directory.
NSPass ~Optional~ Password to send to NickServ for identification on connect.
daemon() Sets process as a daemon.
run() Starts bot up, registers events, and tons of other neat stuff.
Thanks to Perlmonks.org for education/support/ideas.
Benjamin Smith defitro@just-another.net
POE::Component::IRC Cache::FileCache
To install IRC::Bot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IRC::Bot
CPAN shell
perl -MCPAN -e shell install IRC::Bot
For more information on module installation, please visit the detailed CPAN module installation guide.