mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 20:09:43 +01:00
Replaced ago_exact with duration_exact in time comparison
This commit is contained in:
parent
999d8ae4a8
commit
2d11d66b67
@ -202,7 +202,7 @@ sub check_flood {
|
||||
|
||||
my %last = %{ @{ ${ $self->message_history }{$account}{$channel}{messages} }[$length - 1] };
|
||||
|
||||
$self->{pbot}->logger->log("Comparing " . int($last{timestamp}) . " against " . int($msg{timestamp}) . ": " . (int($last{timestamp} - $msg{timestamp})) . " seconds [" . ago_exact($last{timestamp} - $msg{timestamp}) . "]\n") if $mode == $self->{FLOOD_JOIN};
|
||||
$self->{pbot}->logger->log("Comparing " . int($last{timestamp}) . " against " . int($msg{timestamp}) . ": " . (int($last{timestamp} - $msg{timestamp})) . " seconds [" . duration_exact($last{timestamp} - $msg{timestamp}) . "]\n") if $mode == $self->{FLOOD_JOIN};
|
||||
|
||||
if($last{timestamp} - $msg{timestamp} <= $max_time && not $self->{pbot}->admins->loggedin($channel, "$nick!$user\@$host")) {
|
||||
if($mode == $self->{FLOOD_JOIN}) {
|
||||
|
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 207,
|
||||
BUILD_REVISION => 208,
|
||||
BUILD_DATE => "2010-06-26",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user