NAME App::Pocoirc - A command line tool for launching POE::Component::IRC clients DESCRIPTION This distribution provides a generic way to launch IRC clients which use POE::Component::IRC. The main features are: * Prints useful status information (to your terminal and/or a log file) * Will daemonize if you so wish * Supports a configuration file * Offers a user friendly way to pass arguments to POE::Component::IRC * Supports multiple IRC components and lets you specify which plugins to load locally (one object per component) or globally (single object) It can be used to launch IRC bots or proxies, loaded with plugins of your choice. It is also very useful for testing and debugging IRC servers. CONFIGURATION nick: foobar1234 username: foobar log_file: /my/log.file lib: '/my/modules' global_plugins: - [CTCP] local_plugins: - [BotTraffic] networks: freenode: server: irc.freenode.net local_plugins: - [AutoJoin, { Channels: ['#foodsfdsf'] } ] magnet: server: irc.perl.org nick: hlagherf32fr The configuration file is in YAML or JSON format. It consists of a hash containing "global_plugins", "local_plugins", "networks", "lib", "log_file", "class", and default parameters to POE::Component::IRC. Only "networks" is required. "lib" is either the name of a directory containing Perl modules (e.g. plugins), or an array of such names. Kind of like Perl's *-I*. "log_file" is the path to a log file to which status messages will be written. "class" is the IRC component class. Defaults to POE::Component::IRC. Networks The "networks" option should be hash of network hashes. The keys are the names of the networks. A network hash can contain "local_plugins" and parameters to POE::Component::IRC. None are required, except "server" if not defined at the top level. The POE::Component::IRC parameters specified in this hash will override the ones specified at the top level. Plugins The "global_plugins" and "local_plugins" options should consist of an array containing the short plugin class name (e.g. 'AutoJoin') and optionally a hash of arguments to that plugin. When figuring out the correct package name, App::Pocoirc will first try to load POE::Component::IRC::Plugin::*your_plugin* before trying to load *your_plugin*. The plugins in "global_plugins" will be instantiated once and then added to all IRC components. Note: not all plugins are designed to be used with multiple IRC components simultaneously. If you specify "local_plugins" at the top level, it will serve as a default list of local plugins, which can be overridden in a network hash. OUTPUT Here is some example output from the program: $ pocoirc -f example/config.yml 2010-09-26 02:49:41 Started (pid 27534) 2010-09-26 02:49:41 Constructing global plugins 2010-09-26 02:49:41 [freenode] Constructing local plugins 2010-09-26 02:49:41 [freenode] Spawning IRC component (POE::Component::IRC::State) 2010-09-26 02:49:41 [magnet] Constructing local plugins 2010-09-26 02:49:41 [magnet] Spawning IRC component (POE::Component::IRC::State) 2010-09-26 02:49:41 [freenode] Registering plugins 2010-09-26 02:49:41 [magnet] Registering plugins 2010-09-26 02:49:41 [freenode] Connecting to IRC 2010-09-26 02:49:41 [magnet] Connecting to IRC 2010-09-26 02:49:41 [freenode] Added plugin Whois3 2010-09-26 02:49:41 [freenode] Added plugin ISupport3 2010-09-26 02:49:41 [freenode] Added plugin DCC3 2010-09-26 02:49:41 [magnet] Added plugin Whois6 2010-09-26 02:49:41 [magnet] Added plugin ISupport6 2010-09-26 02:49:41 [magnet] Added plugin DCC6 2010-09-26 02:49:41 [freenode] Added plugin CTCP2 2010-09-26 02:49:41 [freenode] Added plugin AutoJoin2 2010-09-26 02:49:41 [freenode] Added plugin PocoircStatus2 2010-09-26 02:49:41 [magnet] Added plugin CTCP2 2010-09-26 02:49:41 [magnet] Added plugin PocoircStatus2 2010-09-26 02:49:41 [magnet] Connected to server 217.168.153.160 2010-09-26 02:49:41 [freenode] Connected to server 130.237.188.200 2010-09-26 02:49:41 [magnet] Server notice: *** Looking up your hostname... 2010-09-26 02:49:41 [magnet] Server notice: *** Checking Ident 2010-09-26 02:49:41 [freenode] Server notice: *** Looking up your hostname... 2010-09-26 02:49:41 [freenode] Server notice: *** Checking Ident 2010-09-26 02:49:41 [freenode] Server notice: *** Found your hostname 2010-09-26 02:49:41 [magnet] Server notice: *** Found your hostname 2010-09-26 02:49:51 [magnet] Server notice: *** No Ident response 2010-09-26 02:49:51 [magnet] Logged in to server electret.shadowcat.co.uk with nick hlagherf32fr 2010-09-26 02:49:55 [freenode] Server notice: *** No Ident response 2010-09-26 02:49:55 [freenode] Logged in to server lindbohm.freenode.net with nick foobar1234 2010-09-26 02:50:00 [freenode] Joined channel #foodsfdsf 2010-09-26 02:50:15 Exiting due to SIGINT 2010-09-26 02:50:15 Waiting up to 5 seconds for IRC server(s) to disconnect us 2010-09-26 02:50:15 [magnet] Error from IRC server: Closing Link: 212-30-192-157.static.simnet.is () 2010-09-26 02:50:15 [magnet] Disconnected from server 217.168.153.160 2010-09-26 02:50:15 [magnet] IRC component shut down 2010-09-26 02:50:15 [freenode] Quit from IRC (Client Quit) 2010-09-26 02:50:15 [magnet] Deleted plugin DCC6 2010-09-26 02:50:15 [magnet] Deleted plugin ISupport6 2010-09-26 02:50:15 [magnet] Deleted plugin CTCP2 2010-09-26 02:50:15 [magnet] Deleted plugin Whois6 2010-09-26 02:50:15 [magnet] Deleted plugin PocoircStatus2 2010-09-26 02:50:15 [freenode] Error from IRC server: Closing Link: 212-30-192-157.static.simnet.is (Client Quit) 2010-09-26 02:50:15 [freenode] Disconnected from server 130.237.188.200 2010-09-26 02:50:15 [freenode] IRC component shut down 2010-09-26 02:50:15 [freenode] Deleted plugin DCC3 2010-09-26 02:50:15 [freenode] Deleted plugin AutoJoin2 2010-09-26 02:50:15 [freenode] Deleted plugin CTCP2 2010-09-26 02:50:15 [freenode] Deleted plugin Whois3 2010-09-26 02:50:15 [freenode] Deleted plugin PocoircStatus2 2010-09-26 02:50:15 [freenode] Deleted plugin ISupport3 AUTHOR Hinrik Örn Sigurðsson, hinrik.sig@gmail.com LICENSE AND COPYRIGHT Copyright 2010 Hinrik Örn Sigurðsson This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.