1POE::Component::IRC::CoUoskebrooCko:n:tHraiibluot(e3d)PPeOrEl::DCoocmupmoennetnatt:i:oInRC::Cookbook::Hailo(3)
2
3
4

NAME

6       POE::Component::IRC::Cookbook::Hailo - A blabbering IRC bot
7

SYNOPSIS

9       This bot uses POE::Component::IRC::Plugin::Hailo for most of its magic.
10       As of yet, this recipe just contains a SYNOPSIS that is copied from its
11       documentation.
12

DESCRIPTION

14        #!/usr/bin/env perl
15
16        use strict;
17        use warnings;
18        use POE;
19        use POE::Component::IRC::Plugin::AutoJoin;
20        use POE::Component::IRC::Plugin::Connector;
21        use POE::Component::IRC::Plugin::Hailo;
22        use POE::Component::IRC::State;
23
24        my $irc = POE::Component::IRC::State->spawn(
25            nick   => 'Brainy',
26            server => 'irc.freenode.net',
27        );
28
29        my @channels = ('#public_chan', '#bot_chan');
30
31        $irc->plugin_add('AutoJoin', POE::Component::IRC::Plugin::AutoJoin->new(Channels => \@channels));
32        $irc->plugin_add('Connector', POE::Component::IRC::Plugin::Connector->new());
33        $irc->plugin_add('Hailo', POE::Component::IRC::Plugin::Hailo->new(
34            Own_channel    => '#bot_chan',
35            Ignore_regexes => [ qr{\w+://\w} ], # ignore lines containing URLs
36            Hailo_args     => {
37                brain_resource => 'brain.sqlite',
38            },
39        ));
40
41        $irc->yield('connect');
42        $poe_kernel->run();
43

AUTHOR

45       Hinrik Örn Sigurðsson, hinrik.sig@gmail.com
46
47
48
49perl v5.34.0                      2021-0P7O-E2:2:Component::IRC::Cookbook::Hailo(3)
Impressum