3 #**************************************************************************
4 # Copyright (C) 2009 by Michael Andreen <harvATruinDOTnu> *
6 # This program is free software; you can redistribute it and/or modify *
7 # it under the terms of the GNU General Public License as published by *
8 # the Free Software Foundation; either version 2 of the License, or *
9 # (at your option) any later version. *
11 # This program is distributed in the hope that it will be useful, *
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 # GNU General Public License for more details. *
16 # You should have received a copy of the GNU General Public License *
17 # along with this program; if not, write to the *
18 # Free Software Foundation, Inc., *
19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
20 #**************************************************************************
25 use POE qw(Component::IRC::Qnet::State);
27 use POE::Component::IRC::Plugin::Logger;
28 use POE::Component::IRC::Plugin::BotTraffic;
29 use POE::Component::IRC::Plugin::Connector;
30 use POE::Component::IRC::Plugin::DCC;
32 use NDIRC::CommonStates;
35 my $nickname = 'ndbot';
36 my $ircname = 'ND test bot';
37 my $server = 'irc.netgamers.org';
39 # We create a new PoCo-IRC object
40 my $irc = POE::Component::IRC::Qnet::State->spawn(
44 servers => [$server, 'underworld.no.eu.netgamers.org', ]
45 ) or die "Oh noooo! $!";
47 $irc->service_bots(QBOT => 'P@cservice.netgamers.org');
49 $irc->plugin_add( 'BotTraffic', POE::Component::IRC::Plugin::BotTraffic->new() );
50 $irc->plugin_add( 'DCC', POE::Component::IRC::Plugin::DCC->new() );
51 $irc->plugin_add('Logger', POE::Component::IRC::Plugin::Logger->new(
58 Strip_formatting => 1,
61 $ND::scanchan = '#testarmer';
62 $ND::defchan = '#testarlite';
63 $ND::memchan = '#testarmer';
67 'NDIRC::CommonStates' => [ qw(_default _start irc_001 sig_DIE sig_usr2 signal_handler irc_disconnected irc_invite) ],
68 'NDIRC::Delling' => [ qw(irc_public irc_msg refresh irc_join) ],
70 heap => { irc => $irc},