Replaced some useless double quotes with single
This commit is contained in:
1 parent
68c4ca7b4a
commit
30c9178c4e
4 files changed
+23
-23
No files matched your search
+9
-9
@@ -14,12 +14,12 @@ sub _init
|
|||||||
{
|
{
|
||||||
# Check for required configuration values.
|
# Check for required configuration values.
|
||||||
if (!(conf_get('bitly:user'))[0][0] or !(conf_get('bitly:key'))[0][0]) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
# Create the SHORTEN and REVERSE commands.
|
# Create the SHORTEN and REVERSE commands.
|
||||||
cmd_add("SHORTEN", 0, 0, \%M::Bitly::HELP_SHORTEN, \&M::Bitly::shorten) 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;
|
cmd_add('REVERSE', 0, 0, \%M::Bitly::HELP_REVERSE, \&M::Bitly::reverse) or return 0;
|
||||||
|
|
||||||
# Success.
|
# Success.
|
||||||
return 1;
|
return 1;
|
||||||
@@ -29,8 +29,8 @@ sub _init
|
|||||||
sub _void
|
sub _void
|
||||||
{
|
{
|
||||||
# Delete the SHORTEN and REVERSE commands.
|
# Delete the SHORTEN and REVERSE commands.
|
||||||
cmd_del("SHORTEN") or return 0;
|
cmd_del('SHORTEN') or return 0;
|
||||||
cmd_del("REVERSE") or return 0;
|
cmd_del('REVERSE') or return 0;
|
||||||
|
|
||||||
# Success.
|
# Success.
|
||||||
return 1;
|
return 1;
|
||||||
@@ -56,7 +56,7 @@ sub shorten
|
|||||||
|
|
||||||
# Put together the call to the Bit.ly API.
|
# Put together the call to the Bit.ly API.
|
||||||
if (!defined $args[0]) {
|
if (!defined $args[0]) {
|
||||||
notice($src->{svr}, $src->{nick}, trans("Not enough parameters").".");
|
notice($src->{svr}, $src->{nick}, trans('Not enough parameters').".");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
my ($surl, $user, $key) = ($args[0], (conf_get('bitly:user'))[0][0], (conf_get('bitly:key'))[0][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 {
|
else {
|
||||||
# Otherwise, send an error message.
|
# 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;
|
return 1;
|
||||||
@@ -92,7 +92,7 @@ sub reverse
|
|||||||
|
|
||||||
# Put together the call to the Bit.ly API.
|
# Put together the call to the Bit.ly API.
|
||||||
if (!defined $args[0]) {
|
if (!defined $args[0]) {
|
||||||
notice($src->{svr}, $src->{nick}, trans("Not enough parameters").".");
|
notice($src->{svr}, $src->{nick}, trans('Not enough parameters').".");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
my ($surl, $user, $key) = ($args[0], (conf_get('bitly:user'))[0][0], (conf_get('bitly:key'))[0][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 {
|
else {
|
||||||
# Otherwise, send an error message.
|
# 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;
|
return 1;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use API::IRC qw(privmsg);
|
|||||||
sub _init
|
sub _init
|
||||||
{
|
{
|
||||||
# Add a hook for when we join a channel.
|
# 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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ sub _init
|
|||||||
sub _void
|
sub _void
|
||||||
{
|
{
|
||||||
# Delete the hook.
|
# Delete the hook.
|
||||||
hook_del("on_ucjoin", "HelloChan") or return 0;
|
hook_del('on_ucjoin', 'HelloChan') or return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ sub hello
|
|||||||
my (($svr, $chan)) = @_;
|
my (($svr, $chan)) = @_;
|
||||||
|
|
||||||
# Send a PRIVMSG.
|
# Send a PRIVMSG.
|
||||||
privmsg($svr, $chan, "Hello channel! I am a bot!");
|
privmsg($svr, $chan, 'Hello channel! I am a bot!');
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -11,9 +11,9 @@ use API::Log qw(alog);
|
|||||||
sub _init
|
sub _init
|
||||||
{
|
{
|
||||||
# Add a hook for when we join a channel.
|
# 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)
|
# 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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,10 +21,10 @@ sub _init
|
|||||||
sub _void
|
sub _void
|
||||||
{
|
{
|
||||||
# Delete the hooks.
|
# Delete the hooks.
|
||||||
hook_del("on_connect", "Oper.onconnect") or return 0;
|
hook_del('on_connect', 'Oper.onconnect') or return 0;
|
||||||
rchook_del("381", "Oper.on381") or return 0;
|
rchook_del('381', 'Oper.on381') or return 0;
|
||||||
rchook_del("313", "Oper.on313") or return 0;
|
rchook_del('313', 'Oper.on313') or return 0;
|
||||||
rchook_del("491", "Oper.on491") or return 0;
|
rchook_del('491', 'Oper.on491') or return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -13,7 +13,7 @@ use XML::Simple;
|
|||||||
sub _init
|
sub _init
|
||||||
{
|
{
|
||||||
# Create the Weather command.
|
# 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.
|
# Success.
|
||||||
return 1;
|
return 1;
|
||||||
@@ -23,7 +23,7 @@ sub _init
|
|||||||
sub _void
|
sub _void
|
||||||
{
|
{
|
||||||
# Delete the Weather command.
|
# Delete the Weather command.
|
||||||
cmd_del("WEATHER") or return 0;
|
cmd_del('WEATHER') or return 0;
|
||||||
|
|
||||||
# Success.
|
# Success.
|
||||||
return 1;
|
return 1;
|
||||||
@@ -45,7 +45,7 @@ sub weather
|
|||||||
$ua->timeout(2);
|
$ua->timeout(2);
|
||||||
# Put together the call to the Wunderground API.
|
# Put together the call to the Wunderground API.
|
||||||
if (!defined $args[0]) {
|
if (!defined $args[0]) {
|
||||||
notice($src->{svr}, $src->{nick}, trans("Not enough parameters").".");
|
notice($src->{svr}, $src->{nick}, trans('Not enough parameters').".");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
my $loc = join(' ', @args);
|
my $loc = join(' ', @args);
|
||||||
@@ -66,12 +66,12 @@ sub weather
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Otherwise, send an error message.
|
# Otherwise, send an error message.
|
||||||
privmsg($src->{svr}, $src->{chan}, "Location not found.");
|
privmsg($src->{svr}, $src->{chan}, 'Location not found.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Otherwise, send an error message.
|
# 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;
|
return 1;
|
||||||
|
|||||||
Reference in new issue
Block a user