From 8586038f03b31d797c818960fbd0cd5153b0b917 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 3 Jun 2013 17:04:24 +0000 Subject: [PATCH] Misc updates --- PBot/Quotegrabs.pm | 6 +++--- PBot/VERSION.pm | 4 ++-- modules/c2english.pl | 4 ++++ modules/compiler_block.pl | 2 +- modules/compiler_client.pl | 2 +- modules/lookupbot.pl | 4 ++++ 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/PBot/Quotegrabs.pm b/PBot/Quotegrabs.pm index 0c840cbb..d78211ae 100644 --- a/PBot/Quotegrabs.pm +++ b/PBot/Quotegrabs.pm @@ -161,7 +161,7 @@ sub grab_quotegrab { } if(not defined $arguments) { - return "Usage: !grab [history] [channel] -- where [history] is an optional argument that is either an integer number of recent messages or a regex (without whitespace) of the text within the message; e.g., to grab the 3rd most recent message for nick, use !grab nick 3; and [channel] is an optional channel, so you can use it from /msg (you will need to also specify [history] in this case)"; + return "Usage: grab [history] [channel] -- where [history] is an optional argument that is either an integer number of recent messages or a regex (without whitespace) of the text within the message; e.g., to grab the 3rd most recent message for nick, use `grab nick 3` or to grab a message containing 'pizza', use `grab nick pizza`; and [channel] is an optional channel, so you can use it from /msg (you will need to also specify [history] in this case)"; } $arguments = lc $arguments; @@ -340,9 +340,9 @@ sub show_random_quotegrab { if($#quotes < 0) { if($nick_search eq ".*") { - return "No quotes grabbed in $channel_search yet. Use !grab to grab a quote."; + return "No quotes grabbed in $channel_search yet (use `rq ` to specify the correct channel). Use `grab` to grab a quote."; } else { - return "No quotes grabbed for $nick_search in $channel_search yet. Use !grab to grab a quote."; + return "No quotes grabbed for $nick_search in $channel_search yet (use `rq ` to specify the correct channel).. Use `grab` to grab a quote."; } } diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index a49e6fe6..ad2c3465 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 404, - BUILD_DATE => "2013-02-24", + BUILD_REVISION => 406, + BUILD_DATE => "2013-06-03", }; 1; diff --git a/modules/c2english.pl b/modules/c2english.pl index 80f2b06a..6293f887 100755 --- a/modules/c2english.pl +++ b/modules/c2english.pl @@ -81,6 +81,10 @@ $output =~ s/whose initial value is/with value being/g; $output =~ s/each element of which is a(n?)/of type a$1/g; $output =~ s/\s+s\s*$//g; $output =~ s/variable/object/g; +$output =~ s/of type a character/of type char/g; +$output =~ s/of type an integer/of type int/g; +$output =~ s/to a character/to char/g; +$output =~ s/to an integer/to int/g; $output =~ s/\s+/ /; if($output eq " ") { diff --git a/modules/compiler_block.pl b/modules/compiler_block.pl index aaf88914..bed5774d 100755 --- a/modules/compiler_block.pl +++ b/modules/compiler_block.pl @@ -16,7 +16,7 @@ my $sock = IO::Socket::INET->new( Proto => 'tcp'); if(not defined $sock) { - print "Fatal error compiling: $!; try the cc2 command instead\n"; + print "Fatal error compiling: $!; try again later\n"; die $!; } diff --git a/modules/compiler_client.pl b/modules/compiler_client.pl index 93e9b5c3..1528d34b 100755 --- a/modules/compiler_client.pl +++ b/modules/compiler_client.pl @@ -16,7 +16,7 @@ my $sock = IO::Socket::INET->new( Proto => 'tcp'); if(not defined $sock) { - print "Fatal error compiling: $!; try the cc2 command instead\n"; + print "Fatal error compiling: $!; try again later\n"; die $!; } diff --git a/modules/lookupbot.pl b/modules/lookupbot.pl index 936fc1c4..30569113 100755 --- a/modules/lookupbot.pl +++ b/modules/lookupbot.pl @@ -444,6 +444,10 @@ sub horrorscope_search { my ($line) = $content =~ m|.*?$term.*?(.*?)|i; $line =~ s/ +/ /g; + if($line eq "") { + return "No results found; signs of the Zodiac are Aquarius, Pisces, Aries, Taurus, Gemini, Cancer, Leo, Virgo, Libra, Scorpio, Sagittarius, Capricorn"; + } + return $line; }