diff --git a/modules/Bitly.pm b/modules/Bitly.pm index dfc8589..30ad101 100644 --- a/modules/Bitly.pm +++ b/modules/Bitly.pm @@ -14,12 +14,12 @@ sub _init { # Check for required configuration values. if (!(conf_get('bitly:user'))[0][0] or !(conf_get('bitly:key'))[0][0]) { - err(2, "Please verify that you have bitly_user and bitly_key defined in your configuration file.", 0); + err(2, 'Please verify that you have bitly_user and bitly_key defined in your configuration file.', 0); 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; @@ -29,8 +29,8 @@ sub _init sub _void { # Delete the SHORTEN and REVERSE commands. - cmd_del("SHORTEN") or return 0; - cmd_del("REVERSE") or return 0; + cmd_del('SHORTEN') or return 0; + cmd_del('REVERSE') or return 0; # Success. return 1; @@ -56,7 +56,7 @@ sub shorten # Put together the call to the Bit.ly API. if (!defined $args[0]) { - notice($src->{svr}, $src->{nick}, trans("Not enough parameters")."."); + notice($src->{svr}, $src->{nick}, trans('Not enough parameters')."."); return 0; } my ($surl, $user, $key) = ($args[0], (conf_get('bitly:user'))[0][0], (conf_get('bitly:key'))[0][0]); @@ -74,7 +74,7 @@ sub shorten } else { # Otherwise, send an error message. - privmsg($src->{svr}, $src->{chan}, "An error occurred while shortening your URL."); + privmsg($src->{svr}, $src->{chan}, 'An error occurred while shortening your URL.'); } return 1; @@ -92,7 +92,7 @@ sub reverse # Put together the call to the Bit.ly API. if (!defined $args[0]) { - notice($src->{svr}, $src->{nick}, trans("Not enough parameters")."."); + notice($src->{svr}, $src->{nick}, trans('Not enough parameters')."."); return 0; } my ($surl, $user, $key) = ($args[0], (conf_get('bitly:user'))[0][0], (conf_get('bitly:key'))[0][0]); @@ -110,7 +110,7 @@ sub reverse } else { # Otherwise, send an error message. - privmsg($src->{svr}, $src->{chan}, "An error occurred while reversing your URL."); + privmsg($src->{svr}, $src->{chan}, 'An error occurred while reversing your URL.'); } return 1; diff --git a/modules/HelloChan.pm b/modules/HelloChan.pm index b2fbd53..1e66aee 100644 --- a/modules/HelloChan.pm +++ b/modules/HelloChan.pm @@ -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; } @@ -19,7 +19,7 @@ sub _init sub _void { # Delete the hook. - hook_del("on_ucjoin", "HelloChan") or return 0; + hook_del('on_ucjoin', 'HelloChan') or return 0; return 1; } @@ -29,7 +29,7 @@ sub hello my (($svr, $chan)) = @_; # Send a PRIVMSG. - privmsg($svr, $chan, "Hello channel! I am a bot!"); + privmsg($svr, $chan, 'Hello channel! I am a bot!'); return 1; } diff --git a/modules/Oper.pm b/modules/Oper.pm index 69fb312..95b2971 100644 --- a/modules/Oper.pm +++ b/modules/Oper.pm @@ -11,9 +11,9 @@ use API::Log qw(alog); sub _init { # Add a hook for when we join a channel. - hook_add("on_connect", "Oper.onconnect", \&M::Oper::on_connect) or return 0; + hook_add('on_connect', 'Oper.onconnect', \&M::Oper::on_connect) or return 0; # Add a hook for when we get numeric 491 (ERR_NOOPERHOST) - rchook_add("491", "Oper.on381", \&M::Oper::on_num491) or return 0; + rchook_add('491', 'Oper.on381', \&M::Oper::on_num491) or return 0; return 1; } @@ -21,10 +21,10 @@ sub _init sub _void { # Delete the hooks. - hook_del("on_connect", "Oper.onconnect") or return 0; - rchook_del("381", "Oper.on381") or return 0; - rchook_del("313", "Oper.on313") or return 0; - rchook_del("491", "Oper.on491") or return 0; + hook_del('on_connect', 'Oper.onconnect') or return 0; + rchook_del('381', 'Oper.on381') or return 0; + rchook_del('313', 'Oper.on313') or return 0; + rchook_del('491', 'Oper.on491') or return 0; return 1; } diff --git a/modules/Weather.pm b/modules/Weather.pm index 7525dc8..e4240db 100644 --- a/modules/Weather.pm +++ b/modules/Weather.pm @@ -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; @@ -23,7 +23,7 @@ sub _init sub _void { # Delete the Weather command. - cmd_del("WEATHER") or return 0; + cmd_del('WEATHER') or return 0; # Success. return 1; @@ -45,7 +45,7 @@ sub weather $ua->timeout(2); # Put together the call to the Wunderground API. if (!defined $args[0]) { - notice($src->{svr}, $src->{nick}, trans("Not enough parameters")."."); + notice($src->{svr}, $src->{nick}, trans('Not enough parameters')."."); return 0; } my $loc = join(' ', @args); @@ -66,12 +66,12 @@ sub weather } else { # Otherwise, send an error message. - privmsg($src->{svr}, $src->{chan}, "Location not found."); + privmsg($src->{svr}, $src->{chan}, 'Location not found.'); } } else { # Otherwise, send an error message. - privmsg($src->{svr}, $src->{chan}, "An error occurred while retrieving your weather."); + privmsg($src->{svr}, $src->{chan}, 'An error occurred while retrieving your weather.'); } return 1;