3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 11:12:42 +01:00

Misc updates

This commit is contained in:
Pragmatic Software 2013-06-03 17:04:24 +00:00
parent f512efd6cc
commit 8586038f03
6 changed files with 15 additions and 7 deletions

View File

@ -161,7 +161,7 @@ sub grab_quotegrab {
}
if(not defined $arguments) {
return "Usage: !grab <nick> [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 <nick> [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 <nick> <channel>` 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 <nick> <channel>` to specify the correct channel).. Use `grab` to grab a quote.";
}
}

View File

@ -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;

View File

@ -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 " ") {

View File

@ -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 $!;
}

View File

@ -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 $!;
}

View File

@ -444,6 +444,10 @@ sub horrorscope_search {
my ($line) = $content =~ m|<tr>.*?$term.*?</td>(.*?)</tr>|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;
}