diff --git a/PBot/Quotegrabs.pm b/PBot/Quotegrabs.pm index d1e62d07..057158c4 100644 --- a/PBot/Quotegrabs.pm +++ b/PBot/Quotegrabs.pm @@ -428,6 +428,12 @@ sub show_random_quotegrab { $channel_search = $possible_channel_search if not defined $channel_search; $text_search = $possible_text_search if not defined $text_search; + if($nick_search =~ m/^#/) { + my $tmp = $channel_search; + $channel_search = $nick_search; + $nick_search = $tmp; + } + if(not defined $channel_search) { $channel_search = $from; } @@ -456,18 +462,18 @@ sub show_random_quotegrab { my $result = "No quotes grabbed "; if($nick_search ne '.*') { - $result .= "for $nick_search "; + $result .= "for nick $nick_search "; } if($channel_search ne '.*') { - $result .= "in $channel_search "; + $result .= "in channel $channel_search "; } if($text_search ne '.*') { - $result .= "matching '$text_search' "; + $result .= "matching text '$text_search' "; } - return $result . "yet (use `rq ` to specify the correct channel). Use `grab` to grab a quote.";; + return $result . "yet (usage: rq [nick regex] [-channel ] [-text ]).";; } my $quotegrab = $quotes[int rand($#quotes + 1)]; diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index a9d26ca6..076c0477 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 => 555, - BUILD_DATE => "2014-04-26", + BUILD_REVISION => 556, + BUILD_DATE => "2014-04-27", }; 1;