diff --git a/PBot/BotAdminCommands.pm b/PBot/BotAdminCommands.pm index e075d226..8d746f7e 100644 --- a/PBot/BotAdminCommands.pm +++ b/PBot/BotAdminCommands.pm @@ -45,6 +45,7 @@ sub initialize { $pbot->commands->register(sub { return $self->adminset(@_) }, "adminset", 60); $pbot->commands->register(sub { return $self->adminunset(@_) }, "adminunset", 60); $pbot->commands->register(sub { return $self->sl(@_) }, "sl", 60); + $pbot->commands->register(sub { return $self->export(@_) }, "export", 60); } sub sl { @@ -167,7 +168,7 @@ sub export { my ($from, $nick, $user, $host, $arguments) = @_; if(not defined $arguments) { - return "/msg $nick Usage: export "; + return "/msg $nick Usage: export "; } if($arguments =~ /^modules$/i) { diff --git a/PBot/Quotegrabs.pm b/PBot/Quotegrabs.pm index 858ba2fc..51d9464f 100644 --- a/PBot/Quotegrabs.pm +++ b/PBot/Quotegrabs.pm @@ -211,15 +211,15 @@ sub grab_quotegrab { } else { # regex history my $ret = eval { - my $i = 0; + my $i = $#messages; my $found = 0; - while($i <= $#messages) { + while($i >= 0) { if($messages[$i]->{msg} =~ m/$grab_history/i) { $grab_history = $i; $found = 1; last; } - $i++; + $i--; } if($found == 0) { diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index eaa5e947..82734da2 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 371, + BUILD_REVISION => 372, BUILD_DATE => "2012-08-01", };