POE::C...C::Qnet(3pm)
π POE::C...C::Qnet β the manual, but make it cute π
user contributed perl documentation Β· 3pm Β· the manual name got squished down to POE::C...C::Qnet(3pm) in the header but bestie it's POE::Component::IRC::Qnet and it's iconic
β¨ NAME β¨
POE::Component::IRC::Qnet β a fully event-driven IRC client module for Quakenet π¦
πΈ SYNOPSIS πΈ
okay so this is the whole vibe, copy it, run it, love it:
use strict;
use warnings;
use POE qw(Component::IRC::Qnet);
my $nickname = 'Flibble' . $$;
my $ircname = 'Flibble the Sailor Bot';
my $port = 6667;
my $qauth = 'FlibbleBOT';
my $qpass = 'fubar';
my @channels = ( '#Blah', '#Foo', '#Bar' );
# We create a new PoCo-IRC object and component.
my $irc = POE::Component::IRC::Qnet->spawn(
nick => $nickname,
port => $port,
ircname => $ircname,
) 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 ($kernel, $heap) = @_[KERNEL, HEAP];
# We get the session ID of the component from the object
# and register and connect to the specified server.
my $irc_session = $heap->{irc}->session_id();
$kernel->post( $irc_session => register => 'all' );
$kernel->post( $irc_session => connect => { } );
return;
}
sub irc_001 {
my ($kernel, $sender) = @_[KERNEL, SENDER];
# Get the component's object at any time by accessing the heap of
# the SENDER
my $poco_object = $sender->get_heap();
print "Connected to ", $poco_object->server_name(), "\n";
# Lets authenticate with Quakenet's Q bot
$kernel->post( $sender => qbot_auth => $qauth => $qpass );
return;
}
sub irc_public {
my ($kernel, $sender, $who, $where, $what) = @_[KERNEL, 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];
$kernel->post( $sender => 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 'ARRAY') {
push( @output, '[' . join(', ', @$arg ) . ']' );
}
else {
push ( @output, "'$arg'" );
}
}
print join ' ', @output, "\n";
return 0;
}
π DESCRIPTION π
POE::Component::IRC::Qnet is an extension to POE::Component::IRC specifically for use on Quakenet <http://www.quakenet.org/>. π for general usage, go read the docs for POE::Component::IRC β this doc right here is only about the extensions, no cap.
The module provides a number of additional commands for communicating with the Quakenet service bot Q. π
π METHODS π
π service_bots
The component will query Q its default name on Quakenet. If you wish to override these settings, use this method to configure them. lowkey powerful.
$irc->service_bots(QBOT => 'W@blah.network.net');
In most cases you shouldn't need to mess with these >;o) β like, fr fr, leave them alone bestie π
π¦ INPUT π¦
The Quakenet service bots accept input as PRIVMSG. This module provides a wrapper around the POE::Component::IRC privmsg command. π
π qbot_*
Send commands to the Q bot. Pass additional command parameters as arguments to the event.
$kernel->post ('my client' => qbot_auth => $q_user => $q_pass);
π OUTPUT EVENTS π
All output from the Quakenet service bots is sent as NOTICEs. Use irc_notice to trap these. π
π irc_whois
Has all the same hash keys in ARG1 as POE::Component::IRC, with the addition of 'account', which contains the name of their Q auth account, if they have authed, or a false value if they haven't. the way that it just tells you β¨
π BUGS π
A few have turned up in the past and they are sure to again. π Please use <http://rt.cpan.org/> to report any. Alternatively, email the current maintainer.
ngl this is the most honest BUGS section in existence. they will come back. it's giving prophecy. π«Ά
π«Ά AUTHOR π«Ά
Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
Based on the original POE::Component::IRC by:
Dennis Taylor, <dennis@funkplanet.com>
β SEE ALSO β
POE::Component::IRC
and that's the whole page bestie, you ate it π β¨
signing off from the footer: this was perl v5.40.1, dated 2025-08-21, and the manual name down there was printed as POE::C...C::Qnet(3pm) β mwah, periodt πππ¦
π¦ where this page comes from
- ubuntu resolute: libpoe-component-irc-perl 6.95+dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpoe-component-irc-perl 6.95+dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms