mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
Fix recall logic for integer history
This commit is contained in:
parent
8691e6d7bb
commit
d4eb08856a
@ -307,7 +307,7 @@ sub recall_message {
|
|||||||
# integral history
|
# integral history
|
||||||
if(defined $account) {
|
if(defined $account) {
|
||||||
my $max_messages = $self->{database}->get_max_messages($account, $recall_channel);
|
my $max_messages = $self->{database}->get_max_messages($account, $recall_channel);
|
||||||
if($recall_history < 1 || $recall_history > $max_messages) {
|
if ($recall_history < 1 || $recall_history > $max_messages) {
|
||||||
if ($max_messages == 0) {
|
if ($max_messages == 0) {
|
||||||
my @channels = $self->{database}->get_channels($account);
|
my @channels = $self->{database}->get_channels($account);
|
||||||
my $result = "No messages for $recall_nick in $recall_channel; I have messages for them in ";
|
my $result = "No messages for $recall_nick in $recall_channel; I have messages for them in ";
|
||||||
@ -324,9 +324,9 @@ sub recall_message {
|
|||||||
} else {
|
} else {
|
||||||
return "$result.";
|
return "$result.";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return "Please choose a history between 1 and $max_messages";
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return "Please choose a history between 1 and $max_messages";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user