mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
VERSION: version check show new version only if new version is GREATER
This commit is contained in:
parent
76b5c6a2b7
commit
406f8e3207
@ -55,7 +55,7 @@ sub version_cmd {
|
|||||||
my $text = $response->decoded_content;
|
my $text = $response->decoded_content;
|
||||||
my ($version, $date) = $text =~ m/^\s+BUILD_REVISION => (\d+).*^\s+BUILD_DATE\s+=> "([^"]+)"/ms;
|
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!";
|
return "/say " . $self->version . "; new version available: $version $date!";
|
||||||
} else {
|
} else {
|
||||||
return "/say " . $self->version . "; you have the latest version.";
|
return "/say " . $self->version . "; you have the latest version.";
|
||||||
|
Loading…
Reference in New Issue
Block a user