NAME
POE::Component::IRC::Plugin::Logger - A PoCo-IRC plugin which logs public and private messages to disk.
SYNOPSIS
use POE::Component::IRC::Plugin::Logger;
$irc->plugin_add('Logger', POE::Component::IRC::Plugin::Logger->new(
Path => '/home/me/irclogs',
Private => 0,
Public => 1,
));
DESCRIPTION
POE::Component::IRC::Plugin::Logger is a POE::Component::IRC plugin. It logs messages and CTCP ACTIONs to either #some_channel.log or some_nickname.log in the supplied path. It uses Encode::Guess to detect UTF-8 encoding of every message or else falls back to CP1252 (like irssi does by default).
This plugin requires the IRC component to be POE::Component::IRC::State or a subclass thereof. It also requires a POE::Component::IRC::Plugin::BotTraffic to be in the plugin pipeline.
METHODS
- new
-
Arguments:
'Path', the place where you want the logs saved. 'Private', whether or not to log private messages. Defaults to 1. 'Public', whether or not to log public messages. Defaults to 1.Returns a plugin object suitable for feeding to POE::Component::IRC's plugin_add() method.
AUTHOR
Hinrik Örn Sigurðsson, hinrik.sig@gmail.com