From: Michael Andreen Date: Thu, 20 Aug 2009 15:06:58 +0000 (+0200) Subject: Renamed the startup script to ndbot.pl, which is less generic X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=commitdiff_plain;h=3494b00f46396cfe17a7ab19de2385eb2b4df2c8 Renamed the startup script to ndbot.pl, which is less generic --- diff --git a/ndawn.pl b/ndawn.pl deleted file mode 100755 index a14ee36..0000000 --- a/ndawn.pl +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/perl -w - -#************************************************************************** -# Copyright (C) 2009 by Michael Andreen * -# * -# This program is free software; you can redistribute it and/or modify * -# it under the terms of the GNU General Public License as published by * -# the Free Software Foundation; either version 2 of the License, or * -# (at your option) any later version. * -# * -# This program is distributed in the hope that it will be useful, * -# but WITHOUT ANY WARRANTY; without even the implied warranty of * -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# GNU General Public License for more details. * -# * -# You should have received a copy of the GNU General Public License * -# along with this program; if not, write to the * -# Free Software Foundation, Inc., * -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * -#************************************************************************** - -use strict; -use warnings; -use feature ':5.10'; -use POE qw(Component::IRC::Qnet::State); - -eval "require NDIRC::$ARGV[0]"; - -die $@ if $@; - -# We create a new PoCo-IRC object -my $irc = POE::Component::IRC::Qnet::State->spawn( - nick => $ARGV[0], - ircname => 'ND bot', -) or die "Oh noooo! $!"; - -$irc->service_bots(QBOT => 'P@cservice.netgamers.org'); - -my $bot = eval "new NDIRC::$ARGV[0]"; - -POE::Session->create( - object_states => [ - $bot => [ qw(_default _start irc_001 sig_DIE sig_usr1 sig_usr2 - signal_handler irc_disconnected irc_invite auth - irc_public irc_msg refresh irc_join) ], - ], - heap => { irc => $irc }, -); - -$poe_kernel->run(); diff --git a/ndbot.pl b/ndbot.pl new file mode 100755 index 0000000..a14ee36 --- /dev/null +++ b/ndbot.pl @@ -0,0 +1,50 @@ +#!/usr/bin/perl -w + +#************************************************************************** +# Copyright (C) 2009 by Michael Andreen * +# * +# This program is free software; you can redistribute it and/or modify * +# it under the terms of the GNU General Public License as published by * +# the Free Software Foundation; either version 2 of the License, or * +# (at your option) any later version. * +# * +# This program is distributed in the hope that it will be useful, * +# but WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# GNU General Public License for more details. * +# * +# You should have received a copy of the GNU General Public License * +# along with this program; if not, write to the * +# Free Software Foundation, Inc., * +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * +#************************************************************************** + +use strict; +use warnings; +use feature ':5.10'; +use POE qw(Component::IRC::Qnet::State); + +eval "require NDIRC::$ARGV[0]"; + +die $@ if $@; + +# We create a new PoCo-IRC object +my $irc = POE::Component::IRC::Qnet::State->spawn( + nick => $ARGV[0], + ircname => 'ND bot', +) or die "Oh noooo! $!"; + +$irc->service_bots(QBOT => 'P@cservice.netgamers.org'); + +my $bot = eval "new NDIRC::$ARGV[0]"; + +POE::Session->create( + object_states => [ + $bot => [ qw(_default _start irc_001 sig_DIE sig_usr1 sig_usr2 + signal_handler irc_disconnected irc_invite auth + irc_public irc_msg refresh irc_join) ], + ], + heap => { irc => $irc }, +); + +$poe_kernel->run();