Changed module naming scheme to appease Perl::Critic.

This commit is contained in:
Elijah Perrault committed 2011-02-17 17:41:33 -07:00
1 parent 7a9230c75a
commit a4ae87a86c
14 files changed
+40 -40

No files matched your search

+1 -1
View File
@@ -65,7 +65,7 @@ sub ircparse
# If it's AUTHENTICATE
elsif ($ex[0] eq 'AUTHENTICATE') {
if (API::Std::mod_exists("SASLAuth")) {
m_SASLAuth::handle_authenticate($svr, @ex);
M::SASLAuth::handle_authenticate($svr, @ex);
}
}
else {
+2 -2
View File
@@ -1,7 +1,7 @@
# Module: Badwords. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_Badwords;
package M::Badwords;
use strict;
use warnings;
use feature qw(switch);
@@ -17,7 +17,7 @@ sub _init
return;
}
# Create the act_on_badword hook.
hook_add('on_cprivmsg', 'act_on_badword', \&m_Badwords::actonbadword) or return;
hook_add('on_cprivmsg', 'act_on_badword', \&M::Badwords::actonbadword) or return;
# Success.
return 1;
+3 -3
View File
@@ -1,7 +1,7 @@
# Module: Bitly. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_Bitly;
package M::Bitly;
use strict;
use warnings;
use API::Std qw(cmd_add cmd_del conf_get err trans);
@@ -18,8 +18,8 @@ sub _init
return 0;
}
# Create the SHORTEN and REVERSE commands.
cmd_add("SHORTEN", 0, 0, \%m_Bitly::HELP_SHORTEN, \&m_Bitly::shorten) or return 0;
cmd_add("REVERSE", 0, 0, \%m_Bitly::HELP_REVERSE, \&m_Bitly::reverse) or return 0;
cmd_add("SHORTEN", 0, 0, \%M::Bitly::HELP_SHORTEN, \&M::Bitly::shorten) or return 0;
cmd_add("REVERSE", 0, 0, \%M::Bitly::HELP_REVERSE, \&M::Bitly::reverse) or return 0;
# Success.
return 1;
+2 -2
View File
@@ -1,7 +1,7 @@
# Module: Calc. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_Calc;
package M::Calc;
use strict;
use warnings;
use API::Std qw(cmd_add cmd_del trans);
@@ -19,7 +19,7 @@ sub _init
1;
} or return 0;
# Create the CALC command.
cmd_add("CALC", 0, 0, \%m_Calc::HELP_CALC, \&m_Calc::calc) or return 0;
cmd_add("CALC", 0, 0, \%M::Calc::HELP_CALC, \&M::Calc::calc) or return 0;
# Success.
return 1;
+9 -9
View File
@@ -1,7 +1,7 @@
# Module: ChanTopics. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_ChanTopics;
package M::ChanTopics;
use strict;
use warnings;
use API::Std qw(cmd_add cmd_del trans);
@@ -17,21 +17,21 @@ sub _init
$Auto::DB->do('CREATE TABLE IF NOT EXISTS topics (net TEXT, chan TEXT, topic TEXT, divider TEXT, owner TEXT, verb TEXT, status TEXT, other TEXT, static TEXT)') or print "$!\n" and return;
# Create the TOPIC command.
cmd_add('TOPIC', 0, 'topic.topic', \%m_ChanTopics::HELP_TOPIC, \&m_ChanTopics::cmd_topic) or return;
cmd_add('TOPIC', 0, 'topic.topic', \%M::ChanTopics::HELP_TOPIC, \&M::ChanTopics::cmd_topic) or return;
# Create the DIVIDER command.
cmd_add('DIVIDER', 0, 'topic.topic', \%m_ChanTopics::HELP_DIVIDER, \&m_ChanTopics::cmd_divider) or return;
cmd_add('DIVIDER', 0, 'topic.topic', \%M::ChanTopics::HELP_DIVIDER, \&M::ChanTopics::cmd_divider) or return;
# Create the OWNER command.
cmd_add('OWNER', 0, 'topic.owner', \%m_ChanTopics::HELP_OWNER, \&m_ChanTopics::cmd_owner) or return;
cmd_add('OWNER', 0, 'topic.owner', \%M::ChanTopics::HELP_OWNER, \&M::ChanTopics::cmd_owner) or return;
# Create the VERB command.
cmd_add('VERB', 0, 'topic.status', \%m_ChanTopics::HELP_VERB, \&m_ChanTopics::cmd_verb) or return;
cmd_add('VERB', 0, 'topic.status', \%M::ChanTopics::HELP_VERB, \&M::ChanTopics::cmd_verb) or return;
# Create the STATUS command.
cmd_add('STATUS', 0, 'topic.status', \%m_ChanTopics::HELP_STATUS, \&m_ChanTopics::cmd_status) or return;
cmd_add('STATUS', 0, 'topic.status', \%M::ChanTopics::HELP_STATUS, \&M::ChanTopics::cmd_status) or return;
# Create the OTHER command.
cmd_add('OTHER', 0, 'topic.static', \%m_ChanTopics::HELP_OTHER, \&m_ChanTopics::cmd_other) or return;
cmd_add('OTHER', 0, 'topic.static', \%M::ChanTopics::HELP_OTHER, \&M::ChanTopics::cmd_other) or return;
# Create the STATIC command.
cmd_add('STATIC', 0, 'topic.static', \%m_ChanTopics::HELP_STATIC, \&m_ChanTopics::cmd_static) or return;
cmd_add('STATIC', 0, 'topic.static', \%M::ChanTopics::HELP_STATIC, \&M::ChanTopics::cmd_static) or return;
# Create the TSYNC command.
cmd_add('TSYNC', 0, 'topic.topic', \%m_ChanTopics::HELP_TSYNC, \&m_ChanTopics::cmd_tsync) or return;
cmd_add('TSYNC', 0, 'topic.topic', \%M::ChanTopics::HELP_TSYNC, \&M::ChanTopics::cmd_tsync) or return;
return 1;
}
+2 -2
View File
@@ -1,7 +1,7 @@
# Module: Dictionary. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_Dictionary;
package M::Dictionary;
use strict;
use warnings;
use Net::Dict;
@@ -12,7 +12,7 @@ use API::IRC qw(notice privmsg);
sub _init
{
# Create the DICT command.
cmd_add('DICT', 0, 0, \%m_Dictionary::HELP_DICT, \&m_Dictionary::cmd_dict) or return;
cmd_add('DICT', 0, 0, \%M::Dictionary::HELP_DICT, \&M::Dictionary::cmd_dict) or return;
# Success.
return 1;
+3 -3
View File
@@ -1,7 +1,7 @@
# Module: EightBall. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_EightBall;
package M::EightBall;
use strict;
use warnings;
use feature qw(switch);
@@ -13,8 +13,8 @@ our $ANSWER = 0;
sub _init
{
# Create the 8BALL and RIGBALL commands.
cmd_add("8BALL", 0, 0, \%m_EightBall::HELP_8BALL, \&m_EightBall::c_8ball) or return 0;
cmd_add("RIGBALL", 1, "cmd.rigball", \%m_EightBall::HELP_RIGBALL, \&m_EightBall::rigball) or return 0;
cmd_add("8BALL", 0, 0, \%M::EightBall::HELP_8BALL, \&M::EightBall::c_8ball) or return 0;
cmd_add("RIGBALL", 1, "cmd.rigball", \%M::EightBall::HELP_RIGBALL, \&M::EightBall::rigball) or return 0;
# Success.
return 1;
+2 -2
View File
@@ -1,7 +1,7 @@
# Module: FML. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_FML;
package M::FML;
use strict;
use warnings;
use API::Std qw(cmd_add cmd_del trans);
@@ -12,7 +12,7 @@ use LWP::UserAgent;
sub _init
{
# Create the FML command.
cmd_add("FML", 0, 0, \%m_FML::HELP_FML, \&m_FML::fml) or return 0;
cmd_add("FML", 0, 0, \%M::FML::HELP_FML, \&M::FML::fml) or return 0;
# Success.
return 1;
+3 -3
View File
@@ -1,7 +1,7 @@
# Module: Greet. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_Greet;
package M::Greet;
use strict;
use warnings;
use feature qw(switch);
@@ -17,9 +17,9 @@ sub _init
# Create the `greets` table.
$Auto::DB->do('CREATE TABLE IF NOT EXISTS greets (nick TEXT, greet TEXT)') or return;
# Create the GREET command.
cmd_add('GREET', 2, 'cmd.greet', \%m_Greet::HELP_GREET, \&m_Greet::cmd_greet) or return;
cmd_add('GREET', 2, 'cmd.greet', \%M::Greet::HELP_GREET, \&M::Greet::cmd_greet) or return;
# Create the greet_onjoin hook.
hook_add('on_rcjoin', 'greet_onjoin', \&m_Greet::hook_rcjoin) or return;
hook_add('on_rcjoin', 'greet_onjoin', \&M::Greet::hook_rcjoin) or return;
# Success.
return 1;
+2 -2
View File
@@ -1,7 +1,7 @@
# Module: HelloChan.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_HelloChan;
package M::HelloChan;
use strict;
use warnings;
use API::Std qw(hook_add hook_del);
@@ -11,7 +11,7 @@ use API::IRC qw(privmsg);
sub _init
{
# Add a hook for when we join a channel.
hook_add("on_ucjoin", "HelloChan", \&m_HelloChan::hello) or return 0;
hook_add("on_ucjoin", "HelloChan", \&M::HelloChan::hello) or return 0;
return 1;
}
+2 -2
View File
@@ -1,7 +1,7 @@
# Module: IsItUp. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_IsItUp;
package M::IsItUp;
use strict;
use warnings;
use API::Std qw(cmd_add cmd_del trans);
@@ -12,7 +12,7 @@ use LWP::UserAgent;
sub _init
{
# Create the ISITUP command.
cmd_add("ISITUP", 0, 0, \%m_IsItUp::HELP_ISITUP, \&m_IsItUp::check) or return 0;
cmd_add("ISITUP", 0, 0, \%M::IsItUp::HELP_ISITUP, \&M::IsItUp::check) or return 0;
# Success.
return 1;
+2 -2
View File
@@ -1,7 +1,7 @@
# Module: QDB. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_QDB;
package M::QDB;
use strict;
use warnings;
use feature qw(switch);
@@ -11,7 +11,7 @@ use API::IRC qw(privmsg notice);
sub _init
{
# Create the QDB command.
cmd_add('QDB', 0, 0, \%m_QDB::HELP_QDB, \&m_QDB::cmd_qdb) or return;
cmd_add('QDB', 0, 0, \%M::QDB::HELP_QDB, \&M::QDB::cmd_qdb) or return;
# Check the database format. Fail to load if it's PostgreSQL.
if ($Auto::ENFEAT =~ /pgsql/) { err(2, 'Unable to load QDB: PostgreSQL is not supported.', 0); return; }
+5 -5
View File
@@ -1,7 +1,7 @@
# Module: SASLAuth. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_SASLAuth;
package M::SASLAuth;
use strict;
use warnings;
use feature qw(switch);
@@ -19,13 +19,13 @@ sub _init
hook_add('on_preconnect', 'CAP', sub { my ($srv) = @_; Auto::socksnd($srv, 'CAP LS'); }
) or return 0;
# Hook for parsing CAP.
rchook_add('CAP', \&m_SASLAuth::handle_cap) or return 0;
rchook_add('CAP', \&M::SASLAuth::handle_cap) or return 0;
# Hook for parsing 903.
rchook_add('903', \&m_SASLAuth::handle_903) or return 0;
rchook_add('903', \&M::SASLAuth::handle_903) or return 0;
# Hook for parsing 904.
rchook_add('904', \&m_SASLAuth::handle_904) or return 0;
rchook_add('904', \&M::SASLAuth::handle_904) or return 0;
# Hook for parsing 906.
rchook_add('906', \&m_SASLAuth::handle_906) or return 0;
rchook_add('906', \&M::SASLAuth::handle_906) or return 0;
return 1;
}
+2 -2
View File
@@ -1,7 +1,7 @@
# Module: Weather. See below for documentation.
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
# This program is free software; rights to this code are stated in doc/LICENSE.
package m_Weather;
package M::Weather;
use strict;
use warnings;
use API::Std qw(cmd_add cmd_del trans);
@@ -13,7 +13,7 @@ use XML::Simple;
sub _init
{
# Create the Weather command.
cmd_add("WEATHER", 0, 0, \%m_Weather::HELP_WEATHER, \&m_Weather::weather) or return 0;
cmd_add("WEATHER", 0, 0, \%M::Weather::HELP_WEATHER, \&M::Weather::weather) or return 0;
# Success.
return 1;