.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "POE::Component::IRC 3pm" .TH POE::Component::IRC 3pm "2018-01-01" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" POE::Component::IRC \- A fully event\-driven IRC client module .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& # A simple Rot13 \*(Aqencryption\*(Aq bot \& \& use strict; \& use warnings; \& use POE qw(Component::IRC); \& \& my $nickname = \*(AqFlibble\*(Aq . $$; \& my $ircname = \*(AqFlibble the Sailor Bot\*(Aq; \& my $server = \*(Aqirc.perl.org\*(Aq; \& \& my @channels = (\*(Aq#Blah\*(Aq, \*(Aq#Foo\*(Aq, \*(Aq#Bar\*(Aq); \& \& # We create a new PoCo\-IRC object \& my $irc = POE::Component::IRC\->spawn( \& nick => $nickname, \& ircname => $ircname, \& server => $server, \& ) or die "Oh noooo! $!"; \& \& POE::Session\->create( \& package_states => [ \& main => [ qw(_default _start irc_001 irc_public) ], \& ], \& heap => { irc => $irc }, \& ); \& \& $poe_kernel\->run(); \& \& sub _start { \& my $heap = $_[HEAP]; \& \& # retrieve our component\*(Aqs object from the heap where we stashed it \& my $irc = $heap\->{irc}; \& \& $irc\->yield( register => \*(Aqall\*(Aq ); \& $irc\->yield( connect => { } ); \& return; \& } \& \& sub irc_001 { \& my $sender = $_[SENDER]; \& \& # Since this is an irc_* event, we can get the component\*(Aqs object by \& # accessing the heap of the sender. Then we register and connect to the \& # specified server. \& my $irc = $sender\->get_heap(); \& \& print "Connected to ", $irc\->server_name(), "\en"; \& \& # we join our channels \& $irc\->yield( join => $_ ) for @channels; \& return; \& } \& \& sub irc_public { \& my ($sender, $who, $where, $what) = @_[SENDER, ARG0 .. ARG2]; \& my $nick = ( split /!/, $who )[0]; \& my $channel = $where\->[0]; \& \& if ( my ($rot13) = $what =~ /^rot13 (.+)/ ) { \& $rot13 =~ tr[a\-zA\-Z][n\-za\-mN\-ZA\-M]; \& $irc\->yield( privmsg => $channel => "$nick: $rot13" ); \& } \& return; \& } \& \& # We registered for all events, this will produce some debug info. \& sub _default { \& my ($event, $args) = @_[ARG0 .. $#_]; \& my @output = ( "$event: " ); \& \& for my $arg (@$args) { \& if ( ref $arg eq \*(AqARRAY\*(Aq ) { \& push( @output, \*(Aq[\*(Aq . join(\*(Aq, \*(Aq, @$arg ) . \*(Aq]\*(Aq ); \& } \& else { \& push ( @output, "\*(Aq$arg\*(Aq" ); \& } \& } \& print join \*(Aq \*(Aq, @output, "\en"; \& return; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" POE::Component::IRC is a \s-1POE\s0 component (who'd have guessed?) which acts as an easily controllable \s-1IRC\s0 client for your other \s-1POE\s0 components and sessions. You create an \s-1IRC\s0 component and tell it what events your session cares about and where to connect to, and it sends back interesting \s-1IRC\s0 events when they happen. You make the client do things by sending it events. That's all there is to it. Cool, no? .PP [Note that using this module requires some familiarity with the details of the \s-1IRC\s0 protocol. I'd advise you to read up on the gory details of \s-1RFC 1459\s0 () before you get started. Keep the list of server numeric codes handy while you program. Needless to say, you'll also need a good working knowledge of \&\s-1POE,\s0 or this document will be of very little use to you.] .PP The POE::Component::IRC distribution has a \fIdocs/\fR folder with a collection of salient documentation including the pertinent RFCs. .PP POE::Component::IRC consists of a POE::Session that manages the \s-1IRC\s0 connection and dispatches \f(CW\*(C`irc_\*(C'\fR prefixed events to interested sessions and an object that can be used to access additional information using methods. .PP Sessions register their interest in receiving \f(CW\*(C`irc_\*(C'\fR events by sending \&\f(CW\*(C`register\*(C'\fR to the component. One would usually do this in your \f(CW\*(C`_start\*(C'\fR handler. Your session will continue to receive events until you \f(CW\*(C`unregister\*(C'\fR. The component will continue to stay around until you tell it not to with \f(CW\*(C`shutdown\*(C'\fR. .PP The \s-1SYNOPSIS\s0 demonstrates a fairly basic bot. .PP See POE::Component::IRC::Cookbook for more examples. .SS "Useful subclasses" .IX Subsection "Useful subclasses" Included with POE::Component::IRC are a number of useful subclasses. As they are subclasses they support all the methods, etc. documented here and have additional methods and quirks which are documented separately: .IP "\(bu" 4 POE::Component::IRC::State .Sp POE::Component::IRC::State provides all the functionality of POE::Component::IRC but also tracks \s-1IRC\s0 state entities such as nicks and channels. .IP "\(bu" 4 POE::Component::IRC::Qnet .Sp POE::Component::IRC::Qnet is POE::Component::IRC tweaked for use on Quakenet \s-1IRC\s0 network. .IP "\(bu" 4 POE::Component::IRC::Qnet::State .Sp POE::Component::IRC::Qnet::State is a tweaked version of POE::Component::IRC::State for use on the Quakenet \s-1IRC\s0 network. .SS "The Plugin system" .IX Subsection "The Plugin system" As of 3.7, PoCo-IRC sports a plugin system. The documentation for it can be read by looking at POE::Component::IRC::Plugin. That is not a subclass, just a placeholder for documentation! .PP A number of useful plugins have made their way into the core distribution: .IP "\(bu" 4 POE::Component::IRC::Plugin::DCC .Sp Provides \s-1DCC\s0 support. Loaded by default. .IP "\(bu" 4 POE::Component::IRC::Plugin::AutoJoin .Sp Keeps you on your favorite channels throughout reconnects and even kicks. .IP "\(bu" 4 POE::Component::IRC::Plugin::Connector .Sp Glues an irc bot to an \s-1IRC\s0 network, i.e. deals with maintaining ircd connections. .IP "\(bu" 4 POE::Component::IRC::Plugin::BotTraffic .Sp Under normal circumstances irc bots do not normal the msgs and public msgs that they generate themselves. This plugin enables you to handle those events. .IP "\(bu" 4 POE::Component::IRC::Plugin::BotAddressed .Sp Generates \f(CW\*(C`irc_bot_addressed\*(C'\fR / \f(CW\*(C`irc_bot_mentioned\*(C'\fR / \f(CW\*(C`irc_bot_mentioned_action\*(C'\fR events whenever your bot's name comes up in channel discussion. .IP "\(bu" 4 POE::Component::IRC::Plugin::BotCommand .Sp Provides an easy way to handle commands issued to your bot. .IP "\(bu" 4 POE::Component::IRC::Plugin::Console .Sp See inside the component. See what events are being sent. Generate irc commands manually. A \s-1TCP\s0 based console. .IP "\(bu" 4 POE::Component::IRC::Plugin::FollowTail .Sp Follow the tail of an ever-growing file. .IP "\(bu" 4 POE::Component::IRC::Plugin::Logger .Sp Log public and private messages to disk. .IP "\(bu" 4 POE::Component::IRC::Plugin::NickServID .Sp Identify with NickServ when needed. .IP "\(bu" 4 POE::Component::IRC::Plugin::Proxy .Sp A lightweight \s-1IRC\s0 proxy/bouncer. .IP "\(bu" 4 POE::Component::IRC::Plugin::CTCP .Sp Automagically generates replies to ctcp version, time and userinfo queries. .IP "\(bu" 4 POE::Component::IRC::Plugin::PlugMan .Sp An experimental Plugin Manager plugin. .IP "\(bu" 4 POE::Component::IRC::Plugin::NickReclaim .Sp Automagically deals with your nickname being in use and reclaiming it. .IP "\(bu" 4 POE::Component::IRC::Plugin::CycleEmpty .Sp Cycles (parts and rejoins) channels if they become empty and opless, in order to gain ops. .SH "CONSTRUCTORS" .IX Header "CONSTRUCTORS" Both constructors return an object. The object is also available within 'irc_' event handlers by using \f(CW\*(C`$_[SENDER]\->get_heap()\*(C'\fR. See also \&\f(CW\*(C`register\*(C'\fR and \f(CW\*(C`irc_registered\*(C'\fR. .ie n .SS """spawn""" .el .SS "\f(CWspawn\fP" .IX Subsection "spawn" Takes a number of arguments, all of which are optional. All the options below may be supplied to the \f(CW\*(C`connect\*(C'\fR input event as well, except for \fB'alias'\fR, \fB'options'\fR, \fB'NoDNS'\fR, \fB'debug'\fR, and \&\fB'plugin_debug'\fR. .IP "\(bu" 4 \&\fB'alias'\fR, a name (kernel alias) that this instance will be known by; .IP "\(bu" 4 \&\fB'options'\fR, a hashref containing POE::Session options; .IP "\(bu" 4 \&\fB'Server'\fR, the server name; .IP "\(bu" 4 \&\fB'Port'\fR, the remote port number; .IP "\(bu" 4 \&\fB'Password'\fR, an optional password for restricted servers; .IP "\(bu" 4 \&\fB'Nick'\fR, your client's \s-1IRC\s0 nickname; .IP "\(bu" 4 \&\fB'Username'\fR, your client's username; .IP "\(bu" 4 \&\fB'Ircname'\fR, some cute comment or something. .IP "\(bu" 4 \&\fB'Bitmode'\fR, an integer representing your initial user modes set in the \s-1USER\s0 command. See \s-1RFC 2812.\s0 If you do not set this, \f(CW8\fR (+i) will be used. .IP "\(bu" 4 \&\fB'UseSSL'\fR, set to some true value if you want to connect using \&\s-1SSL.\s0 .IP "\(bu" 4 \&\fB'SSLCert'\fR, set to a \s-1SSL\s0 Certificate(\s-1PAM\s0 encoded) to connect using a client cert .IP "\(bu" 4 \&\fB'SSLKey'\fR, set to a \s-1SSL\s0 Key(\s-1PAM\s0 encoded) to connect using a client cert .IP "\(bu" 4 \&\fB'SSLCtx'\fR, set to a \s-1SSL\s0 Context to configure the \s-1SSL\s0 Connection .Sp The \fB'SSLCert'\fR and \fB'SSLKey'\fR both need to be specified. The \fB'SSLCtx'\fR takes precedence specified. .IP "\(bu" 4 \&\fB'Raw'\fR, set to some true value to enable the component to send \&\f(CW\*(C`irc_raw\*(C'\fR and \f(CW\*(C`irc_raw_out\*(C'\fR events. .IP "\(bu" 4 \&\fB'LocalAddr'\fR, which local \s-1IP\s0 address on a multihomed box to connect as; .IP "\(bu" 4 \&\fB'LocalPort'\fR, the local \s-1TCP\s0 port to open your socket on; .IP "\(bu" 4 \&\fB'NoDNS'\fR, set this to 1 to disable \s-1DNS\s0 lookups using PoCo-Client-DNS. (See note below). .IP "\(bu" 4 \&\fB'Flood'\fR, when true, it disables the component's flood protection algorithms, allowing it to send messages to an \s-1IRC\s0 server at full speed. Disconnects and k\-lines are some common side effects of flooding \s-1IRC\s0 servers, so care should be used when enabling this option. Default is false. .Sp Two new attributes are \fB'Proxy'\fR and \fB'ProxyPort'\fR for sending your =item * \fB'Proxy'\fR, \s-1IP\s0 address or server name of a proxy server to use. .IP "\(bu" 4 \&\fB'ProxyPort'\fR, which tcp port on the proxy to connect to. .IP "\(bu" 4 \&\fB'NATAddr'\fR, what other clients see as your \s-1IP\s0 address. .IP "\(bu" 4 \&\fB'DCCPorts'\fR, an arrayref containing tcp ports that can be used for \s-1DCC\s0 sends. .IP "\(bu" 4 \&\fB'Resolver'\fR, provide a POE::Component::Client::DNS object for the component to use. .IP "\(bu" 4 \&\fB'msg_length'\fR, the maximum length of \s-1IRC\s0 messages, in bytes. Default is 450. The \s-1IRC\s0 component shortens all messages longer than this value minus the length of your current nickname. \s-1IRC\s0 only allows raw protocol lines messages that are 512 bytes or shorter, including the trailing \*(L"\er\en\*(R". This is most relevant to long PRIVMSGs. The \s-1IRC\s0 component can't be sure how long your user@host mask will be every time you send a message, considering that most networks mangle the 'user' part and some even replace the whole string (think FreeNode cloaks). If you have an unusually long user@host mask you might want to decrease this value if you're prone to sending long messages. Conversely, if you have an unusually short one, you can increase this value if you want to be able to send as long a message as possible. Be careful though, increase it too much and the \s-1IRC\s0 server might disconnect you with a \*(L"Request too long\*(R" message when you try to send a message that's too long. .IP "\(bu" 4 \&\fB'debug'\fR, if set to a true value causes the \s-1IRC\s0 component to print every message sent to and from the server, as well as print some warnings when it receives malformed messages. This option will be enabled if the \f(CW\*(C`POCOIRC_DEBUG\*(C'\fR environment variable is set to a true value. .IP "\(bu" 4 \&\fB'plugin_debug'\fR, set to some true value to print plugin debug info, default 0. Plugins are processed inside an eval. When you enable this option, you will be notified when (and why) a plugin raises an exception. This option will be enabled if the \f(CW\*(C`POCOIRC_DEBUG\*(C'\fR environment variable is set to a true value. .IP "\(bu" 4 \&\fB'socks_proxy'\fR, specify a SOCKS4/SOCKS4a proxy to use. .IP "\(bu" 4 \&\fB'socks_port'\fR, the \s-1SOCKS\s0 port to use, defaults to 1080 if not specified. .IP "\(bu" 4 \&\fB'socks_id'\fR, specify a \s-1SOCKS\s0 user_id. Default is none. .IP "\(bu" 4 \&\fB'useipv6'\fR, enable the use of IPv6 for connections. .IP "\(bu" 4 \&\fB'webirc'\fR, enable the use of \s-1WEBIRC\s0 to spoof host/IP. You must have a \s-1WEBIRC\s0 password set up on the \s-1IRC\s0 server/network (so will only work for servers which trust you to spoof the \s-1IP &\s0 host the connection is from) \- value should be a hashref containing keys \f(CW\*(C`pass\*(C'\fR, \f(CW\*(C`user\*(C'\fR, \&\f(CW\*(C`host\*(C'\fR and \f(CW\*(C`ip\*(C'\fR. .PP \&\f(CW\*(C`spawn\*(C'\fR will supply reasonable defaults for any of these attributes which are missing, so don't feel obliged to write them all out. .PP If the component finds that POE::Component::Client::DNS is installed it will use that to resolve the server name passed. Disable this behaviour if you like, by passing: \f(CW\*(C`NoDNS => 1\*(C'\fR. .PP \&\s-1IRC\s0 traffic through a proxy server. \fB'Proxy'\fR's value should be the \s-1IP\s0 address or server name of the proxy. \fB'ProxyPort'\fR's value should be the port on the proxy to connect to. \f(CW\*(C`connect\*(C'\fR will default to using the \fIactual\fR \s-1IRC\s0 server's port if you provide a proxy but omit the proxy's port. These are for \s-1HTTP\s0 Proxies. See \fB'socks_proxy'\fR for \&\s-1SOCKS4\s0 and SOCKS4a support. .PP For those people who run bots behind firewalls and/or Network Address Translation there are two additional attributes for \s-1DCC.\s0 \fB'DCCPorts'\fR, is an arrayref of ports to use when initiating \s-1DCC\s0 connections. \&\fB'NATAddr'\fR, is the \s-1NAT\s0'ed \s-1IP\s0 address that your bot is hidden behind, this is sent whenever you do \s-1DCC.\s0 .PP \&\s-1SSL\s0 support requires POE::Component::SSLify, as well as an \s-1IRC\s0 server that supports \s-1SSL\s0 connections. If you're missing POE::Component::SSLify, specifying \fB'UseSSL'\fR will do nothing. The default is to not try to use \s-1SSL.\s0 .PP \&\fB'Resolver'\fR, requires a POE::Component::Client::DNS object. Useful when spawning multiple poco-irc sessions, saves the overhead of multiple dns sessions. .PP \&\fB'NoDNS'\fR has different results depending on whether it is set with \&\f(CW\*(C`spawn\*(C'\fR or \f(CW\*(C`connect\*(C'\fR. Setting it with \&\f(CW\*(C`spawn\*(C'\fR, disables the creation of the POE::Component::Client::DNS completely. Setting it with \f(CW\*(C`connect\*(C'\fR on the other hand allows the PoCo-Client-DNS session to be spawned, but will disable any dns lookups using it. .PP \&\s-1SOCKS4\s0 proxy support is provided by \fB'socks_proxy'\fR, \fB'socks_port'\fR and \&\fB'socks_id'\fR parameters. If something goes wrong with the \s-1SOCKS\s0 connection you should get a warning on \s-1STDERR.\s0 This is fairly experimental currently. .PP IPv6 support is available for connecting to IPv6 enabled ircds (it won't work for \s-1DCC\s0 though). To enable it, specify \fB'useipv6'\fR. Perl >=5.14 or Socket6 (for older Perls) is required. If you that and POE::Component::Client::DNS installed and specify a hostname that resolves to an IPv6 address then IPv6 will be used. If you specify an ipv6 \fB'localaddr'\fR then IPv6 will be used. .ie n .SS """new""" .el .SS "\f(CWnew\fP" .IX Subsection "new" This method is deprecated. See the \f(CW\*(C`spawn\*(C'\fR method instead. The first argument should be a name (kernel alias) which this new connection will be known by. Optionally takes more arguments (see \&\f(CW\*(C`spawn\*(C'\fR as name/value pairs. Returns a POE::Component::IRC object. :) .PP \&\fBNote:\fR Use of this method will generate a warning. There are currently no plans to make it \fIdie()\fR >;] .SH "METHODS" .IX Header "METHODS" .SS "Information" .IX Subsection "Information" \fI\f(CI\*(C`server\*(C'\fI\fR .IX Subsection "server" .PP Takes no arguments. Returns the server host we are currently connected to (or trying to connect to). .PP \fI\f(CI\*(C`port\*(C'\fI\fR .IX Subsection "port" .PP Takes no arguments. Returns the server port we are currently connected to (or trying to connect to). .PP \fI\f(CI\*(C`server_name\*(C'\fI\fR .IX Subsection "server_name" .PP Takes no arguments. Returns the name of the \s-1IRC\s0 server that the component is currently connected to. .PP \fI\f(CI\*(C`server_version\*(C'\fI\fR .IX Subsection "server_version" .PP Takes no arguments. Returns the \s-1IRC\s0 server version. .PP \fI\f(CI\*(C`nick_name\*(C'\fI\fR .IX Subsection "nick_name" .PP Takes no arguments. Returns a scalar containing the current nickname that the bot is using. .PP \fI\f(CI\*(C`localaddr\*(C'\fI\fR .IX Subsection "localaddr" .PP Takes no arguments. Returns the \s-1IP\s0 address being used. .PP \fI\f(CI\*(C`send_queue\*(C'\fI\fR .IX Subsection "send_queue" .PP The component provides anti-flood throttling. This method takes no arguments and returns a scalar representing the number of messages that are queued up waiting for dispatch to the irc server. .PP \fI\f(CI\*(C`logged_in\*(C'\fI\fR .IX Subsection "logged_in" .PP Takes no arguments. Returns true or false depending on whether the \s-1IRC\s0 component is logged into an \s-1IRC\s0 network. .PP \fI\f(CI\*(C`connected\*(C'\fI\fR .IX Subsection "connected" .PP Takes no arguments. Returns true or false depending on whether the component's socket is currently connected. .PP \fI\f(CI\*(C`disconnect\*(C'\fI\fR .IX Subsection "disconnect" .PP Takes no arguments. Terminates the socket connection disgracefully >;o] .PP \fI\f(CI\*(C`isupport\*(C'\fI\fR .IX Subsection "isupport" .PP Takes one argument, a server capability to query. Returns \f(CW\*(C`undef\*(C'\fR on failure or a value representing the applicable capability. A full list of capabilities is available at . .PP \fI\f(CI\*(C`isupport_dump_keys\*(C'\fI\fR .IX Subsection "isupport_dump_keys" .PP Takes no arguments, returns a list of the available server capabilities keys, which can be used with \f(CW\*(C`isupport\*(C'\fR. .PP \fI\f(CI\*(C`resolver\*(C'\fI\fR .IX Subsection "resolver" .PP Returns a reference to the POE::Component::Client::DNS object that is internally created by the component. .SS "Events" .IX Subsection "Events" \fI\f(CI\*(C`session_id\*(C'\fI\fR .IX Subsection "session_id" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP Takes no arguments. Returns the \s-1ID\s0 of the component's session. Ideal for posting events to the component. .PP .Vb 1 \& $kernel\->post($irc\->session_id() => \*(Aqmode\*(Aq => $channel => \*(Aq+o\*(Aq => $dude); .Ve .PP \fI\f(CI\*(C`session_alias\*(C'\fI\fR .IX Subsection "session_alias" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP Takes no arguments. Returns the session alias that has been set through \&\f(CW\*(C`spawn\*(C'\fR's \fB'alias'\fR argument. .PP \fI\f(CI\*(C`raw_events\*(C'\fI\fR .IX Subsection "raw_events" .PP With no arguments, returns true or false depending on whether \&\f(CW\*(C`irc_raw\*(C'\fR and \f(CW\*(C`irc_raw_out\*(C'\fR events are being generated or not. Provide a true or false argument to enable or disable this feature accordingly. .PP \fI\f(CI\*(C`yield\*(C'\fI\fR .IX Subsection "yield" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP This method provides an alternative object based means of posting events to the component. First argument is the event to post, following arguments are sent as arguments to the resultant post. .PP .Vb 1 \& $irc\->yield(mode => $channel => \*(Aq+o\*(Aq => $dude); .Ve .PP \fI\f(CI\*(C`call\*(C'\fI\fR .IX Subsection "call" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP This method provides an alternative object based means of calling events to the component. First argument is the event to call, following arguments are sent as arguments to the resultant call. .PP .Vb 1 \& $irc\->call(mode => $channel => \*(Aq+o\*(Aq => $dude); .Ve .PP \fI\f(CI\*(C`delay\*(C'\fI\fR .IX Subsection "delay" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP This method provides a way of posting delayed events to the component. The first argument is an arrayref consisting of the delayed command to post and any command arguments. The second argument is the time in seconds that one wishes to delay the command being posted. .PP .Vb 1 \& my $alarm_id = $irc\->delay( [ mode => $channel => \*(Aq+o\*(Aq => $dude ], 60 ); .Ve .PP Returns an alarm \s-1ID\s0 that can be used with \f(CW\*(C`delay_remove\*(C'\fR to cancel the delayed event. This will be undefined if something went wrong. .PP \fI\f(CI\*(C`delay_remove\*(C'\fI\fR .IX Subsection "delay_remove" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP This method removes a previously scheduled delayed event from the component. Takes one argument, the \f(CW\*(C`alarm_id\*(C'\fR that was returned by a \&\f(CW\*(C`delay\*(C'\fR method call. .PP .Vb 1 \& my $arrayref = $irc\->delay_remove( $alarm_id ); .Ve .PP Returns an arrayref that was originally requested to be delayed. .PP \fI\f(CI\*(C`send_event\*(C'\fI\fR .IX Subsection "send_event" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP Sends an event through the component's event handling system. These will get processed by plugins then by registered sessions. First argument is the event name, followed by any parameters for that event. .PP \fI\f(CI\*(C`send_event_next\*(C'\fI\fR .IX Subsection "send_event_next" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP This sends an event right after the one that's currently being processed. Useful if you want to generate some event which is directly related to another event so you want them to appear together. This method can only be called when POE::Component::IRC is processing an event, e.g. from one of your event handlers. Takes the same arguments as \f(CW\*(C`send_event\*(C'\fR. .PP \fI\f(CI\*(C`send_event_now\*(C'\fI\fR .IX Subsection "send_event_now" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP This will send an event to be processed immediately. This means that if an event is currently being processed and there are plugins or sessions which will receive it after you do, then an event sent with \f(CW\*(C`send_event_now\*(C'\fR will be received by those plugins/sessions \fIbefore\fR the current event. Takes the same arguments as \f(CW\*(C`send_event\*(C'\fR. .SS "Plugins" .IX Subsection "Plugins" \fI\f(CI\*(C`pipeline\*(C'\fI\fR .IX Subsection "pipeline" .PP \&\fIInherited from Object::Pluggable\fR .PP Returns the Object::Pluggable::Pipeline object. .PP \fI\f(CI\*(C`plugin_add\*(C'\fI\fR .IX Subsection "plugin_add" .PP \&\fIInherited from Object::Pluggable\fR .PP Accepts two arguments: .PP .Vb 3 \& The alias for the plugin \& The actual plugin object \& Any number of extra arguments .Ve .PP The alias is there for the user to refer to it, as it is possible to have multiple plugins of the same kind active in one Object::Pluggable object. .PP This method goes through the pipeline's \f(CW\*(C`push()\*(C'\fR method, which will call \&\f(CW\*(C`$plugin\->plugin_register($pluggable, @args)\*(C'\fR. .PP Returns the number of plugins now in the pipeline if plugin was initialized, \&\f(CW\*(C`undef\*(C'\fR/an empty list if not. .PP \fI\f(CI\*(C`plugin_del\*(C'\fI\fR .IX Subsection "plugin_del" .PP \&\fIInherited from Object::Pluggable\fR .PP Accepts the following arguments: .PP .Vb 2 \& The alias for the plugin or the plugin object itself \& Any number of extra arguments .Ve .PP This method goes through the pipeline's \f(CW\*(C`remove()\*(C'\fR method, which will call \&\f(CW\*(C`$plugin\->plugin_unregister($pluggable, @args)\*(C'\fR. .PP Returns the plugin object if the plugin was removed, \f(CW\*(C`undef\*(C'\fR/an empty list if not. .PP \fI\f(CI\*(C`plugin_get\*(C'\fI\fR .IX Subsection "plugin_get" .PP \&\fIInherited from Object::Pluggable\fR .PP Accepts the following arguments: .PP .Vb 1 \& The alias for the plugin .Ve .PP This method goes through the pipeline's \f(CW\*(C`get()\*(C'\fR method. .PP Returns the plugin object if it was found, \f(CW\*(C`undef\*(C'\fR/an empty list if not. .PP \fI\f(CI\*(C`plugin_list\*(C'\fI\fR .IX Subsection "plugin_list" .PP \&\fIInherited from Object::Pluggable\fR .PP Takes no arguments. .PP Returns a hashref of plugin objects, keyed on alias, or an empty list if there are no plugins loaded. .PP \fI\f(CI\*(C`plugin_order\*(C'\fI\fR .IX Subsection "plugin_order" .PP \&\fIInherited from Object::Pluggable\fR .PP Takes no arguments. .PP Returns an arrayref of plugin objects, in the order which they are encountered in the pipeline. .PP \fI\f(CI\*(C`plugin_register\*(C'\fI\fR .IX Subsection "plugin_register" .PP \&\fIInherited from Object::Pluggable\fR .PP Accepts the following arguments: .PP .Vb 3 \& The plugin object \& The type of the hook (the hook types are specified with _pluggable_init()\*(Aqs \*(Aqtypes\*(Aq) \& The event name[s] to watch .Ve .PP The event names can be as many as possible, or an arrayref. They correspond to the prefixed events and naturally, arbitrary events too. .PP You do not need to supply events with the prefix in front of them, just the names. .PP It is possible to register for all events by specifying 'all' as an event. .PP Returns 1 if everything checked out fine, \f(CW\*(C`undef\*(C'\fR/an empty list if something is seriously wrong. .PP \fI\f(CI\*(C`plugin_unregister\*(C'\fI\fR .IX Subsection "plugin_unregister" .PP \&\fIInherited from Object::Pluggable\fR .PP Accepts the following arguments: .PP .Vb 3 \& The plugin object \& The type of the hook (the hook types are specified with _pluggable_init()\*(Aqs \*(Aqtypes\*(Aq) \& The event name[s] to unwatch .Ve .PP The event names can be as many as possible, or an arrayref. They correspond to the prefixed events and naturally, arbitrary events too. .PP You do not need to supply events with the prefix in front of them, just the names. .PP It is possible to register for all events by specifying 'all' as an event. .PP Returns 1 if all the event name[s] was unregistered, undef if some was not found. .SH "INPUT EVENTS" .IX Header "INPUT EVENTS" How to talk to your new \s-1IRC\s0 component... here's the events we'll accept. These are events that are posted to the component, either via \&\f(CW\*(C`$poe_kernel\->post()\*(C'\fR or via the object method \f(CW\*(C`yield\*(C'\fR. .PP So the following would be functionally equivalent: .PP .Vb 3 \& sub irc_001 { \& my ($kernel,$sender) = @_[KERNEL,SENDER]; \& my $irc = $sender\->get_heap(); # obtain the poco\*(Aqs object \& \& $irc\->yield( privmsg => \*(Aqfoo\*(Aq => \*(AqHowdy!\*(Aq ); \& $kernel\->post( $sender => privmsg => \*(Aqfoo\*(Aq => \*(AqHowdy!\*(Aq ); \& $kernel\->post( $irc\->session_id() => privmsg => \*(Aqfoo\*(Aq => \*(AqHowdy!\*(Aq ); \& $kernel\->post( $irc\->session_alias() => privmsg => \*(Aqfoo\*(Aq => \*(AqHowdy!\*(Aq ); \& \& return; \& } .Ve .SS "Important Commands" .IX Subsection "Important Commands" \fI\f(CI\*(C`register\*(C'\fI\fR .IX Subsection "register" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP Takes N arguments: a list of event names that your session wants to listen for, minus the \f(CW\*(C`irc_\*(C'\fR prefix. So, for instance, if you just want a bot that keeps track of which people are on a channel, you'll need to listen for JOINs, PARTs, QUITs, and KICKs to people on the channel you're in. You'd tell POE::Component::IRC that you want those events by saying this: .PP .Vb 1 \& $kernel\->post(\*(Aqmy client\*(Aq, \*(Aqregister\*(Aq, qw(join part quit kick)); .Ve .PP Then, whenever people enter or leave a channel your bot is on (forcibly or not), your session will receive events with names like \&\f(CW\*(C`irc_join\*(C'\fR, \f(CW\*(C`irc_kick\*(C'\fR, etc., which you can use to update a list of people on the channel. .PP Registering for \fB'all'\fR will cause it to send all IRC-related events to you; this is the easiest way to handle it. See the test script for an example. .PP Registering will generate an \f(CW\*(C`irc_registered\*(C'\fR event that your session can trap. \f(CW\*(C`ARG0\*(C'\fR is the components object. Useful if you want to bolt PoCo-IRC's new features such as Plugins into a bot coded to the older deprecated \s-1API.\s0 If you are using the new \s-1API,\s0 ignore this :) .PP Registering with multiple component sessions can be tricky, especially if one wants to marry up sessions/objects, etc. Check the \s-1SIGNALS\s0 section for an alternative method of registering with multiple poco-ircs. .PP Starting with version 4.96, if you spawn the component from inside another \s-1POE\s0 session, the component will automatically register that session as wanting \&\fB'all'\fR irc events. That session will receive an \&\f(CW\*(C`irc_registered\*(C'\fR event indicating that the component is up and ready to go. .PP \fI\f(CI\*(C`unregister\*(C'\fI\fR .IX Subsection "unregister" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP Takes N arguments: a list of event names which you \fIdon't\fR want to receive. If you've previously done a \f(CW\*(C`register\*(C'\fR for a particular event which you no longer care about, this event will tell the \s-1IRC\s0 connection to stop sending them to you. (If you haven't, it just ignores you. No big deal.) .PP If you have registered with 'all', attempting to unregister individual events such as 'mode', etc. will not work. This is a 'feature'. .PP \fI\f(CI\*(C`connect\*(C'\fI\fR .IX Subsection "connect" .PP Takes one argument: a hash reference of attributes for the new connection, see \f(CW\*(C`spawn\*(C'\fR for details. This event tells the \s-1IRC\s0 client to connect to a new/different server. If it has a connection already open, it'll close it gracefully before reconnecting. .PP \fI\f(CI\*(C`ctcp\*(C'\fI and \f(CI\*(C`ctcpreply\*(C'\fI\fR .IX Subsection "ctcp and ctcpreply" .PP Sends a \s-1CTCP\s0 query or response to the nick(s) or channel(s) which you specify. Takes 2 arguments: the nick or channel to send a message to (use an array reference here to specify multiple recipients), and the plain text of the message to send (the \s-1CTCP\s0 quoting will be handled for you). The \*(L"/me\*(R" command in popular \s-1IRC\s0 clients is actually a \s-1CTCP\s0 action. .PP .Vb 2 \& # Doing a /me \& $irc\->yield(ctcp => $channel => \*(AqACTION dances.\*(Aq); .Ve .PP \fI\f(CI\*(C`join\*(C'\fI\fR .IX Subsection "join" .PP Tells your \s-1IRC\s0 client to join a single channel of your choice. Takes at least one arg: the channel name (required) and the channel key (optional, for password-protected channels). .PP \fI\f(CI\*(C`kick\*(C'\fI\fR .IX Subsection "kick" .PP Tell the \s-1IRC\s0 server to forcibly evict a user from a particular channel. Takes at least 2 arguments: a channel name, the nick of the user to boot, and an optional witty message to show them as they sail out the door. .PP \fI\f(CI\*(C`remove\*(C'\fI\fR .IX Subsection "remove" .PP Tell the \s-1IRC\s0 server to forcibly evict a user from a particular channel. Takes at least 2 arguments: a channel name, the nick of the user to boot, and an optional witty message to show them as they sail out the door. Similar to \s-1KICK\s0 but does an enforced \s-1PART\s0 instead. Not supported by all servers. .PP \fI\f(CI\*(C`mode\*(C'\fI\fR .IX Subsection "mode" .PP Request a mode change on a particular channel or user. Takes at least one argument: the mode changes to effect, as a single string (e.g. \&\*(L"#mychan +sm\-p+o\*(R"), and any number of optional operands to the mode changes (nicks, hostmasks, channel keys, whatever.) Or just pass them all as one big string and it'll still work, whatever. I regret that I haven't the patience now to write a detailed explanation, but serious \s-1IRC\s0 users know the details anyhow. .PP \fI\f(CI\*(C`nick\*(C'\fI\fR .IX Subsection "nick" .PP Allows you to change your nickname. Takes exactly one argument: the new username that you'd like to be known as. .PP \fI\f(CI\*(C`nickserv\*(C'\fI\fR .IX Subsection "nickserv" .PP Talks to NickServ, on networks which have it. Takes any number of arguments. .PP \fI\f(CI\*(C`notice\*(C'\fI\fR .IX Subsection "notice" .PP Sends a \s-1NOTICE\s0 message to the nick(s) or channel(s) which you specify. Takes 2 arguments: the nick or channel to send a notice to (use an array reference here to specify multiple recipients), and the text of the notice to send. .PP \fI\f(CI\*(C`part\*(C'\fI\fR .IX Subsection "part" .PP Tell your \s-1IRC\s0 client to leave the channels which you pass to it. Takes any number of arguments: channel names to depart from. If the last argument doesn't begin with a channel name identifier or contains a space character, it will be treated as a \s-1PART\s0 message and dealt with accordingly. .PP \fI\f(CI\*(C`privmsg\*(C'\fI\fR .IX Subsection "privmsg" .PP Sends a public or private message to the nick(s) or channel(s) which you specify. Takes 2 arguments: the nick or channel to send a message to (use an array reference here to specify multiple recipients), and the text of the message to send. .PP Have a look at the constants in IRC::Utils if you would like to use formatting and color codes in your messages. .PP .Vb 1 \& $irc\->yield(\*(Aqprimvsg\*(Aq, \*(Aq#mychannel\*(Aq, \*(AqHello there\*(Aq); \& \& # same, but with a green Hello \& use IRC::Utils qw(GREEN NORMAL); \& $irc\->yield(\*(Aqprimvsg\*(Aq, \*(Aq#mychannel\*(Aq, GREEN.\*(AqHello\*(Aq.NORMAL.\*(Aq there\*(Aq); .Ve .PP \fI\f(CI\*(C`quit\*(C'\fI\fR .IX Subsection "quit" .PP Tells the \s-1IRC\s0 server to disconnect you. Takes one optional argument: some clever, witty string that other users in your channels will see as you leave. You can expect to get an \&\f(CW\*(C`irc_disconnected\*(C'\fR event shortly after sending this. .PP \fI\f(CI\*(C`shutdown\*(C'\fI\fR .IX Subsection "shutdown" .PP By default, POE::Component::IRC sessions never go away. Even after they're disconnected, they're still sitting around in the background, waiting for you to call \f(CW\*(C`connect\*(C'\fR on them again to reconnect. (Whether this behavior is the Right Thing is doubtful, but I don't want to break backwards compatibility at this point.) You can send the \s-1IRC\s0 session a \f(CW\*(C`shutdown\*(C'\fR event manually to make it delete itself. .PP If you are logged into an \s-1IRC\s0 server, \f(CW\*(C`shutdown\*(C'\fR first will send a quit message and wait to be disconnected. It will wait for up to 5 seconds before forcibly disconnecting from the \s-1IRC\s0 server. If you provide an argument, that will be used as the \s-1QUIT\s0 message. If you provide two arguments, the second one will be used as the timeout (in seconds). .PP Terminating multiple components can be tricky. Check the \s-1SIGNALS\s0 section for a method of shutting down multiple poco-ircs. .PP \fI\f(CI\*(C`topic\*(C'\fI\fR .IX Subsection "topic" .PP Retrieves or sets the topic for particular channel. If called with just the channel name as an argument, it will ask the server to return the current topic. If called with the channel name and a string, it will set the channel topic to that string. Supply an empty string to unset a channel topic. .PP \fI\f(CI\*(C`debug\*(C'\fI\fR .IX Subsection "debug" .PP Takes one argument: 0 to turn debugging off or 1 to turn debugging on. This flips the debugging flag in POE::Filter::IRCD, POE::Filter::IRC::Compat, and POE::Component::IRC. This has the same effect as setting Debug in \&\f(CW\*(C`spawn\*(C'\fR or \f(CW\*(C`connect\*(C'\fR. .SS "Not-So-Important Commands" .IX Subsection "Not-So-Important Commands" \fI\f(CI\*(C`admin\*(C'\fI\fR .IX Subsection "admin" .PP Asks your server who your friendly neighborhood server administrators are. If you prefer, you can pass it a server name to query, instead of asking the server you're currently on. .PP \fI\f(CI\*(C`away\*(C'\fI\fR .IX Subsection "away" .PP When sent with an argument (a message describig where you went), the server will note that you're now away from your machine or otherwise preoccupied, and pass your message along to anyone who tries to communicate with you. When sent without arguments, it tells the server that you're back and paying attention. .PP \fI\f(CI\*(C`cap\*(C'\fI\fR .IX Subsection "cap" .PP Used to query/enable/disable \s-1IRC\s0 protocol capabilities. Takes any number of arguments. .PP \fI\f(CI\*(C`dcc*\*(C'\fI\fR .IX Subsection "dcc*" .PP See the \s-1DCC\s0 plugin (loaded by default) documentation for DCC-related commands. .PP \fI\f(CI\*(C`info\*(C'\fI\fR .IX Subsection "info" .PP Basically the same as the \f(CW\*(C`version\*(C'\fR command, except that the server is permitted to return any information about itself that it thinks is relevant. There's some nice, specific standards-writing for ya, eh? .PP \fI\f(CI\*(C`invite\*(C'\fI\fR .IX Subsection "invite" .PP Invites another user onto an invite-only channel. Takes 2 arguments: the nick of the user you wish to admit, and the name of the channel to invite them to. .PP \fI\f(CI\*(C`ison\*(C'\fI\fR .IX Subsection "ison" .PP Asks the \s-1IRC\s0 server which users out of a list of nicknames are currently online. Takes any number of arguments: a list of nicknames to query the \s-1IRC\s0 server about. .PP \fI\f(CI\*(C`links\*(C'\fI\fR .IX Subsection "links" .PP Asks the server for a list of servers connected to the \s-1IRC\s0 network. Takes two optional arguments, which I'm too lazy to document here, so all you would-be linklooker writers should probably go dig up the \s-1RFC.\s0 .PP \fI\f(CI\*(C`list\*(C'\fI\fR .IX Subsection "list" .PP Asks the server for a list of visible channels and their topics. Takes any number of optional arguments: names of channels to get topic information for. If called without any channel names, it'll list every visible channel on the \s-1IRC\s0 network. This is usually a really big list, so don't do this often. .PP \fI\f(CI\*(C`motd\*(C'\fI\fR .IX Subsection "motd" .PP Request the server's \*(L"Message of the Day\*(R", a document which typically contains stuff like the server's acceptable use policy and admin contact email addresses, et cetera. Normally you'll automatically receive this when you log into a server, but if you want it again, here's how to do it. If you'd like to get the \s-1MOTD\s0 for a server other than the one you're logged into, pass it the server's hostname as an argument; otherwise, no arguments. .PP \fI\f(CI\*(C`names\*(C'\fI\fR .IX Subsection "names" .PP Asks the server for a list of nicknames on particular channels. Takes any number of arguments: names of channels to get lists of users for. If called without any channel names, it'll tell you the nicks of everyone on the \s-1IRC\s0 network. This is a really big list, so don't do this much. .PP \fI\f(CI\*(C`quote\*(C'\fI\fR .IX Subsection "quote" .PP Sends a raw line of text to the server. Takes one argument: a string of a raw \s-1IRC\s0 command to send to the server. It is more optimal to use the events this module supplies instead of writing raw \s-1IRC\s0 commands yourself. .PP \fI\f(CI\*(C`stats\*(C'\fI\fR .IX Subsection "stats" .PP Returns some information about a server. Kinda complicated and not terribly commonly used, so look it up in the \s-1RFC\s0 if you're curious. Takes as many arguments as you please. .PP \fI\f(CI\*(C`time\*(C'\fI\fR .IX Subsection "time" .PP Asks the server what time it thinks it is, which it will return in a human-readable form. Takes one optional argument: a server name to query. If not supplied, defaults to current server. .PP \fI\f(CI\*(C`trace\*(C'\fI\fR .IX Subsection "trace" .PP If you pass a server name or nick along with this request, it asks the server for the list of servers in between you and the thing you mentioned. If sent with no arguments, it will show you all the servers which are connected to your current server. .PP \fI\f(CI\*(C`users\*(C'\fI\fR .IX Subsection "users" .PP Asks the server how many users are logged into it. Defaults to the server you're currently logged into; however, you can pass a server name as the first argument to query some other machine instead. .PP \fI\f(CI\*(C`version\*(C'\fI\fR .IX Subsection "version" .PP Asks the server about the version of ircd that it's running. Takes one optional argument: a server name to query. If not supplied, defaults to current server. .PP \fI\f(CI\*(C`who\*(C'\fI\fR .IX Subsection "who" .PP Lists the logged-on users matching a particular channel name, hostname, nickname, or what-have-you. Takes one optional argument: a string for it to search for. Wildcards are allowed; in the absence of this argument, it will return everyone who's currently logged in (bad move). Tack an \*(L"o\*(R" on the end if you want to list only IRCops, as per the \s-1RFC.\s0 .PP \fI\f(CI\*(C`whois\*(C'\fI\fR .IX Subsection "whois" .PP Queries the \s-1IRC\s0 server for detailed information about a particular user. Takes any number of arguments: nicknames or hostmasks to ask for information about. As of version 3.2, you will receive an \&\f(CW\*(C`irc_whois\*(C'\fR event in addition to the usual numeric responses. See below for details. .PP \fI\f(CI\*(C`whowas\*(C'\fI\fR .IX Subsection "whowas" .PP Asks the server for information about nickname which is no longer connected. Takes at least one argument: a nickname to look up (no wildcards allowed), the optional maximum number of history entries to return, and the optional server hostname to query. As of version 3.2, you will receive an \f(CW\*(C`irc_whowas\*(C'\fR event in addition to the usual numeric responses. See below for details. .PP \fI\f(CI\*(C`ping\*(C'\fI and \f(CI\*(C`pong\*(C'\fI\fR .IX Subsection "ping and pong" .PP Included for completeness sake. The component will deal with ponging to pings automatically. Don't worry about it. .SS "Purely Esoteric Commands" .IX Subsection "Purely Esoteric Commands" \fI\f(CI\*(C`die\*(C'\fI\fR .IX Subsection "die" .PP Tells the \s-1IRC\s0 server you're connect to, to terminate. Only useful for IRCops, thank goodness. Takes no arguments. .PP \fI\f(CI\*(C`locops\*(C'\fI\fR .IX Subsection "locops" .PP Opers-only command. This one sends a message to all currently logged-on local-opers (+l). This option is specific to EFNet. .PP \fI\f(CI\*(C`oper\*(C'\fI\fR .IX Subsection "oper" .PP In the exceedingly unlikely event that you happen to be an \s-1IRC\s0 operator, you can use this command to authenticate with your \s-1IRC\s0 server. Takes 2 arguments: your username and your password. .PP \fI\f(CI\*(C`operwall\*(C'\fI\fR .IX Subsection "operwall" .PP Opers-only command. This one sends a message to all currently logged-on global opers. This option is specific to EFNet. .PP \fI\f(CI\*(C`rehash\*(C'\fI\fR .IX Subsection "rehash" .PP Tells the \s-1IRC\s0 server you're connected to, to rehash its configuration files. Only useful for IRCops. Takes no arguments. .PP \fI\f(CI\*(C`restart\*(C'\fI\fR .IX Subsection "restart" .PP Tells the \s-1IRC\s0 server you're connected to, to shut down and restart itself. Only useful for IRCops, thank goodness. Takes no arguments. .PP \fI\f(CI\*(C`sconnect\*(C'\fI\fR .IX Subsection "sconnect" .PP Tells one \s-1IRC\s0 server (which you have operator status on) to connect to another. This is actually the \s-1CONNECT\s0 command, but I already had an event called \f(CW\*(C`connect\*(C'\fR, so too bad. Takes the args you'd expect: a server to connect to, an optional port to connect on, and an optional remote server to connect with, instead of the one you're currently on. .PP \fI\f(CI\*(C`squit\*(C'\fI\fR .IX Subsection "squit" .PP Operator-only command used to disconnect server links. Takes two arguments, the server to disconnect and a message explaining your action. .PP \fI\f(CI\*(C`summon\*(C'\fI\fR .IX Subsection "summon" .PP Don't even ask. .PP \fI\f(CI\*(C`servlist\*(C'\fI\fR .IX Subsection "servlist" .PP Lists the currently connected services on the network that are visible to you. Takes two optional arguments, a mask for matching service names against, and a service type. .PP \fI\f(CI\*(C`squery\*(C'\fI\fR .IX Subsection "squery" .PP Sends a message to a service. Takes the same arguments as \&\f(CW\*(C`privmsg\*(C'\fR. .PP \fI\f(CI\*(C`userhost\*(C'\fI\fR .IX Subsection "userhost" .PP Asks the \s-1IRC\s0 server for information about particular nicknames. (The \&\s-1RFC\s0 doesn't define exactly what this is supposed to return.) Takes any number of arguments: the nicknames to look up. .PP \fI\f(CI\*(C`wallops\*(C'\fI\fR .IX Subsection "wallops" .PP Another opers-only command. This one sends a message to all currently logged-on opers (and +w users); sort of a mass \s-1PA\s0 system for the \s-1IRC\s0 server administrators. Takes one argument: some clever, witty message to send. .SH "OUTPUT EVENTS" .IX Header "OUTPUT EVENTS" The events you will receive (or can ask to receive) from your running \&\s-1IRC\s0 component. Note that all incoming event names your session will receive are prefixed by \f(CW\*(C`irc_\*(C'\fR, to inhibit event namespace pollution. .PP If you wish, you can ask the client to send you every event it generates. Simply register for the event name \*(L"all\*(R". This is a lot easier than writing a huge list of things you specifically want to listen for. .PP \&\s-1FIXME: I\s0'd really like to classify these somewhat (\*(L"basic\*(R", \*(L"oper\*(R", \*(L"ctcp\*(R", \&\*(L"dcc\*(R", \*(L"raw\*(R" or some such), and I'd welcome suggestions for ways to make this easier on the user, if you can think of some. .PP In your event handlers, \f(CW$_[SENDER]\fR is the particular component session that sent you the event. \f(CW\*(C`$_[SENDER]\->get_heap()\*(C'\fR will retrieve the component's object. Useful if you want on-the-fly access to the object and its methods. .SS "Important Events" .IX Subsection "Important Events" \fI\f(CI\*(C`irc_registered\*(C'\fI\fR .IX Subsection "irc_registered" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP Sent once to the requesting session on registration (see \&\f(CW\*(C`register\*(C'\fR). \f(CW\*(C`ARG0\*(C'\fR is a reference tothe component's object. .PP \fI\f(CI\*(C`irc_shutdown\*(C'\fI\fR .IX Subsection "irc_shutdown" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP Sent to all registered sessions when the component has been asked to \&\f(CW\*(C`shutdown\*(C'\fR. \f(CW\*(C`ARG0\*(C'\fR will be the session \s-1ID\s0 of the requesting session. .PP \fI\f(CI\*(C`irc_connected\*(C'\fI\fR .IX Subsection "irc_connected" .PP The \s-1IRC\s0 component will send an \f(CW\*(C`irc_connected\*(C'\fR event as soon as it establishes a connection to an \s-1IRC\s0 server, before attempting to log in. \f(CW\*(C`ARG0\*(C'\fR is the server name. .PP \&\fB\s-1NOTE:\s0\fR When you get an \f(CW\*(C`irc_connected\*(C'\fR event, this doesn't mean you can start sending commands to the server yet. Wait until you receive an \f(CW\*(C`irc_001\*(C'\fR event (the server welcome message) before actually sending anything back to the server. .PP \fI\f(CI\*(C`irc_ctcp\*(C'\fI\fR .IX Subsection "irc_ctcp" .PP \&\f(CW\*(C`irc_ctcp\*(C'\fR events are generated upon receipt of \s-1CTCP\s0 messages, in addition to the \f(CW\*(C`irc_ctcp_*\*(C'\fR events mentioned below. They are identical in every way to these, with one difference: instead of the * being in the method name, it is prepended to the argument list. For example, if someone types \f(CW\*(C`/ctcp Flibble foo bar\*(C'\fR, an \f(CW\*(C`irc_ctcp\*(C'\fR event will be sent with \fB'foo'\fR as \f(CW\*(C`ARG0\*(C'\fR, and the rest as given below. .PP It is not recommended that you register for both \f(CW\*(C`irc_ctcp\*(C'\fR and \f(CW\*(C`irc_ctcp_*\*(C'\fR events, since they will both be fired and presumably cause duplication. .PP \fI\f(CI\*(C`irc_ctcp_*\*(C'\fI\fR .IX Subsection "irc_ctcp_*" .PP \&\f(CW\*(C`irc_ctcp_whatever\*(C'\fR events are generated upon receipt of \s-1CTCP\s0 messages. For instance, receiving a \s-1CTCP PING\s0 request generates an \f(CW\*(C`irc_ctcp_ping\*(C'\fR event, \s-1CTCP ACTION\s0 (produced by typing \*(L"/me\*(R" in most \s-1IRC\s0 clients) generates an \f(CW\*(C`irc_ctcp_action\*(C'\fR event, blah blah, so on and so forth. \f(CW\*(C`ARG0\*(C'\fR is the nick!hostmask of the sender. \f(CW\*(C`ARG1\*(C'\fR is the channel/recipient name(s). \f(CW\*(C`ARG2\*(C'\fR is the text of the \s-1CTCP\s0 message. On servers supporting the IDENTIFY-MSG feature (e.g. FreeNode), \s-1CTCP\s0 ACTIONs will have \f(CW\*(C`ARG3\*(C'\fR, which will be \f(CW1\fR if the sender has identified with NickServ, \f(CW0\fR otherwise. .PP Note that DCCs are handled separately \*(-- see the \&\s-1DCC\s0 plugin. .PP \fI\f(CI\*(C`irc_ctcpreply_*\*(C'\fI\fR .IX Subsection "irc_ctcpreply_*" .PP \&\f(CW\*(C`irc_ctcpreply_whatever\*(C'\fR messages are just like \f(CW\*(C`irc_ctcp_whatever\*(C'\fR messages, described above, except that they're generated when a response to one of your \s-1CTCP\s0 queries comes back. They have the same arguments and such as \f(CW\*(C`irc_ctcp_*\*(C'\fR events. .PP \fI\f(CI\*(C`irc_disconnected\*(C'\fI\fR .IX Subsection "irc_disconnected" .PP The counterpart to \f(CW\*(C`irc_connected\*(C'\fR, sent whenever a socket connection to an \s-1IRC\s0 server closes down (whether intentionally or unintentionally). \f(CW\*(C`ARG0\*(C'\fR is the server name. .PP \fI\f(CI\*(C`irc_error\*(C'\fI\fR .IX Subsection "irc_error" .PP You get this whenever the server sends you an \s-1ERROR\s0 message. Expect this to usually be accompanied by the sudden dropping of your connection. \f(CW\*(C`ARG0\*(C'\fR is the server's explanation of the error. .PP \fI\f(CI\*(C`irc_join\*(C'\fI\fR .IX Subsection "irc_join" .PP Sent whenever someone joins a channel that you're on. \f(CW\*(C`ARG0\*(C'\fR is the person's nick!hostmask. \f(CW\*(C`ARG1\*(C'\fR is the channel name. .PP \fI\f(CI\*(C`irc_invite\*(C'\fI\fR .IX Subsection "irc_invite" .PP Sent whenever someone offers you an invitation to another channel. \f(CW\*(C`ARG0\*(C'\fR is the person's nick!hostmask. \f(CW\*(C`ARG1\*(C'\fR is the name of the channel they want you to join. .PP \fI\f(CI\*(C`irc_kick\*(C'\fI\fR .IX Subsection "irc_kick" .PP Sent whenever someone gets booted off a channel that you're on. \f(CW\*(C`ARG0\*(C'\fR is the kicker's nick!hostmask. \f(CW\*(C`ARG1\*(C'\fR is the channel name. \f(CW\*(C`ARG2\*(C'\fR is the nick of the unfortunate kickee. \f(CW\*(C`ARG3\*(C'\fR is the explanation string for the kick. .PP \fI\f(CI\*(C`irc_mode\*(C'\fI\fR .IX Subsection "irc_mode" .PP Sent whenever someone changes a channel mode in your presence, or when you change your own user mode. \f(CW\*(C`ARG0\*(C'\fR is the nick!hostmask of that someone. \f(CW\*(C`ARG1\*(C'\fR is the channel it affects (or your nick, if it's a user mode change). \f(CW\*(C`ARG2\*(C'\fR is the mode string (i.e., \*(L"+o\-b\*(R"). The rest of the args (\f(CW\*(C`ARG3 .. $#_\*(C'\fR) are the operands to the mode string (nicks, hostmasks, channel keys, whatever). .PP \fI\f(CI\*(C`irc_msg\*(C'\fI\fR .IX Subsection "irc_msg" .PP Sent whenever you receive a \s-1PRIVMSG\s0 command that was addressed to you privately. \f(CW\*(C`ARG0\*(C'\fR is the nick!hostmask of the sender. \f(CW\*(C`ARG1\*(C'\fR is an array reference containing the nick(s) of the recipients. \f(CW\*(C`ARG2\*(C'\fR is the text of the message. On servers supporting the IDENTIFY-MSG feature (e.g. FreeNode), there will be an additional argument, \f(CW\*(C`ARG3\*(C'\fR, which will be \&\f(CW1\fR if the sender has identified with NickServ, \f(CW0\fR otherwise. .PP \fI\f(CI\*(C`irc_nick\*(C'\fI\fR .IX Subsection "irc_nick" .PP Sent whenever you, or someone around you, changes nicks. \f(CW\*(C`ARG0\*(C'\fR is the nick!hostmask of the changer. \f(CW\*(C`ARG1\*(C'\fR is the new nick that they changed to. .PP \fI\f(CI\*(C`irc_notice\*(C'\fI\fR .IX Subsection "irc_notice" .PP Sent whenever you receive a \s-1NOTICE\s0 command. \f(CW\*(C`ARG0\*(C'\fR is the nick!hostmask of the sender. \f(CW\*(C`ARG1\*(C'\fR is an array reference containing the nick(s) or channel name(s) of the recipients. \f(CW\*(C`ARG2\*(C'\fR is the text of the \s-1NOTICE\s0 message. .PP \fI\f(CI\*(C`irc_part\*(C'\fI\fR .IX Subsection "irc_part" .PP Sent whenever someone leaves a channel that you're on. \f(CW\*(C`ARG0\*(C'\fR is the person's nick!hostmask. \f(CW\*(C`ARG1\*(C'\fR is the channel name. \f(CW\*(C`ARG2\*(C'\fR is the part message. .PP \fI\f(CI\*(C`irc_public\*(C'\fI\fR .IX Subsection "irc_public" .PP Sent whenever you receive a \s-1PRIVMSG\s0 command that was sent to a channel. \&\f(CW\*(C`ARG0\*(C'\fR is the nick!hostmask of the sender. \f(CW\*(C`ARG1\*(C'\fR is an array reference containing the channel name(s) of the recipients. \f(CW\*(C`ARG2\*(C'\fR is the text of the message. On servers supporting the IDENTIFY-MSG feature (e.g. FreeNode), there will be an additional argument, \f(CW\*(C`ARG3\*(C'\fR, which will be \&\f(CW1\fR if the sender has identified with NickServ, \f(CW0\fR otherwise. .PP \fI\f(CI\*(C`irc_quit\*(C'\fI\fR .IX Subsection "irc_quit" .PP Sent whenever someone on a channel with you quits \s-1IRC\s0 (or gets KILLed). \f(CW\*(C`ARG0\*(C'\fR is the nick!hostmask of the person in question. \f(CW\*(C`ARG1\*(C'\fR is the clever, witty message they left behind on the way out. .PP \fI\f(CI\*(C`irc_socketerr\*(C'\fI\fR .IX Subsection "irc_socketerr" .PP Sent when a connection couldn't be established to the \s-1IRC\s0 server. \f(CW\*(C`ARG0\*(C'\fR is probably some vague and/or misleading reason for what failed. .PP \fI\f(CI\*(C`irc_topic\*(C'\fI\fR .IX Subsection "irc_topic" .PP Sent when a channel topic is set or unset. \f(CW\*(C`ARG0\*(C'\fR is the nick!hostmask of the sender. \f(CW\*(C`ARG1\*(C'\fR is the channel affected. \f(CW\*(C`ARG2\*(C'\fR will be either: a string if the topic is being set; or a zero-length string (i.e. '') if the topic is being unset. Note: replies to queries about what a channel topic *is* (i.e. \s-1TOPIC\s0 #channel), are returned as numerics, not with this event. .PP \fI\f(CI\*(C`irc_whois\*(C'\fI\fR .IX Subsection "irc_whois" .PP Sent in response to a \s-1WHOIS\s0 query. \f(CW\*(C`ARG0\*(C'\fR is a hashref, with the following keys: .IP "\(bu" 4 \&\fB'nick'\fR, the users nickname; .IP "\(bu" 4 \&\fB'user'\fR, the users username; .IP "\(bu" 4 \&\fB'host'\fR, their hostname; .IP "\(bu" 4 \&\fB'real'\fR, their real name; .IP "\(bu" 4 \&\fB'idle'\fR, their idle time in seconds; .IP "\(bu" 4 \&\fB'signon'\fR, the epoch time they signed on (will be undef if ircd does not support this); .IP "\(bu" 4 \&\fB'channels'\fR, an arrayref listing visible channels they are on, the channel is prefixed with '@','+','%' depending on whether they have +o +v or +h; .IP "\(bu" 4 \&\fB'server'\fR, their server (might not be useful on some networks); .IP "\(bu" 4 \&\fB'oper'\fR, whether they are an IRCop, contains the \s-1IRC\s0 operator string if they are, undef if they aren't. .IP "\(bu" 4 \&\fB'actually'\fR, some ircds report the user's actual ip address, that'll be here; .IP "\(bu" 4 \&\fB'identified'\fR. if the user has identified with \s-1NICKSERV\s0 (ircu, seven, Plexus) .IP "\(bu" 4 \&\fB'modes'\fR, a string describing the user's modes (Rizon) .PP \fI\f(CI\*(C`irc_whowas\*(C'\fI\fR .IX Subsection "irc_whowas" .PP Similar to the above, except some keys will be missing. .PP \fI\f(CI\*(C`irc_raw\*(C'\fI\fR .IX Subsection "irc_raw" .PP Enabled by passing \f(CW\*(C`Raw => 1\*(C'\fR to \f(CW\*(C`spawn\*(C'\fR or \&\f(CW\*(C`connect\*(C'\fR, or by calling \f(CW\*(C`raw_events\*(C'\fR with a true argument. \f(CW\*(C`ARG0\*(C'\fR is the raw \s-1IRC\s0 string received by the component from the \s-1IRC\s0 server, before it has been mangled by filters and such like. .PP \fI\f(CI\*(C`irc_raw_out\*(C'\fI\fR .IX Subsection "irc_raw_out" .PP Enabled by passing \f(CW\*(C`Raw => 1\*(C'\fR to \f(CW\*(C`spawn\*(C'\fR or \&\f(CW\*(C`connect\*(C'\fR, or by calling \f(CW\*(C`raw_events\*(C'\fR with a true argument. \f(CW\*(C`ARG0\*(C'\fR is the raw \s-1IRC\s0 string sent by the component to the the \s-1IRC\s0 server. .PP \fI\f(CI\*(C`irc_isupport\*(C'\fI\fR .IX Subsection "irc_isupport" .PP Emitted by the first event after an \f(CW\*(C`irc_005\*(C'\fR, to indicate that isupport information has been gathered. \f(CW\*(C`ARG0\*(C'\fR is the POE::Component::IRC::Plugin::ISupport object. .PP \fI\f(CI\*(C`irc_socks_failed\*(C'\fI\fR .IX Subsection "irc_socks_failed" .PP Emitted whenever we fail to connect successfully to a \s-1SOCKS\s0 server or the \&\s-1SOCKS\s0 server is not actually a \s-1SOCKS\s0 server. \f(CW\*(C`ARG0\*(C'\fR will be some vague reason as to what went wrong. Hopefully. .PP \fI\f(CI\*(C`irc_socks_rejected\*(C'\fI\fR .IX Subsection "irc_socks_rejected" .PP Emitted whenever a \s-1SOCKS\s0 connection is rejected by a \s-1SOCKS\s0 server. \f(CW\*(C`ARG0\*(C'\fR is the \s-1SOCKS\s0 code, \f(CW\*(C`ARG1\*(C'\fR the \s-1SOCKS\s0 server address, \f(CW\*(C`ARG2\*(C'\fR the \s-1SOCKS\s0 port and \&\f(CW\*(C`ARG3\*(C'\fR the \s-1SOCKS\s0 user id (if defined). .PP \fI\f(CI\*(C`irc_plugin_add\*(C'\fI\fR .IX Subsection "irc_plugin_add" .PP \&\fIInherited from Object::Pluggable\fR .PP Emitted whenever a new plugin is added to the pipeline. \f(CW\*(C`ARG0\*(C'\fR is the plugin alias. \f(CW\*(C`ARG1\*(C'\fR is the plugin object. .PP \fI\f(CI\*(C`irc_plugin_del\*(C'\fI\fR .IX Subsection "irc_plugin_del" .PP \&\fIInherited from Object::Pluggable\fR .PP Emitted whenever a plugin is removed from the pipeline. \f(CW\*(C`ARG0\*(C'\fR is the plugin alias. \f(CW\*(C`ARG1\*(C'\fR is the plugin object. .PP \fI\f(CI\*(C`irc_plugin_error\*(C'\fI\fR .IX Subsection "irc_plugin_error" .PP \&\fIInherited from Object::Pluggable\fR .PP Emitted when an error occurs while executing a plugin handler. \f(CW\*(C`ARG0\*(C'\fR is the error message. \f(CW\*(C`ARG1\*(C'\fR is the plugin alias. \f(CW\*(C`ARG2\*(C'\fR is the plugin object. .SS "Somewhat Less Important Events" .IX Subsection "Somewhat Less Important Events" \fI\f(CI\*(C`irc_cap\*(C'\fI\fR .IX Subsection "irc_cap" .PP A reply from the server regarding protocol capabilities. \f(CW\*(C`ARG0\*(C'\fR is the \&\s-1CAP\s0 subcommand (e.g. '\s-1LS\s0'). \f(CW\*(C`ARG1\*(C'\fR is the result of the subcommand, unless this is a multi-part reply, in which case \f(CW\*(C`ARG1\*(C'\fR is '*' and \f(CW\*(C`ARG2\*(C'\fR contains the result. .PP \fI\f(CI\*(C`irc_dcc_*\*(C'\fI\fR .IX Subsection "irc_dcc_*" .PP See the \s-1DCC\s0 plugin (loaded by default) documentation for DCC-related events. .PP \fI\f(CI\*(C`irc_ping\*(C'\fI\fR .IX Subsection "irc_ping" .PP An event sent whenever the server sends a \s-1PING\s0 query to the client. (Don't confuse this with a \s-1CTCP PING,\s0 which is another beast entirely. If unclear, read the \s-1RFC.\s0) Note that POE::Component::IRC will automatically take care of sending the \s-1PONG\s0 response back to the server for you, although you can still register to catch the event for informational purposes. .PP \fI\f(CI\*(C`irc_snotice\*(C'\fI\fR .IX Subsection "irc_snotice" .PP A weird, non-RFC-compliant message from an \s-1IRC\s0 server. Usually sent during to you during an authentication phase right after you connect, while the server does a hostname lookup or similar tasks. \f(CW\*(C`ARG0\*(C'\fR is the text of the server's message. \f(CW\*(C`ARG1\*(C'\fR is the target, which could be \fB'*'\fR or \fB'\s-1AUTH\s0'\fR or whatever. Servers vary as to whether these notices include a server name as the sender, or no sender at all. \f(CW\*(C`ARG1\*(C'\fR is the sender, if any. .PP \fI\f(CI\*(C`irc_delay_set\*(C'\fI\fR .IX Subsection "irc_delay_set" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP Emitted on a successful addition of a delayed event using the \&\f(CW\*(C`delay\*(C'\fR method. \f(CW\*(C`ARG0\*(C'\fR will be the alarm_id which can be used later with \f(CW\*(C`delay_remove\*(C'\fR. Subsequent parameters are the arguments that were passed to \f(CW\*(C`delay\*(C'\fR. .PP \fI\f(CI\*(C`irc_delay_removed\*(C'\fI\fR .IX Subsection "irc_delay_removed" .PP \&\fIInherited from POE::Component::Syndicator\fR .PP Emitted when a delayed command is successfully removed. \f(CW\*(C`ARG0\*(C'\fR will be the alarm_id that was removed. Subsequent parameters are the arguments that were passed to \f(CW\*(C`delay\*(C'\fR. .SS "All numeric events" .IX Subsection "All numeric events" Most messages from \s-1IRC\s0 servers are identified only by three-digit numeric codes with undescriptive constant names like \s-1RPL_UMODEIS\s0 and \&\s-1ERR_NOTOPLEVEL.\s0 (Actually, the list of codes in the \s-1RFC\s0 is kind of out-of-date... the list in the back of Net::IRC::Event.pm is more complete, and different \s-1IRC\s0 networks have different and incompatible lists. Ack!) As an example, say you wanted to handle event 376 (\s-1RPL_ENDOFMOTD,\s0 which signals the end of the \s-1MOTD\s0 message). You'd register for '376', and listen for \f(CW\*(C`irc_376\*(C'\fR events. Simple, no? \f(CW\*(C`ARG0\*(C'\fR is the name of the server which sent the message. \f(CW\*(C`ARG1\*(C'\fR is the text of the message. \f(CW\*(C`ARG2\*(C'\fR is an array reference of the parsed message, so there is no need to parse \f(CW\*(C`ARG1\*(C'\fR yourself. .SH "SIGNALS" .IX Header "SIGNALS" The component will handle a number of custom signals that you may send using POE::Kernel's \f(CW\*(C`signal\*(C'\fR method. .ie n .SS """POCOIRC_REGISTER""" .el .SS "\f(CWPOCOIRC_REGISTER\fP" .IX Subsection "POCOIRC_REGISTER" \&\fIInherited from POE::Component::Syndicator\fR .PP Registering with multiple PoCo-IRC components has been a pita. Well, no more, using the power of POE::Kernel signals. .PP If the component receives a \f(CW\*(C`POCOIRC_REGISTER\*(C'\fR signal it'll register the requesting session and trigger an \f(CW\*(C`irc_registered\*(C'\fR event. From that event one can get all the information necessary such as the poco-irc object and the \s-1SENDER\s0 session to do whatever one needs to build a poco-irc dispatch table. .PP The way the signal handler in PoCo-IRC is written also supports sending the \&\f(CW\*(C`POCOIRC_REGISTER\*(C'\fR to multiple sessions simultaneously, by sending the signal to the \s-1POE\s0 Kernel itself. .PP Pass the signal your session, session \s-1ID\s0 or alias, and the \s-1IRC\s0 events (as specified to \f(CW\*(C`register\*(C'\fR). .PP To register with multiple PoCo-IRCs one can do the following in your session's _start handler: .PP .Vb 2 \& sub _start { \& my ($kernel, $session) = @_[KERNEL, SESSION]; \& \& # Registering with multiple pocoircs for \*(Aqall\*(Aq IRC events \& $kernel\->signal($kernel, \*(AqPOCOIRC_REGISTER\*(Aq, $session\->ID(), \*(Aqall\*(Aq); \& \& return: \& } .Ve .PP Each poco-irc will send your session an \&\f(CW\*(C`irc_registered\*(C'\fR event: .PP .Vb 2 \& sub irc_registered { \& my ($kernel, $sender, $heap, $irc_object) = @_[KERNEL, SENDER, HEAP, ARG0]; \& \& # Get the poco\-irc session ID \& my $sender_id = $sender\->ID(); \& \& # Or it\*(Aqs alias \& my $poco_alias = $irc_object\->session_alias(); \& \& # Store it in our heap maybe \& $heap\->{irc_objects}\->{ $sender_id } = $irc_object; \& \& # Make the poco connect \& $irc_object\->yield(connect => { }); \& \& return; \& } .Ve .ie n .SS """POCOIRC_SHUTDOWN""" .el .SS "\f(CWPOCOIRC_SHUTDOWN\fP" .IX Subsection "POCOIRC_SHUTDOWN" \&\fIInherited from POE::Component::Syndicator\fR .PP Telling multiple poco-ircs to shutdown was a pita as well. The same principle as with registering applies to shutdown too. .PP Send a \f(CW\*(C`POCOIRC_SHUTDOWN\*(C'\fR to the \s-1POE\s0 Kernel to terminate all the active poco-ircs simultaneously. .PP .Vb 1 \& $poe_kernel\->signal($poe_kernel, \*(AqPOCOIRC_SHUTDOWN\*(Aq); .Ve .PP Any additional parameters passed to the signal will become your quit messages on each \s-1IRC\s0 network. .SH "ENCODING" .IX Header "ENCODING" This can be an issue. Take a look at IRC::Utils' section on it. .SH "BUGS" .IX Header "BUGS" A few have turned up in the past and they are sure to again. Please use to report any. Alternatively, email the current maintainer. .SH "DEVELOPMENT" .IX Header "DEVELOPMENT" You can find the latest source on github: .PP The project's developers usually hang out in the \f(CW\*(C`#poe\*(C'\fR \s-1IRC\s0 channel on irc.perl.org. Do drop us a line. .SH "MAINTAINERS" .IX Header "MAINTAINERS" Chris \f(CW\*(C`BinGOs\*(C'\fR Williams .PP Hinrik Örn Sigurðsson .SH "AUTHOR" .IX Header "AUTHOR" Dennis Taylor. .SH "LICENCE" .IX Header "LICENCE" Copyright (c) Dennis Taylor, Chris Williams and Hinrik Örn Sigurðsson .PP This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details. .SH "MAD PROPS" .IX Header "MAD PROPS" The maddest of mad props go out to Rocco \*(L"dngor\*(R" Caputo , for inventing something as mind-bogglingly cool as \s-1POE,\s0 and to Kevin \*(L"oznoid\*(R" Lenzo , for being the attentive parent of our precocious little infobot on #perl. .PP Further props to a few of the studly bughunters who made this module not suck: Abys , Addi , ResDev , and Roderick . Woohoo! .PP Kudos to Apocalypse, , for the plugin system and to Jeff 'japhy' Pinyan, , for Pipeline. .PP Thanks to the merry band of \s-1POE\s0 pixies from #PoE @ irc.perl.org, including ( but not limited to ), ketas, ct, dec, integral, webfox, immute, perigrin, paulv, alias. .PP \&\s-1IP\s0 functions are shamelessly 'borrowed' from Net::IP by Manuel Valente .PP Check out the Changes file for further contributors. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1RFC 1459\s0 .PP , .PP , .PP , .PP Some good examples reside in the \s-1POE\s0 cookbook which has a whole section devoted to \s-1IRC\s0 programming . .PP The examples/ folder of this distribution.