From a4ae87a86ce5485c92e654491e611a76555c8a28 Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Thu, 17 Feb 2011 17:41:33 -0700 Subject: [PATCH] Changed module naming scheme to appease Perl::Critic. --- lib/Parser/IRC.pm | 2 +- modules/Badwords.pm | 4 ++-- modules/Bitly.pm | 6 +++--- modules/Calc.pm | 4 ++-- modules/ChanTopics.pm | 18 +++++++++--------- modules/Dictionary.pm | 4 ++-- modules/EightBall.pm | 6 +++--- modules/FML.pm | 4 ++-- modules/Greet.pm | 6 +++--- modules/HelloChan.pm | 4 ++-- modules/IsItUp.pm | 4 ++-- modules/QDB.pm | 4 ++-- modules/SASLAuth.pm | 10 +++++----- modules/Weather.pm | 4 ++-- 14 files changed, 40 insertions(+), 40 deletions(-) diff --git a/lib/Parser/IRC.pm b/lib/Parser/IRC.pm index 667eec3..c6107bd 100644 --- a/lib/Parser/IRC.pm +++ b/lib/Parser/IRC.pm @@ -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 { diff --git a/modules/Badwords.pm b/modules/Badwords.pm index b1fee22..51e3b05 100644 --- a/modules/Badwords.pm +++ b/modules/Badwords.pm @@ -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; diff --git a/modules/Bitly.pm b/modules/Bitly.pm index 434ebe4..fb51f1a 100644 --- a/modules/Bitly.pm +++ b/modules/Bitly.pm @@ -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; diff --git a/modules/Calc.pm b/modules/Calc.pm index 052eb71..33b4f26 100644 --- a/modules/Calc.pm +++ b/modules/Calc.pm @@ -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; diff --git a/modules/ChanTopics.pm b/modules/ChanTopics.pm index 82b8e05..bf45c41 100644 --- a/modules/ChanTopics.pm +++ b/modules/ChanTopics.pm @@ -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; } diff --git a/modules/Dictionary.pm b/modules/Dictionary.pm index 34d0ed2..7842087 100644 --- a/modules/Dictionary.pm +++ b/modules/Dictionary.pm @@ -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; diff --git a/modules/EightBall.pm b/modules/EightBall.pm index b6ca0d9..711eaea 100644 --- a/modules/EightBall.pm +++ b/modules/EightBall.pm @@ -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; diff --git a/modules/FML.pm b/modules/FML.pm index 173fbc5..19f2c4a 100644 --- a/modules/FML.pm +++ b/modules/FML.pm @@ -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; diff --git a/modules/Greet.pm b/modules/Greet.pm index 460a10d..07c2f0a 100644 --- a/modules/Greet.pm +++ b/modules/Greet.pm @@ -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; diff --git a/modules/HelloChan.pm b/modules/HelloChan.pm index 9b90ca2..5d7958e 100644 --- a/modules/HelloChan.pm +++ b/modules/HelloChan.pm @@ -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; } diff --git a/modules/IsItUp.pm b/modules/IsItUp.pm index ef43b68..478d9a1 100644 --- a/modules/IsItUp.pm +++ b/modules/IsItUp.pm @@ -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; diff --git a/modules/QDB.pm b/modules/QDB.pm index 4b22ba5..a30af1e 100644 --- a/modules/QDB.pm +++ b/modules/QDB.pm @@ -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; } diff --git a/modules/SASLAuth.pm b/modules/SASLAuth.pm index c1bef0d..583904e 100644 --- a/modules/SASLAuth.pm +++ b/modules/SASLAuth.pm @@ -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; } diff --git a/modules/Weather.pm b/modules/Weather.pm index 367f917..e4db515 100644 --- a/modules/Weather.pm +++ b/modules/Weather.pm @@ -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;