3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-01 17:16:39 +02:00

VERSION: version check show new version only if new version is GREATER

This commit is contained in:
Pragmatic Software 2020-01-19 20:04:10 -08:00
parent 76b5c6a2b7
commit 406f8e3207

View File

@ -55,7 +55,7 @@ sub version_cmd {
my $text = $response->decoded_content;
my ($version, $date) = $text =~ m/^\s+BUILD_REVISION => (\d+).*^\s+BUILD_DATE\s+=> "([^"]+)"/ms;
if ($version != BUILD_REVISION) {
if ($version > BUILD_REVISION) {
return "/say " . $self->version . "; new version available: $version $date!";
} else {
return "/say " . $self->version . "; you have the latest version.";